This is page 62 of 62. Use http://codebase.md/doobidoo/mcp-memory-service?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .claude
│ ├── agents
│ │ ├── amp-bridge.md
│ │ ├── amp-pr-automator.md
│ │ ├── code-quality-guard.md
│ │ ├── gemini-pr-automator.md
│ │ └── github-release-manager.md
│ ├── commands
│ │ ├── README.md
│ │ ├── refactor-function
│ │ ├── refactor-function-prod
│ │ └── refactor-function.md
│ ├── consolidation-fix-handoff.md
│ ├── consolidation-hang-fix-summary.md
│ ├── directives
│ │ ├── agents.md
│ │ ├── code-quality-workflow.md
│ │ ├── consolidation-details.md
│ │ ├── development-setup.md
│ │ ├── hooks-configuration.md
│ │ ├── memory-first.md
│ │ ├── memory-tagging.md
│ │ ├── pr-workflow.md
│ │ ├── quality-system-details.md
│ │ ├── README.md
│ │ ├── refactoring-checklist.md
│ │ ├── storage-backends.md
│ │ └── version-management.md
│ ├── prompts
│ │ └── hybrid-cleanup-integration.md
│ ├── settings.local.json.backup
│ └── settings.local.json.local
├── .commit-message
├── .coveragerc
├── .dockerignore
├── .env.example
├── .env.sqlite.backup
├── .envnn#
├── .gitattributes
├── .github
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ ├── feature_request.yml
│ │ └── performance_issue.yml
│ ├── pull_request_template.md
│ └── workflows
│ ├── bridge-tests.yml
│ ├── CACHE_FIX.md
│ ├── claude-branch-automation.yml
│ ├── claude-code-review.yml
│ ├── claude.yml
│ ├── cleanup-images.yml.disabled
│ ├── dev-setup-validation.yml
│ ├── docker-publish.yml
│ ├── dockerfile-lint.yml
│ ├── LATEST_FIXES.md
│ ├── main-optimized.yml.disabled
│ ├── main.yml
│ ├── publish-and-test.yml
│ ├── publish-dual.yml
│ ├── README_OPTIMIZATION.md
│ ├── release-tag.yml.disabled
│ ├── release.yml
│ ├── roadmap-review-reminder.yml
│ ├── SECRET_CONDITIONAL_FIX.md
│ └── WORKFLOW_FIXES.md
├── .gitignore
├── .mcp.json.backup
├── .mcp.json.template
├── .metrics
│ ├── baseline_cc_install_hooks.txt
│ ├── baseline_mi_install_hooks.txt
│ ├── baseline_nesting_install_hooks.txt
│ ├── BASELINE_REPORT.md
│ ├── COMPLEXITY_COMPARISON.txt
│ ├── QUICK_REFERENCE.txt
│ ├── README.md
│ ├── REFACTORED_BASELINE.md
│ ├── REFACTORING_COMPLETION_REPORT.md
│ └── TRACKING_TABLE.md
├── .pyscn
│ ├── .gitignore
│ └── reports
│ └── analyze_20251123_214224.html
├── AGENTS.md
├── ai-optimized-tool-descriptions.py
├── archive
│ ├── deployment
│ │ ├── deploy_fastmcp_fixed.sh
│ │ ├── deploy_http_with_mcp.sh
│ │ └── deploy_mcp_v4.sh
│ ├── deployment-configs
│ │ ├── empty_config.yml
│ │ └── smithery.yaml
│ ├── development
│ │ └── test_fastmcp.py
│ ├── docs-removed-2025-08-23
│ │ ├── authentication.md
│ │ ├── claude_integration.md
│ │ ├── claude-code-compatibility.md
│ │ ├── claude-code-integration.md
│ │ ├── claude-code-quickstart.md
│ │ ├── claude-desktop-setup.md
│ │ ├── complete-setup-guide.md
│ │ ├── database-synchronization.md
│ │ ├── development
│ │ │ ├── autonomous-memory-consolidation.md
│ │ │ ├── CLEANUP_PLAN.md
│ │ │ ├── CLEANUP_README.md
│ │ │ ├── CLEANUP_SUMMARY.md
│ │ │ ├── dream-inspired-memory-consolidation.md
│ │ │ ├── hybrid-slm-memory-consolidation.md
│ │ │ ├── mcp-milestone.md
│ │ │ ├── multi-client-architecture.md
│ │ │ ├── test-results.md
│ │ │ └── TIMESTAMP_FIX_SUMMARY.md
│ │ ├── distributed-sync.md
│ │ ├── invocation_guide.md
│ │ ├── macos-intel.md
│ │ ├── master-guide.md
│ │ ├── mcp-client-configuration.md
│ │ ├── multi-client-server.md
│ │ ├── service-installation.md
│ │ ├── sessions
│ │ │ └── MCP_ENHANCEMENT_SESSION_MEMORY_v4.1.0.md
│ │ ├── UBUNTU_SETUP.md
│ │ ├── ubuntu.md
│ │ ├── windows-setup.md
│ │ └── windows.md
│ ├── docs-root-cleanup-2025-08-23
│ │ ├── AWESOME_LIST_SUBMISSION.md
│ │ ├── CLOUDFLARE_IMPLEMENTATION.md
│ │ ├── DOCUMENTATION_ANALYSIS.md
│ │ ├── DOCUMENTATION_CLEANUP_PLAN.md
│ │ ├── DOCUMENTATION_CONSOLIDATION_COMPLETE.md
│ │ ├── LITESTREAM_SETUP_GUIDE.md
│ │ ├── lm_studio_system_prompt.md
│ │ ├── PYTORCH_DOWNLOAD_FIX.md
│ │ └── README-ORIGINAL-BACKUP.md
│ ├── investigations
│ │ └── MACOS_HOOKS_INVESTIGATION.md
│ ├── litestream-configs-v6.3.0
│ │ ├── install_service.sh
│ │ ├── litestream_master_config_fixed.yml
│ │ ├── litestream_master_config.yml
│ │ ├── litestream_replica_config_fixed.yml
│ │ ├── litestream_replica_config.yml
│ │ ├── litestream_replica_simple.yml
│ │ ├── litestream-http.service
│ │ ├── litestream.service
│ │ └── requirements-cloudflare.txt
│ ├── release-notes
│ │ └── release-notes-v7.1.4.md
│ └── setup-development
│ ├── README.md
│ ├── setup_consolidation_mdns.sh
│ ├── STARTUP_SETUP_GUIDE.md
│ └── test_service.sh
├── CHANGELOG-HISTORIC.md
├── CHANGELOG.md
├── claude_commands
│ ├── memory-context.md
│ ├── memory-health.md
│ ├── memory-ingest-dir.md
│ ├── memory-ingest.md
│ ├── memory-recall.md
│ ├── memory-search.md
│ ├── memory-store.md
│ ├── README.md
│ └── session-start.md
├── claude-hooks
│ ├── config.json
│ ├── config.template.json
│ ├── CONFIGURATION.md
│ ├── core
│ │ ├── auto-capture-hook.js
│ │ ├── auto-capture-hook.ps1
│ │ ├── memory-retrieval.js
│ │ ├── mid-conversation.js
│ │ ├── permission-request.js
│ │ ├── session-end.js
│ │ ├── session-start.js
│ │ └── topic-change.js
│ ├── debug-pattern-test.js
│ ├── install_claude_hooks_windows.ps1
│ ├── install_hooks.py
│ ├── memory-mode-controller.js
│ ├── MIGRATION.md
│ ├── README-AUTO-CAPTURE.md
│ ├── README-NATURAL-TRIGGERS.md
│ ├── README-PERMISSION-REQUEST.md
│ ├── README-phase2.md
│ ├── README.md
│ ├── simple-test.js
│ ├── statusline.sh
│ ├── test-adaptive-weights.js
│ ├── test-dual-protocol-hook.js
│ ├── test-mcp-hook.js
│ ├── test-natural-triggers.js
│ ├── test-recency-scoring.js
│ ├── tests
│ │ ├── integration-test.js
│ │ ├── phase2-integration-test.js
│ │ ├── test-code-execution.js
│ │ ├── test-cross-session.json
│ │ ├── test-permission-request.js
│ │ ├── test-session-tracking.json
│ │ └── test-threading.json
│ ├── utilities
│ │ ├── adaptive-pattern-detector.js
│ │ ├── auto-capture-patterns.js
│ │ ├── context-formatter.js
│ │ ├── context-shift-detector.js
│ │ ├── conversation-analyzer.js
│ │ ├── dynamic-context-updater.js
│ │ ├── git-analyzer.js
│ │ ├── mcp-client.js
│ │ ├── memory-client.js
│ │ ├── memory-scorer.js
│ │ ├── performance-manager.js
│ │ ├── project-detector.js
│ │ ├── session-cache.json
│ │ ├── session-tracker.js
│ │ ├── tiered-conversation-monitor.js
│ │ ├── user-override-detector.js
│ │ └── version-checker.js
│ └── WINDOWS-SESSIONSTART-BUG.md
├── CLAUDE.md
├── CODE_OF_CONDUCT.md
├── COMMIT_MESSAGE.md
├── CONTRIBUTING.md
├── Development-Sprint-November-2025.md
├── docs
│ ├── amp-cli-bridge.md
│ ├── api
│ │ ├── code-execution-interface.md
│ │ ├── memory-metadata-api.md
│ │ ├── PHASE1_IMPLEMENTATION_SUMMARY.md
│ │ ├── PHASE2_IMPLEMENTATION_SUMMARY.md
│ │ ├── PHASE2_REPORT.md
│ │ └── tag-standardization.md
│ ├── architecture
│ │ ├── graph-database-design.md
│ │ ├── search-enhancement-spec.md
│ │ └── search-examples.md
│ ├── architecture.md
│ ├── archive
│ │ └── obsolete-workflows
│ │ ├── load_memory_context.md
│ │ └── README.md
│ ├── assets
│ │ └── images
│ │ ├── dashboard-v3.3.0-preview.png
│ │ ├── memory-awareness-hooks-example.png
│ │ ├── project-infographic.svg
│ │ └── README.md
│ ├── CLAUDE_CODE_QUICK_REFERENCE.md
│ ├── cloudflare-setup.md
│ ├── demo-recording-script.md
│ ├── deployment
│ │ ├── docker.md
│ │ ├── dual-service.md
│ │ ├── production-guide.md
│ │ └── systemd-service.md
│ ├── development
│ │ ├── ai-agent-instructions.md
│ │ ├── code-quality
│ │ │ ├── phase-2a-completion.md
│ │ │ ├── phase-2a-handle-get-prompt.md
│ │ │ ├── phase-2a-index.md
│ │ │ ├── phase-2a-install-package.md
│ │ │ └── phase-2b-session-summary.md
│ │ ├── code-quality-workflow.md
│ │ ├── dashboard-workflow.md
│ │ ├── issue-management.md
│ │ ├── pr-280-post-mortem.md
│ │ ├── pr-review-guide.md
│ │ ├── refactoring-notes.md
│ │ ├── release-checklist.md
│ │ └── todo-tracker.md
│ ├── docker-optimized-build.md
│ ├── document-ingestion.md
│ ├── DOCUMENTATION_AUDIT.md
│ ├── enhancement-roadmap-issue-14.md
│ ├── examples
│ │ ├── analysis-scripts.js
│ │ ├── maintenance-session-example.md
│ │ ├── memory-distribution-chart.jsx
│ │ ├── quality-system-configs.md
│ │ └── tag-schema.json
│ ├── features
│ │ └── association-quality-boost.md
│ ├── first-time-setup.md
│ ├── glama-deployment.md
│ ├── guides
│ │ ├── advanced-command-examples.md
│ │ ├── chromadb-migration.md
│ │ ├── commands-vs-mcp-server.md
│ │ ├── mcp-enhancements.md
│ │ ├── mdns-service-discovery.md
│ │ ├── memory-consolidation-guide.md
│ │ ├── memory-quality-guide.md
│ │ ├── migration.md
│ │ ├── scripts.md
│ │ └── STORAGE_BACKENDS.md
│ ├── HOOK_IMPROVEMENTS.md
│ ├── hooks
│ │ └── phase2-code-execution-migration.md
│ ├── http-server-management.md
│ ├── ide-compatability.md
│ ├── IMAGE_RETENTION_POLICY.md
│ ├── images
│ │ ├── dashboard-placeholder.md
│ │ └── update-restart-demo.png
│ ├── implementation
│ │ ├── health_checks.md
│ │ └── performance.md
│ ├── IMPLEMENTATION_PLAN_HTTP_SSE.md
│ ├── integration
│ │ ├── homebrew.md
│ │ └── multi-client.md
│ ├── integrations
│ │ ├── gemini.md
│ │ ├── groq-bridge.md
│ │ ├── groq-integration-summary.md
│ │ └── groq-model-comparison.md
│ ├── integrations.md
│ ├── legacy
│ │ └── dual-protocol-hooks.md
│ ├── LIGHTWEIGHT_ONNX_SETUP.md
│ ├── LM_STUDIO_COMPATIBILITY.md
│ ├── maintenance
│ │ └── memory-maintenance.md
│ ├── mastery
│ │ ├── api-reference.md
│ │ ├── architecture-overview.md
│ │ ├── configuration-guide.md
│ │ ├── local-setup-and-run.md
│ │ ├── testing-guide.md
│ │ └── troubleshooting.md
│ ├── migration
│ │ ├── code-execution-api-quick-start.md
│ │ └── graph-migration-guide.md
│ ├── natural-memory-triggers
│ │ ├── cli-reference.md
│ │ ├── installation-guide.md
│ │ └── performance-optimization.md
│ ├── oauth-setup.md
│ ├── pr-graphql-integration.md
│ ├── quality-system-ui-implementation.md
│ ├── quick-setup-cloudflare-dual-environment.md
│ ├── README.md
│ ├── refactoring
│ │ └── phase-3-3-analysis.md
│ ├── releases
│ │ └── v8.72.0-testing.md
│ ├── remote-configuration-wiki-section.md
│ ├── research
│ │ ├── code-execution-interface-implementation.md
│ │ └── code-execution-interface-summary.md
│ ├── ROADMAP.md
│ ├── sqlite-vec-backend.md
│ ├── statistics
│ │ ├── charts
│ │ │ ├── activity_patterns.png
│ │ │ ├── contributors.png
│ │ │ ├── growth_trajectory.png
│ │ │ ├── monthly_activity.png
│ │ │ └── october_sprint.png
│ │ ├── data
│ │ │ ├── activity_by_day.csv
│ │ │ ├── activity_by_hour.csv
│ │ │ ├── contributors.csv
│ │ │ └── monthly_activity.csv
│ │ ├── generate_charts.py
│ │ └── REPOSITORY_STATISTICS.md
│ ├── technical
│ │ ├── development.md
│ │ ├── memory-migration.md
│ │ ├── migration-log.md
│ │ ├── sqlite-vec-embedding-fixes.md
│ │ └── tag-storage.md
│ ├── testing
│ │ └── regression-tests.md
│ ├── testing-cloudflare-backend.md
│ ├── troubleshooting
│ │ ├── cloudflare-api-token-setup.md
│ │ ├── cloudflare-authentication.md
│ │ ├── database-transfer-migration.md
│ │ ├── general.md
│ │ ├── hooks-quick-reference.md
│ │ ├── memory-management.md
│ │ ├── pr162-schema-caching-issue.md
│ │ ├── session-end-hooks.md
│ │ └── sync-issues.md
│ ├── tutorials
│ │ ├── advanced-techniques.md
│ │ ├── data-analysis.md
│ │ └── demo-session-walkthrough.md
│ ├── wiki-documentation-plan.md
│ └── wiki-Graph-Database-Architecture.md
├── examples
│ ├── claude_desktop_config_template.json
│ ├── claude_desktop_config_windows.json
│ ├── claude-desktop-http-config.json
│ ├── config
│ │ └── claude_desktop_config.json
│ ├── http-mcp-bridge.js
│ ├── memory_export_template.json
│ ├── README.md
│ ├── setup
│ │ └── setup_multi_client_complete.py
│ └── start_https_example.sh
├── IMPLEMENTATION_SUMMARY.md
├── install_service.py
├── install.py
├── LICENSE
├── NOTICE
├── PR_DESCRIPTION.md
├── pyproject-lite.toml
├── pyproject.toml
├── pytest.ini
├── README.md
├── release-notes-v8.61.0.md
├── run_server.py
├── scripts
│ ├── .claude
│ │ └── settings.local.json
│ ├── archive
│ │ └── check_missing_timestamps.py
│ ├── backup
│ │ ├── backup_memories.py
│ │ ├── backup_sqlite_vec.sh
│ │ ├── export_distributable_memories.sh
│ │ └── restore_memories.py
│ ├── benchmarks
│ │ ├── benchmark_code_execution_api.py
│ │ ├── benchmark_hybrid_sync.py
│ │ └── benchmark_server_caching.py
│ ├── ci
│ │ ├── check_dockerfile_args.sh
│ │ └── validate_imports.sh
│ ├── database
│ │ ├── analyze_sqlite_vec_db.py
│ │ ├── check_sqlite_vec_status.py
│ │ ├── db_health_check.py
│ │ └── simple_timestamp_check.py
│ ├── development
│ │ ├── debug_server_initialization.py
│ │ ├── find_orphaned_files.py
│ │ ├── fix_mdns.sh
│ │ ├── fix_sitecustomize.py
│ │ ├── remote_ingest.sh
│ │ ├── setup-git-merge-drivers.sh
│ │ ├── uv-lock-merge.sh
│ │ └── verify_hybrid_sync.py
│ ├── hooks
│ │ └── pre-commit
│ ├── installation
│ │ ├── install_linux_service.py
│ │ ├── install_macos_service.py
│ │ ├── install_uv.py
│ │ ├── install_windows_service.py
│ │ ├── install.py
│ │ ├── setup_backup_cron.sh
│ │ ├── setup_claude_mcp.sh
│ │ └── setup_cloudflare_resources.py
│ ├── linux
│ │ ├── service_status.sh
│ │ ├── start_service.sh
│ │ ├── stop_service.sh
│ │ ├── uninstall_service.sh
│ │ └── view_logs.sh
│ ├── maintenance
│ │ ├── add_project_tags.py
│ │ ├── apply_quality_boost_retroactively.py
│ │ ├── assign_memory_types.py
│ │ ├── auto_retag_memory_merge.py
│ │ ├── auto_retag_memory.py
│ │ ├── backfill_graph_table.py
│ │ ├── check_memory_types.py
│ │ ├── cleanup_association_memories_hybrid.py
│ │ ├── cleanup_association_memories.py
│ │ ├── cleanup_corrupted_encoding.py
│ │ ├── cleanup_low_quality.py
│ │ ├── cleanup_memories.py
│ │ ├── cleanup_organize.py
│ │ ├── consolidate_memory_types.py
│ │ ├── consolidation_mappings.json
│ │ ├── delete_orphaned_vectors_fixed.py
│ │ ├── delete_test_memories.py
│ │ ├── fast_cleanup_duplicates_with_tracking.sh
│ │ ├── find_all_duplicates.py
│ │ ├── find_cloudflare_duplicates.py
│ │ ├── find_duplicates.py
│ │ ├── memory-types.md
│ │ ├── README.md
│ │ ├── recover_timestamps_from_cloudflare.py
│ │ ├── regenerate_embeddings.py
│ │ ├── repair_malformed_tags.py
│ │ ├── repair_memories.py
│ │ ├── repair_sqlite_vec_embeddings.py
│ │ ├── repair_zero_embeddings.py
│ │ ├── restore_from_json_export.py
│ │ ├── retag_valuable_memories.py
│ │ ├── scan_todos.sh
│ │ ├── soft_delete_test_memories.py
│ │ └── sync_status.py
│ ├── migration
│ │ ├── cleanup_mcp_timestamps.py
│ │ ├── legacy
│ │ │ └── migrate_chroma_to_sqlite.py
│ │ ├── mcp-migration.py
│ │ ├── migrate_sqlite_vec_embeddings.py
│ │ ├── migrate_storage.py
│ │ ├── migrate_tags.py
│ │ ├── migrate_timestamps.py
│ │ ├── migrate_to_cloudflare.py
│ │ ├── migrate_to_sqlite_vec.py
│ │ ├── migrate_v5_enhanced.py
│ │ ├── TIMESTAMP_CLEANUP_README.md
│ │ └── verify_mcp_timestamps.py
│ ├── pr
│ │ ├── amp_collect_results.sh
│ │ ├── amp_detect_breaking_changes.sh
│ │ ├── amp_generate_tests.sh
│ │ ├── amp_pr_review.sh
│ │ ├── amp_quality_gate.sh
│ │ ├── amp_suggest_fixes.sh
│ │ ├── auto_review.sh
│ │ ├── detect_breaking_changes.sh
│ │ ├── generate_tests.sh
│ │ ├── lib
│ │ │ └── graphql_helpers.sh
│ │ ├── pre_pr_check.sh
│ │ ├── quality_gate.sh
│ │ ├── resolve_threads.sh
│ │ ├── run_pyscn_analysis.sh
│ │ ├── run_quality_checks_on_files.sh
│ │ ├── run_quality_checks.sh
│ │ ├── thread_status.sh
│ │ └── watch_reviews.sh
│ ├── quality
│ │ ├── bulk_evaluate_onnx.py
│ │ ├── check_test_scores.py
│ │ ├── debug_deberta_scoring.py
│ │ ├── export_deberta_onnx.py
│ │ ├── fix_dead_code_install.sh
│ │ ├── migrate_to_deberta.py
│ │ ├── phase1_dead_code_analysis.md
│ │ ├── phase2_complexity_analysis.md
│ │ ├── README_PHASE1.md
│ │ ├── README_PHASE2.md
│ │ ├── rescore_deberta.py
│ │ ├── rescore_fallback.py
│ │ ├── reset_onnx_scores.py
│ │ ├── track_pyscn_metrics.sh
│ │ └── weekly_quality_review.sh
│ ├── README.md
│ ├── run
│ │ ├── memory_wrapper_cleanup.ps1
│ │ ├── memory_wrapper_cleanup.py
│ │ ├── memory_wrapper_cleanup.sh
│ │ ├── README_CLEANUP_WRAPPER.md
│ │ ├── run_mcp_memory.sh
│ │ ├── run-with-uv.sh
│ │ └── start_sqlite_vec.sh
│ ├── run_memory_server.py
│ ├── server
│ │ ├── check_http_server.py
│ │ ├── check_server_health.py
│ │ ├── memory_offline.py
│ │ ├── preload_models.py
│ │ ├── run_http_server.py
│ │ ├── run_memory_server.py
│ │ ├── start_http_server.bat
│ │ └── start_http_server.sh
│ ├── service
│ │ ├── deploy_dual_services.sh
│ │ ├── http_server_manager.sh
│ │ ├── install_http_service.sh
│ │ ├── mcp-memory-http.service
│ │ ├── mcp-memory.service
│ │ ├── memory_service_manager.sh
│ │ ├── service_control.sh
│ │ ├── service_utils.py
│ │ ├── update_service.sh
│ │ └── windows
│ │ ├── add_watchdog_trigger.ps1
│ │ ├── install_scheduled_task.ps1
│ │ ├── manage_service.ps1
│ │ ├── run_http_server_background.ps1
│ │ ├── uninstall_scheduled_task.ps1
│ │ └── update_and_restart.ps1
│ ├── setup-lightweight.sh
│ ├── sync
│ │ ├── check_drift.py
│ │ ├── claude_sync_commands.py
│ │ ├── export_memories.py
│ │ ├── import_memories.py
│ │ ├── litestream
│ │ │ ├── apply_local_changes.sh
│ │ │ ├── enhanced_memory_store.sh
│ │ │ ├── init_staging_db.sh
│ │ │ ├── io.litestream.replication.plist
│ │ │ ├── manual_sync.sh
│ │ │ ├── memory_sync.sh
│ │ │ ├── pull_remote_changes.sh
│ │ │ ├── push_to_remote.sh
│ │ │ ├── README.md
│ │ │ ├── resolve_conflicts.sh
│ │ │ ├── setup_local_litestream.sh
│ │ │ ├── setup_remote_litestream.sh
│ │ │ ├── staging_db_init.sql
│ │ │ ├── stash_local_changes.sh
│ │ │ ├── sync_from_remote_noconfig.sh
│ │ │ └── sync_from_remote.sh
│ │ ├── README.md
│ │ ├── safe_cloudflare_update.sh
│ │ ├── sync_memory_backends.py
│ │ └── sync_now.py
│ ├── testing
│ │ ├── run_complete_test.py
│ │ ├── run_memory_test.sh
│ │ ├── simple_test.py
│ │ ├── test_cleanup_logic.py
│ │ ├── test_cloudflare_backend.py
│ │ ├── test_docker_functionality.py
│ │ ├── test_installation.py
│ │ ├── test_mdns.py
│ │ ├── test_memory_api.py
│ │ ├── test_memory_simple.py
│ │ ├── test_migration.py
│ │ ├── test_search_api.py
│ │ ├── test_sqlite_vec_embeddings.py
│ │ ├── test_sse_events.py
│ │ ├── test-connection.py
│ │ └── test-hook.js
│ ├── update_and_restart.sh
│ ├── utils
│ │ ├── claude_commands_utils.py
│ │ ├── detect_platform.py
│ │ ├── generate_personalized_claude_md.sh
│ │ ├── groq
│ │ ├── groq_agent_bridge.py
│ │ ├── list-collections.py
│ │ ├── memory_wrapper_uv.py
│ │ ├── query_memories.py
│ │ ├── README_detect_platform.md
│ │ ├── smithery_wrapper.py
│ │ ├── test_groq_bridge.sh
│ │ └── uv_wrapper.py
│ └── validation
│ ├── check_dev_setup.py
│ ├── check_documentation_links.py
│ ├── check_handler_coverage.py
│ ├── diagnose_backend_config.py
│ ├── validate_configuration_complete.py
│ ├── validate_graph_tools.py
│ ├── validate_memories.py
│ ├── validate_migration.py
│ ├── validate_timestamp_integrity.py
│ ├── verify_environment.py
│ ├── verify_pytorch_windows.py
│ └── verify_torch.py
├── SECURITY.md
├── selective_timestamp_recovery.py
├── SPONSORS.md
├── src
│ └── mcp_memory_service
│ ├── __init__.py
│ ├── _version.py
│ ├── api
│ │ ├── __init__.py
│ │ ├── client.py
│ │ ├── operations.py
│ │ ├── sync_wrapper.py
│ │ └── types.py
│ ├── backup
│ │ ├── __init__.py
│ │ └── scheduler.py
│ ├── cli
│ │ ├── __init__.py
│ │ ├── ingestion.py
│ │ ├── main.py
│ │ └── utils.py
│ ├── config.py
│ ├── consolidation
│ │ ├── __init__.py
│ │ ├── associations.py
│ │ ├── base.py
│ │ ├── clustering.py
│ │ ├── compression.py
│ │ ├── consolidator.py
│ │ ├── decay.py
│ │ ├── forgetting.py
│ │ ├── health.py
│ │ └── scheduler.py
│ ├── dependency_check.py
│ ├── discovery
│ │ ├── __init__.py
│ │ ├── client.py
│ │ └── mdns_service.py
│ ├── embeddings
│ │ ├── __init__.py
│ │ └── onnx_embeddings.py
│ ├── ingestion
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── chunker.py
│ │ ├── csv_loader.py
│ │ ├── json_loader.py
│ │ ├── pdf_loader.py
│ │ ├── registry.py
│ │ ├── semtools_loader.py
│ │ └── text_loader.py
│ ├── lm_studio_compat.py
│ ├── mcp_server.py
│ ├── models
│ │ ├── __init__.py
│ │ └── memory.py
│ ├── quality
│ │ ├── __init__.py
│ │ ├── ai_evaluator.py
│ │ ├── async_scorer.py
│ │ ├── config.py
│ │ ├── implicit_signals.py
│ │ ├── metadata_codec.py
│ │ ├── onnx_ranker.py
│ │ └── scorer.py
│ ├── server
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ ├── cache_manager.py
│ │ ├── client_detection.py
│ │ ├── environment.py
│ │ ├── handlers
│ │ │ ├── __init__.py
│ │ │ ├── consolidation.py
│ │ │ ├── documents.py
│ │ │ ├── graph.py
│ │ │ ├── memory.py
│ │ │ ├── quality.py
│ │ │ └── utility.py
│ │ └── logging_config.py
│ ├── server_impl.py
│ ├── services
│ │ ├── __init__.py
│ │ └── memory_service.py
│ ├── storage
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── cloudflare.py
│ │ ├── factory.py
│ │ ├── graph.py
│ │ ├── http_client.py
│ │ ├── hybrid.py
│ │ ├── migrations
│ │ │ └── 008_add_graph_table.sql
│ │ └── sqlite_vec.py
│ ├── sync
│ │ ├── __init__.py
│ │ ├── exporter.py
│ │ ├── importer.py
│ │ └── litestream_config.py
│ ├── utils
│ │ ├── __init__.py
│ │ ├── cache_manager.py
│ │ ├── content_splitter.py
│ │ ├── db_utils.py
│ │ ├── debug.py
│ │ ├── directory_ingestion.py
│ │ ├── document_processing.py
│ │ ├── gpu_detection.py
│ │ ├── hashing.py
│ │ ├── health_check.py
│ │ ├── http_server_manager.py
│ │ ├── port_detection.py
│ │ ├── quality_analytics.py
│ │ ├── startup_orchestrator.py
│ │ ├── system_detection.py
│ │ └── time_parser.py
│ └── web
│ ├── __init__.py
│ ├── api
│ │ ├── __init__.py
│ │ ├── analytics.py
│ │ ├── backup.py
│ │ ├── consolidation.py
│ │ ├── documents.py
│ │ ├── events.py
│ │ ├── health.py
│ │ ├── manage.py
│ │ ├── mcp.py
│ │ ├── memories.py
│ │ ├── quality.py
│ │ ├── search.py
│ │ └── sync.py
│ ├── app.py
│ ├── dependencies.py
│ ├── oauth
│ │ ├── __init__.py
│ │ ├── authorization.py
│ │ ├── discovery.py
│ │ ├── middleware.py
│ │ ├── models.py
│ │ ├── registration.py
│ │ └── storage.py
│ ├── sse.py
│ └── static
│ ├── app.js
│ ├── i18n
│ │ ├── de.json
│ │ ├── en.json
│ │ ├── es.json
│ │ ├── fr.json
│ │ ├── ja.json
│ │ ├── ko.json
│ │ └── zh.json
│ ├── index.html
│ ├── README.md
│ ├── sse_test.html
│ └── style.css
├── start_http_debug.bat
├── start_http_server.sh
├── test_document.txt
├── test_version_checker.js
├── TESTING_NOTES.md
├── tests
│ ├── __init__.py
│ ├── api
│ │ ├── __init__.py
│ │ ├── test_compact_types.py
│ │ └── test_operations.py
│ ├── bridge
│ │ ├── mock_responses.js
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ └── test_http_mcp_bridge.js
│ ├── conftest.py
│ ├── consolidation
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_associations.py
│ │ ├── test_clustering.py
│ │ ├── test_compression.py
│ │ ├── test_consolidator.py
│ │ ├── test_decay.py
│ │ ├── test_forgetting.py
│ │ └── test_graph_modes.py
│ ├── contracts
│ │ └── api-specification.yml
│ ├── integration
│ │ ├── conftest.py
│ │ ├── HANDLER_COVERAGE_REPORT.md
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── test_all_memory_handlers.py
│ │ ├── test_api_key_fallback.py
│ │ ├── test_api_memories_chronological.py
│ │ ├── test_api_tag_time_search.py
│ │ ├── test_api_with_memory_service.py
│ │ ├── test_bridge_integration.js
│ │ ├── test_cli_interfaces.py
│ │ ├── test_cloudflare_connection.py
│ │ ├── test_concurrent_clients.py
│ │ ├── test_data_serialization_consistency.py
│ │ ├── test_http_server_startup.py
│ │ ├── test_mcp_memory.py
│ │ ├── test_mdns_integration.py
│ │ ├── test_oauth_basic_auth.py
│ │ ├── test_oauth_flow.py
│ │ ├── test_server_handlers.py
│ │ └── test_store_memory.py
│ ├── performance
│ │ ├── test_background_sync.py
│ │ └── test_hybrid_live.py
│ ├── README.md
│ ├── smithery
│ │ └── test_smithery.py
│ ├── sqlite
│ │ └── simple_sqlite_vec_test.py
│ ├── storage
│ │ ├── conftest.py
│ │ └── test_graph_storage.py
│ ├── test_client.py
│ ├── test_content_splitting.py
│ ├── test_database.py
│ ├── test_deberta_quality.py
│ ├── test_fallback_quality.py
│ ├── test_graph_traversal.py
│ ├── test_hybrid_cloudflare_limits.py
│ ├── test_hybrid_storage.py
│ ├── test_lightweight_onnx.py
│ ├── test_memory_ops.py
│ ├── test_memory_wrapper_cleanup.py
│ ├── test_quality_integration.py
│ ├── test_quality_system.py
│ ├── test_semantic_search.py
│ ├── test_sqlite_vec_storage.py
│ ├── test_time_parser.py
│ ├── test_timestamp_preservation.py
│ ├── timestamp
│ │ ├── test_hook_vs_manual_storage.py
│ │ ├── test_issue99_final_validation.py
│ │ ├── test_search_retrieval_inconsistency.py
│ │ ├── test_timestamp_issue.py
│ │ └── test_timestamp_simple.py
│ └── unit
│ ├── conftest.py
│ ├── test_cloudflare_storage.py
│ ├── test_csv_loader.py
│ ├── test_fastapi_dependencies.py
│ ├── test_import.py
│ ├── test_imports.py
│ ├── test_json_loader.py
│ ├── test_mdns_simple.py
│ ├── test_mdns.py
│ ├── test_memory_service.py
│ ├── test_memory.py
│ ├── test_semtools_loader.py
│ ├── test_storage_interface_compatibility.py
│ ├── test_tag_time_filtering.py
│ └── test_uv_no_pip_installer_fallback.py
├── tools
│ ├── docker
│ │ ├── DEPRECATED.md
│ │ ├── docker-compose.http.yml
│ │ ├── docker-compose.pythonpath.yml
│ │ ├── docker-compose.standalone.yml
│ │ ├── docker-compose.uv.yml
│ │ ├── docker-compose.yml
│ │ ├── docker-entrypoint-persistent.sh
│ │ ├── docker-entrypoint-unified.sh
│ │ ├── docker-entrypoint.sh
│ │ ├── Dockerfile
│ │ ├── Dockerfile.glama
│ │ ├── Dockerfile.slim
│ │ ├── README.md
│ │ └── test-docker-modes.sh
│ └── README.md
├── uv.lock
└── verify_compression.sh
```
# Files
--------------------------------------------------------------------------------
/CHANGELOG-HISTORIC.md:
--------------------------------------------------------------------------------
```markdown
1 | # Historic Changelog
2 |
3 | **Historic releases for MCP Memory Service (v8.0.0 - v8.50.1 and v7.x)**
4 |
5 | For recent releases (v8.51.0+), see [CHANGELOG.md](./CHANGELOG.md).
6 |
7 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8 |
9 | ---
10 | ## [8.50.1] - 2025-12-14
11 |
12 | ### Fixed
13 | - **MCP_EMBEDDING_MODEL Environment Variable Now Respected** (PR #276, fixes #275)
14 | - The `MCP_EMBEDDING_MODEL` environment variable was being ignored in server.py during storage initialization
15 | - All storage backends (sqlite_vec, hybrid) now correctly use `EMBEDDING_MODEL_NAME` from config
16 | - Users can now configure custom embedding models like `paraphrase-multilingual-mpnet-base-v2`
17 | - Technical details: Fixed by passing `config.embedding_model` to storage backend constructors
18 |
19 | - **Installation Script Backend Support Updated** (fixes #273, commit 892212c)
20 | - Removed stale ChromaDB references from `--storage-backend` choices (ChromaDB was removed in v8.3.0)
21 | - Added missing 'cloudflare' and 'hybrid' options to both installation scripts
22 | - Updated help text to reflect current supported backends: sqlite_vec, cloudflare, hybrid
23 | - Fixes: `scripts/installation/install.py` and root-level `install.py`
24 |
25 | ### Added
26 | - **i18n Quality Analytics Translations** - Completed translations for quality analytics feature (PR #271)
27 | - Added 25 quality strings to Spanish, French, German, Japanese, Korean (125 translations total)
28 | - Completes i18n coverage started in PR #270 (English/Chinese)
29 | - Languages now fully supported: English, Chinese, Spanish, French, German, Japanese, Korean
30 | - Strings added: navigation labels, quality stats/charts, provider settings, help text
31 |
32 | ## [8.50.0] - 2025-12-09
33 |
34 | ### Added
35 | - **Fallback Quality Scoring** - DeBERTa primary with MS-MARCO rescue for technical content (resolves prose bias issue)
36 | - **Problem Solved**: DeBERTa systematic bias toward prose (0.78-0.92) over technical content (0.48-0.60)
37 | - **Solution**: Threshold-based fallback - DeBERTa confident → use DeBERTa, DeBERTa low + MS-MARCO high → rescue with MS-MARCO
38 | - **Expected Results**: Technical content 0.70-0.80 (+45-65% improvement), prose 0.82 (no degradation)
39 | - **Performance**: ~139ms average (DeBERTa-only: 115ms for ~40% of memories, both models: 155ms for ~60%)
40 | - **Configuration**:
41 | - `MCP_QUALITY_FALLBACK_ENABLED=true` - Enable fallback mode
42 | - `MCP_QUALITY_LOCAL_MODEL="nvidia-quality-classifier-deberta,ms-marco-MiniLM-L-6-v2"` - Specify both models
43 | - `MCP_QUALITY_DEBERTA_THRESHOLD=0.6` - DeBERTa confidence threshold (default: 0.6)
44 | - `MCP_QUALITY_MSMARCO_THRESHOLD=0.7` - MS-MARCO rescue threshold (default: 0.7)
45 |
46 | - **Fallback Metadata Tracking** - Extended CSV format for decision transparency
47 | - New provider codes: `'fallback_deberta-msmarco': 'fb'`, `'onnx_deberta': 'od'`, `'onnx_msmarco': 'om'`
48 | - New decision codes: `'deberta_confident': 'dc'`, `'ms_marco_rescue': 'mr'`, `'both_low': 'bl'`
49 | - CSV format extended from 13 to 16 parts: `qs,qp,as,rs,rca,df,cb,ab,qba,qbd,qbr,qbcc,oqbb,dec,dbs,mms`
50 | - Backward compatible with old 13-part format
51 | - Stores individual model scores (deberta_score, ms_marco_score) for analysis
52 |
53 | - **Bulk Re-evaluation Script** - Re-score existing memories with fallback approach
54 | - Script: `scripts/quality/rescore_fallback.py`
55 | - Features: Dry-run mode, decision distribution analysis, threshold tuning support
56 | - Reports: Top improvements list, score delta tracking, decision breakdown
57 | - Usage: `python scripts/quality/rescore_fallback.py --execute --deberta-threshold 0.6 --msmarco-threshold 0.7`
58 |
59 | - **Comprehensive Test Suite** - 100% coverage for fallback logic
60 | - Test file: `tests/test_fallback_quality.py`
61 | - Test classes: FallbackConfiguration, MetadataCodec, FallbackScoringLogic, FallbackPerformance
62 | - Validates: Configuration validation, threshold logic, decision paths, metadata encoding/decoding
63 | - Performance benchmarks: DeBERTa-only path (<200ms), full fallback path (<500ms)
64 |
65 | ### Changed
66 | - **Quality Evaluator Architecture** - Multi-model support in single evaluator
67 | - `QualityEvaluator._onnx_models` dict stores multiple models simultaneously
68 | - `_ensure_initialized()` loads both models when fallback enabled
69 | - `_score_with_fallback()` implements threshold-based decision logic
70 | - `evaluate_quality()` uses fallback when `config.fallback_enabled` and `len(_onnx_models) >= 2`
71 |
72 | ### Technical Details
73 | - **Decision Logic**:
74 | ```python
75 | # Step 1: Always score with DeBERTa first
76 | deberta_score = deberta.score_quality("", content)
77 |
78 | # Step 2: If DeBERTa confident, use it
79 | if deberta_score >= 0.6:
80 | return deberta_score # MS-MARCO not consulted
81 |
82 | # Step 3: DeBERTa low - try MS-MARCO rescue
83 | ms_marco_score = ms_marco.score_quality(query, content)
84 | if ms_marco_score >= 0.7:
85 | return ms_marco_score # Rescue technical content
86 |
87 | # Step 4: Both agree low quality
88 | return deberta_score
89 | ```
90 |
91 | - **Files Modified** (3):
92 | - `src/mcp_memory_service/quality/config.py` - Fallback configuration, threshold validation
93 | - `src/mcp_memory_service/quality/ai_evaluator.py` - Multi-model loading, fallback logic
94 | - `src/mcp_memory_service/quality/metadata_codec.py` - Provider codes, decision encoding
95 |
96 | - **Files Created** (2):
97 | - `scripts/quality/rescore_fallback.py` - Bulk re-evaluation script
98 | - `tests/test_fallback_quality.py` - Comprehensive test suite
99 |
100 | ### Performance Expectations
101 | - **Decision Distribution** (estimated):
102 | - DeBERTa confident: ~40% (prose, high-quality content) - Fast path (115ms)
103 | - MS-MARCO rescue: ~35% (technical content saved) - Full path (155ms)
104 | - Both low: ~25% (garbage, fragments) - Full path (155ms)
105 |
106 | - **Quality Improvements** (expected):
107 | - Technical content: 0.48 → 0.70-0.80 (+45-65%)
108 | - Prose content: 0.82 → 0.82 (no degradation)
109 | - High quality (≥0.7): 0.4% → 20-30% (50-75x increase)
110 |
111 | ### Important Discovery - MS-MARCO Limitations (Post-Implementation)
112 |
113 | **Problem Identified**: MS-MARCO cannot perform absolute quality assessment
114 | - MS-MARCO is a **query-document relevance model**, not a quality classifier
115 | - Empty query returns 0.000 (no signal)
116 | - Generic query ("high quality content") returns 0.000 (no signal)
117 | - Self-matching query (content as query) returns 1.000 (100% bias)
118 | - Only meaningful related queries work (but introduce bias)
119 |
120 | **Root Cause**: Cross-encoder architecture requires query-document pairs for relevance ranking, cannot evaluate intrinsic quality
121 |
122 | **Impact**: Fallback approach as designed is fundamentally incompatible with MS-MARCO's training objective
123 |
124 | ### Recommended Configuration (Updated After Threshold Testing)
125 |
126 | **✅ RECOMMENDED: Implicit Signals Only (Technical Corpora)**
127 |
128 | For technical note corpora (fragments, file paths, abbreviations, task lists):
129 |
130 | ```bash
131 | # Disable AI quality scoring (DeBERTa bias toward prose)
132 | export MCP_QUALITY_AI_PROVIDER=none
133 |
134 | # Quality based on implicit signals (access patterns, recency, retrieval ranking)
135 | export MCP_QUALITY_SYSTEM_ENABLED=true
136 | export MCP_QUALITY_BOOST_ENABLED=false # Implicit signals only, no AI combination
137 | ```
138 |
139 | **Why This Works for Technical Content**:
140 | - **Access patterns = true quality** - Heavily-used memories are valuable, regardless of prose style
141 | - **No prose bias** - File paths, abbreviations, fragments treated fairly
142 | - **Simpler** - No model loading, no inference latency
143 | - **Self-learning** - Quality improves based on actual usage
144 |
145 | **Threshold Test Results** (50-sample analysis):
146 | - Average DeBERTa score: 0.209 (median: 0.165)
147 | - Only 4% scored ≥ 0.6 (good prose)
148 | - 72% scored < 0.4 (includes valuable technical fragments!)
149 | - Manual inspection: "Garbage" category contained valid technical references
150 |
151 | **Conclusion**: DeBERTa is trained on Wikipedia/news and systematically under-scores:
152 | - File paths and references (`modules/siem/dcr-linux-nginx.tf`)
153 | - Technical abbreviations (SAP, SIEM, CLI)
154 | - Fragmented notes and lists
155 | - Code-adjacent documentation
156 |
157 | **Alternative for Prose-Heavy Corpora**: DeBERTa with Lower Threshold
158 | ```bash
159 | # Only use for narrative documentation, blog posts, etc.
160 | export MCP_QUALITY_AI_PROVIDER=local
161 | export MCP_QUALITY_LOCAL_MODEL=nvidia-quality-classifier-deberta
162 | export MCP_QUALITY_DEBERTA_THRESHOLD=0.4 # Or 0.3 for more tolerance
163 | ```
164 |
165 | **When to Use AI Scoring**:
166 | - ✅ Long-form documentation (prose paragraphs)
167 | - ✅ Blog posts, articles, tutorials
168 | - ✅ Narrative meeting notes
169 | - ❌ Technical fragments, file references (use implicit signals)
170 | - ❌ Code comments, CLI output (use implicit signals)
171 | - ❌ Task lists, tickets (use implicit signals)
172 |
173 | **⚠️ NOT RECOMMENDED: Fallback Mode**
174 | The fallback implementation remains available for experimentation, but MS-MARCO's architecture makes it unsuitable for this use case. Future work may explore alternative rescue strategies (implicit signals, different models).
175 |
176 | ## [8.49.0] - 2025-12-09
177 |
178 | ### Changed
179 | - **NVIDIA DeBERTa Quality Classifier** - Replaced MS-MARCO with DeBERTa for absolute quality assessment (resolves #268)
180 | - **Model Upgrade**: Changed default from `ms-marco-MiniLM-L-6-v2` (23MB) to `nvidia-quality-classifier-deberta` (450MB)
181 | - **Architecture**: 3-class classifier (Low/Medium/High) for query-independent quality evaluation
182 | - **Eliminates Self-Matching Bias**: No query needed, evaluates content directly (~25% false positive reduction)
183 | - **Improved Distribution**: Mean score 0.60-0.70 (vs 0.469), uniform spread (vs bimodal clustering)
184 | - **Fewer False Positives**: <5% perfect 1.0 scores (vs 20% with MS-MARCO)
185 | - **Performance**: 80-150ms CPU, 20-40ms GPU (CUDA/MPS/DirectML) - ~20% slower but significantly more accurate
186 | - **Backward Compatible**: MS-MARCO still available via `MCP_QUALITY_LOCAL_MODEL=ms-marco-MiniLM-L-6-v2`
187 |
188 | ### Added
189 | - **Multi-Model ONNX Architecture** - Support for both classifier and cross-encoder models
190 | - Model registry in `src/mcp_memory_service/quality/config.py` with metadata (model type, size, inputs, output classes)
191 | - Model-specific scoring logic in `onnx_ranker.py`: softmax for classifiers, sigmoid for cross-encoders
192 | - `validate_model_selection()` function to validate user model choices
193 | - Environment variable: `MCP_QUALITY_LOCAL_MODEL` to switch between models
194 |
195 | - **DeBERTa Export Script** - One-time model download and ONNX conversion
196 | - Script: `scripts/quality/export_deberta_onnx.py`
197 | - Downloads 450MB model from HuggingFace, exports to ONNX format
198 | - Caches at: `~/.cache/mcp_memory/onnx_models/nvidia-quality-classifier-deberta/`
199 | - Includes test inference for validation
200 |
201 | - **Migration Script** - Re-evaluate existing memories with DeBERTa
202 | - Script: `scripts/quality/migrate_to_deberta.py`
203 | - Compares MS-MARCO vs DeBERTa distributions with statistical analysis
204 | - Preserves original scores in `quality_migration` metadata for rollback
205 | - Tracks score deltas (increases, decreases, stable memories)
206 | - Expected time: 10-20 minutes for 4,000-5,000 memories
207 |
208 | - **Comprehensive Test Suite** - 100+ tests for both models
209 | - Test file: `tests/test_deberta_quality.py`
210 | - Test classes: ModelRegistry, DeBERTaIntegration, BackwardCompatibility, Performance
211 | - Validates: Query-independence, 3-class output mapping, absolute quality scoring
212 | - Benchmarks: Inference speed, performance comparison vs MS-MARCO
213 |
214 | ### Fixed
215 | - **Quality Scoring**: Fixed double-softmax bug in ONNX ranker (was applying softmax twice, causing artificially low scores)
216 | - **Quality Scoring**: Corrected inverted class label mapping (High=0, Medium=1, Low=2, not [Low, Medium, High])
217 | - **Bulk Evaluation**: Added missing logging import in `scripts/quality/bulk_evaluate_onnx.py`
218 | - **Migration Script**: Created optimized `scripts/quality/rescore_deberta.py` using direct SQLite access to avoid network timeouts during bulk re-scoring
219 |
220 | ### Performance
221 | - New content quality scores: 0.749 avg (vs 0.469 baseline, +60% improvement)
222 | - High quality identifications: 75.7% (vs 32.2% baseline, 2.4x improvement)
223 | - Inference time: 44ms CPU / 20-40ms GPU (expected with CUDA/MPS/DirectML)
224 | - Performance ratio: 7.8x slower than MS-MARCO (acceptable for quality gains)
225 |
226 | ### Documentation
227 | - **Memory Quality Guide** - Updated with DeBERTa model comparison and migration guide
228 | - Replaced ONNX limitations section with multi-model architecture
229 | - Added DeBERTa vs MS-MARCO performance metrics table
230 | - Migration instructions and GPU acceleration documentation
231 | - Location: `docs/guides/memory-quality-guide.md`
232 |
233 | - **Configuration Examples** - Added Configuration 9 (DeBERTa recommended setup)
234 | - Updated Configuration 1 to reflect DeBERTa as default
235 | - Best practices for v8.49.0+ vs v8.48.x (MS-MARCO)
236 | - Location: `docs/examples/quality-system-configs.md`
237 |
238 | - **CLAUDE.md** - Updated with v8.49.0 release notes and configuration examples
239 | - Architecture section now lists both DeBERTa (default) and MS-MARCO (legacy)
240 | - Configuration section shows DeBERTa as default model
241 | - Quality boost now recommended (more accurate with DeBERTa)
242 |
243 | ### Technical Details
244 | - **Files Modified** (3):
245 | - `src/mcp_memory_service/quality/config.py` - Model registry, default changed to DeBERTa
246 | - `src/mcp_memory_service/quality/onnx_ranker.py` - Multi-model support with classifier/cross-encoder branching
247 | - `scripts/quality/bulk_evaluate_onnx.py` - Model type detection for query strategy
248 |
249 | - **Files Created** (3):
250 | - `scripts/quality/export_deberta_onnx.py` - DeBERTa export script
251 | - `scripts/quality/migrate_to_deberta.py` - Migration script with statistics
252 | - `tests/test_deberta_quality.py` - Comprehensive test suite (100+ tests)
253 |
254 | - **Key Implementation**: Softmax 3-class scoring
255 | ```python
256 | # DeBERTa: weighted score from 3-class probabilities
257 | score = 0.0 × P(low) + 0.5 × P(medium) + 1.0 × P(high)
258 |
259 | # MS-MARCO: sigmoid binary score
260 | score = 1.0 / (1.0 + exp(-logit))
261 | ```
262 |
263 | ## [8.48.4] - 2025-12-08
264 |
265 | ### Fixed
266 | - **Cloudflare D1 Drift Detection Performance** - Fixed slow/failing queries in hybrid backend drift detection (issue #264)
267 | - **Root Cause**: `get_memories_updated_since()` used slow ISO string comparison (`updated_at_iso > ?`) instead of fast numeric comparison
268 | - **Fix**: Changed WHERE clause to use indexed `updated_at` column with numeric comparison (`updated_at > ?`)
269 | - **Performance Impact**: 10-100x faster queries, eliminates D1 timeout/400 Bad Request errors on large datasets
270 | - **Affected Function**: `CloudflareStorage.get_memories_updated_since()` (lines 1638-1667)
271 | - **Location**: `src/mcp_memory_service/storage/cloudflare.py`
272 | - **Credit**: Root cause analysis by Claude Code workflow (GitHub Actions)
273 |
274 | ## [8.48.3] - 2025-12-08
275 |
276 | ### Fixed
277 | - **Code Execution Hook Failure** - Fixed session-start hook falling back to MCP tools instead of using fast Code Execution API
278 | - **Root Cause 1**: Invalid `time_filter` parameter passed to `search()` function (API signature only accepts `query`, `limit`, `tags`)
279 | - **Root Cause 2**: Python `transformers` library emitted `FutureWarning` to stderr, causing `execSync()` to fail
280 | - **Root Cause 3**: Installer used system `python3` instead of detecting venv Python path
281 | - **Fix 1**: Removed time_filter parameter from Code Execution queries (line 325 in `claude-hooks/core/session-start.js`)
282 | - **Fix 2**: Added `-W ignore` flag to suppress Python warnings during execution (line 359)
283 | - **Fix 3**: Updated installer to use `sys.executable` for automatic venv detection (`claude-hooks/install_hooks.py:271-299`)
284 | - **Impact**: 75% token reduction per session start (1200-2400 tokens → 300-600 tokens with Code Execution)
285 | - **Behavior**: Hook now successfully uses Code Execution API instead of falling back to slower MCP tools
286 | - **Documentation**: Added memory with troubleshooting guide for future reference
287 | - **Location**: `claude-hooks/core/session-start.js:315-363`, `claude-hooks/install_hooks.py:271-299`
288 |
289 | ### Changed
290 | - **Session-Start Hook Connection Timeout** - Increased quick connection timeout from 2s to 5s
291 | - Prevents premature timeout during memory client initialization
292 | - Allows more time for HTTP server connection during high-load periods
293 | - Location: `~/.claude/hooks/core/session-start.js:750` (user installation)
294 |
295 | ## [8.48.2] - 2025-12-08
296 |
297 | ### Added
298 | - **HTTP Server Auto-Start System** - Smart service management with comprehensive health checks
299 | - Created `scripts/service/http_server_manager.sh` with 376 lines of robust service management
300 | - Orphaned process detection and cleanup (handles stale PIDs from crashes/force kills)
301 | - Version mismatch detection (alerts when installed version differs from running version)
302 | - Config change detection (monitors .env file modification timestamps, triggers restart on changes)
303 | - Hybrid storage initialization wait (10-second timeout ensures storage backends are ready)
304 | - Health check with retry logic (3 attempts with 2s intervals before declaring failure)
305 | - Commands: `status`, `start`, `stop`, `restart`, `auto-start`, `logs`
306 | - Shell integration support (add to ~/.zshrc for automatic startup on terminal launch)
307 | - Location: `scripts/service/http_server_manager.sh`
308 |
309 | - **Session-Start Hook Health Check** - Proactive HTTP server availability monitoring
310 | - Added health check warning in `~/.claude/hooks/core/session-start.js` (lines 657-674)
311 | - Displays clear error message when HTTP server is unreachable
312 | - Provides actionable fix instructions (how to start server, how to enable auto-start)
313 | - Detects connection errors: ECONNREFUSED, fetch failed, network errors, timeout
314 | - Non-blocking check (warns but doesn't block Claude Code session initialization)
315 | - Location: `~/.claude/hooks/core/session-start.js:657-674`
316 |
317 | ### Fixed
318 | - **Time Parser "Last N Periods" Support** - Fixed issue #266 (time expressions not working)
319 | - Added new regex pattern `last_n_periods` to match "last N days/weeks/months/years"
320 | - Implemented `get_last_n_periods_range(n, period)` function for date calculations
321 | - Pattern positioning: Checked BEFORE `last_period` pattern to match more specific expressions first
322 | - Properly handles:
323 | - "last 3 days" → From 3 days ago 00:00:00 to now
324 | - "last 2 weeks" → From 2 weeks ago Monday 00:00:00 to now
325 | - "last 1 month" → From 1 month ago first day 00:00:00 to now
326 | - "last 5 years" → From 5 years ago Jan 1 00:00:00 to now
327 | - Backward compatible with existing "last week", "last month" patterns
328 | - Location: `src/mcp_memory_service/utils/time_parser.py`
329 |
330 | ### Changed
331 | - **Hook Configuration Time Windows** - Reverted to "last 3 days" (now works with parser fix)
332 | - Applied to `recentTimeWindow` and `fallbackTimeWindow` in hook config
333 | - Previously limited to "yesterday" due to parser bug
334 | - Now leverages full 3-day context window for better memory recall
335 | - Location: `~/.claude/hooks/config.json`
336 |
337 | ### Technical Details
338 | - **HTTP Server Manager Architecture**:
339 | - PID tracking via `/tmp/mcp_memory_http.pid` (shared location for orphan detection)
340 | - Config fingerprinting via MD5 hash of `.env` file (detects credential/backend changes)
341 | - Version extraction from installed package (compares with runtime version)
342 | - Log rotation support (tails last 50 lines from `~/.mcp-memory-service/http_server.log`)
343 | - SIGTERM graceful shutdown (10s timeout before SIGKILL)
344 | - Auto-start function for shell integration (idempotent, safe for rc files)
345 |
346 | - **Time Parser Improvements**:
347 | - Regex pattern: `r'last\s+(\d+)\s+(days?|weeks?|months?|years?)'`
348 | - Handles singular/plural forms (day/days, week/weeks, etc.)
349 | - Week boundaries: Monday 00:00:00 (ISO 8601 standard)
350 | - Month boundaries: First day 00:00:00 (calendar month alignment)
351 | - Fallback behavior: Interprets unknown periods as days (defensive programming)
352 |
353 | - **Testing Coverage**:
354 | - HTTP server manager: Tested status/start/stop/restart/auto-start commands
355 | - Orphaned process cleanup: Verified detection and cleanup of stale PIDs
356 | - Version mismatch: Confirmed detection when installed vs running version differs
357 | - Config change detection: Verified restart trigger on .env modification
358 | - Time parser: Tested "last 3 days", "last 2 weeks", "last 1 month", "last 5 years"
359 | - Backward compatibility: Verified "last week", "last month" still work
360 |
361 | ## [8.48.1] - 2025-12-08
362 |
363 | ### Fixed
364 | - **CRITICAL: Service Startup Failure** - Fixed fatal `UnboundLocalError` that prevented v8.48.0 from starting
365 | - **Root Cause**: Redundant local `import calendar` statement at line 84 in `src/mcp_memory_service/models/memory.py`
366 | - **Python Scoping Issue**: Local import declaration made `calendar` a local variable within `iso_to_float()` function
367 | - **Error Location**: Exception handler at line 168 referenced `calendar` before the local import statement was executed
368 | - **Impact**: Service entered infinite loop during Cloudflare sync initialization, repeating error every ~100ms
369 | - **Symptoms**: Health endpoint unresponsive, dashboard inaccessible, all MCP Memory Service functionality unavailable
370 | - **Resolution**: Removed redundant local import (module already imported globally at line 21)
371 | - **Severity**: CRITICAL - All v8.48.0 users affected, immediate upgrade required
372 | - **Migration**: Drop-in replacement, no configuration changes needed
373 | - Location: `src/mcp_memory_service/models/memory.py:84` (removed)
374 |
375 | ### Technical Details
376 | - **Error Message**: `UnboundLocalError: cannot access local variable 'calendar' where it is not associated with a value`
377 | - **Frequency**: Repeating continuously (~100ms intervals) during Cloudflare hybrid backend initialization
378 | - **Testing**: Service now starts successfully, health endpoint responds correctly, Cloudflare sync completes without errors
379 | - **Verification**: No timestamp parsing errors in logs, dashboard accessible at https://localhost:8000
380 |
381 | ## [8.48.0] - 2025-12-07
382 |
383 | ### Added
384 | - **CSV-Based Metadata Compression** - Intelligent metadata compression system for Cloudflare sync operations
385 | - Implemented CSV encoding/decoding for quality and consolidation metadata
386 | - Achieved 78% size reduction (732B → 159B typical case)
387 | - Provider code mapping (onnx_local → ox, groq_llama3_70b → gp, etc.) for 70% reduction in provider field
388 | - Metadata size validation (<9.5KB) prevents sync failures before Cloudflare API calls
389 | - Transparent compression/decompression in hybrid backend operations
390 | - Quality metadata optimizations:
391 | - ai_scores history limited to 3 most recent entries (10 → 3)
392 | - quality_components removed from sync (debug-only, reconstructible)
393 | - Cloudflare-specific field suppression (metadata_source, last_quality_check)
394 | - Location: `src/mcp_memory_service/quality/metadata_codec.py`
395 |
396 | - **Verification Script** - Shell script to verify compression effectiveness
397 | - Tests CSV encoding/decoding round-trip accuracy
398 | - Measures compression ratios
399 | - Validates metadata size under Cloudflare limits
400 | - Location: `verify_compression.sh`
401 |
402 | ### Fixed
403 | - **Cloudflare Sync Failures** - Resolved 100% of metadata size limit errors
404 | - Problem: Cloudflare D1 10KB metadata limit was exceeded by quality/consolidation metadata
405 | - Impact: 1 operation stuck in retry queue with 400 Bad Request errors
406 | - Root cause: Uncompressed metadata (ai_scores history, quality_components) exceeded limit
407 | - Solution: CSV compression + metadata size validation before sync
408 | - Result: 0 sync failures, all operations processing successfully
409 | - Locations: `src/mcp_memory_service/storage/hybrid.py` (lines 547-559, 77-119), `src/mcp_memory_service/storage/cloudflare.py` (lines 606-612, 741-747, 830-836, 1474-1480)
410 |
411 | ### Technical Details
412 | - **Compression Architecture**: Phase 1 of 3-phase metadata optimization plan
413 | - Phase 1 (COMPLETE): CSV-based compression for quality/consolidation metadata
414 | - Phase 2 (AVAILABLE): Binary encoding with struct/msgpack (85-90% reduction target)
415 | - Phase 3 (AVAILABLE): Reference-based deduplication for repeated values
416 | - **Backward Compatibility**: Fully transparent - automatic compression on write, decompression on read
417 | - **Performance Impact**: Negligible (<1ms overhead per operation)
418 | - **Testing**: All quality system tests passing, sync queue empty, 3,750 ONNX-scored memories verified
419 |
420 | ## [8.47.1] - 2025-12-07
421 |
422 | ### Fixed
423 | - **ONNX Self-Match Bug** - ONNX bulk evaluation was using memory content as its own query, producing artificially inflated scores (~1.0 for all memories)
424 | - Root cause: Cross-encoder design requires meaningful query-memory pairs for relevance ranking
425 | - Fixed by generating queries from tags/metadata (what memory is *about*) instead of memory content
426 | - Result: Realistic quality distribution (avg 0.468 vs 1.000, breakdown: 42.9% high / 3.2% medium / 53.9% low)
427 | - Location: `scripts/quality/bulk_evaluate_onnx.py`
428 |
429 | - **Association Pollution** - System-generated associations and compressed clusters were being evaluated for quality
430 | - These memories are structural (not content) and shouldn't receive quality scores
431 | - Fixed by filtering memories with type='association' or type='compressed_cluster'
432 | - Added belt-and-suspenders check for 'source_memory_hashes' metadata field
433 | - Impact: 948 system-generated memories excluded from evaluation
434 | - Location: `scripts/quality/bulk_evaluate_onnx.py`
435 |
436 | - **Sync Queue Overflow** - Queue capacity of 1,000 was overwhelmed by 4,478 updates during bulk ONNX evaluation
437 | - Resulted in 278 Cloudflare sync failures (27.8% failure rate)
438 | - Fixed by increasing queue size to 2,000 (env: `MCP_HYBRID_QUEUE_SIZE`)
439 | - Fixed by increasing batch size to 100 (env: `MCP_HYBRID_BATCH_SIZE`)
440 | - Added 5-second timeout with fallback to immediate sync on queue full
441 | - Added `wait_for_sync_completion()` method for monitoring bulk operations
442 | - Result: 0% sync failure rate during bulk operations
443 | - Location: `src/mcp_memory_service/storage/hybrid.py`, `src/mcp_memory_service/config.py`
444 |
445 | - **Consolidation Hang** - Batch update optimization was missing for relevance score updates
446 | - Sequential update_memory() calls caused slowdown during consolidation
447 | - Fixed by collecting updates and using single `update_memories_batch()` transaction
448 | - Impact: 50-100x speedup for relevance score updates during consolidation
449 | - Location: `src/mcp_memory_service/consolidation/consolidator.py`
450 |
451 | ### Added
452 | - **Reset ONNX Scores Script** (`scripts/quality/reset_onnx_scores.py`)
453 | - Resets all ONNX quality scores to implicit defaults (0.5)
454 | - Pauses hybrid backend sync during reset, resumes after completion
455 | - Preserves timestamps (doesn't change created_at/updated_at)
456 | - Progress reporting every 500 memories
457 | - Use case: Recover from bad ONNX evaluation (self-match bug)
458 |
459 | - **Enhanced Bulk Evaluate Script** (`scripts/quality/bulk_evaluate_onnx.py`)
460 | - Added association filtering (skip system-generated memories)
461 | - Added sync monitoring with queue size reporting
462 | - Added wait_for_sync_completion() call to prevent premature exit
463 | - Enhanced progress reporting with sync stats
464 | - Proper pause/resume for hybrid backend sync
465 |
466 | ### Changed
467 | - **ONNX Configuration Defaults** - Updated for better bulk operation support
468 | - `HYBRID_QUEUE_SIZE`: 1,000 → 2,000 (default, configurable via env)
469 | - `HYBRID_BATCH_SIZE`: 50 → 100 (default, configurable via env)
470 | - Backward compatible: `HYBRID_MAX_QUEUE_SIZE` still supported (legacy)
471 |
472 | - **Hybrid Backend Sync** - Enhanced pause/resume state tracking
473 | - Added `_sync_paused` flag to prevent enqueuing during pause (v8.47.1)
474 | - Fixed race condition where operations were enqueued while sync was paused
475 | - Ensures operations are not lost during consolidation or bulk updates
476 |
477 | ### Documentation
478 | - **ONNX Limitations** - Added critical warning to CLAUDE.md
479 | - Documented that ONNX ranker (ms-marco-MiniLM-L-6-v2) is a cross-encoder
480 | - Clarified it scores query-memory relevance, not absolute quality
481 | - Explained why self-matching queries produce artificially high scores
482 | - Added system-generated memory exclusion rationale
483 |
484 | ## [8.47.0] - 2025-12-06
485 |
486 | ### Added
487 | - **Association-Based Quality Boost** - Memories with many connections automatically receive quality score boosts during consolidation
488 | - Well-connected memories (≥5 connections by default) get 20% quality boost
489 | - Leverages network effect: frequently referenced memories are likely more valuable
490 | - Configurable via environment variables: `MCP_CONSOLIDATION_QUALITY_BOOST_ENABLED`, `MCP_CONSOLIDATION_MIN_CONNECTIONS_FOR_BOOST`, `MCP_CONSOLIDATION_QUALITY_BOOST_FACTOR`
491 | - Valid boost factor range: 1.0-2.0 (default: 1.2 = 20% boost)
492 | - Quality scores capped at 1.0 to prevent over-promotion
493 | - Full metadata persistence with audit trail (connection count, original scores, boost date, boost reason)
494 | - Impact: Boosted quality affects relevance scoring (~4% increase) and retention tier (can move from medium to high retention)
495 | - Location: `src/mcp_memory_service/consolidation/decay.py`
496 |
497 | - **Quality Boost Metadata Tracking** - Complete audit trail for all quality boosts applied during consolidation
498 | - `quality_boost_applied`: Boolean flag indicating boost was applied
499 | - `quality_boost_date`: ISO timestamp of when boost occurred
500 | - `quality_boost_reason`: Always "association_connections" for this release
501 | - `quality_boost_connection_count`: Number of connections that triggered the boost
502 | - `original_quality_before_boost`: Preserved original quality score for analysis
503 |
504 | - **Configuration Variables** - Three new environment variables with validation
505 | - `MCP_CONSOLIDATION_QUALITY_BOOST_ENABLED` (default: true) - Master toggle
506 | - `MCP_CONSOLIDATION_MIN_CONNECTIONS_FOR_BOOST` (default: 5, range: 1-100) - Minimum connections required
507 | - `MCP_CONSOLIDATION_QUALITY_BOOST_FACTOR` (default: 1.2, range: 1.0-2.0) - Boost multiplier
508 |
509 | ### Changed
510 | - **Exponential Decay Calculation** - Enhanced to include association-based quality boost
511 | - Quality boost applied before quality multiplier calculation
512 | - Debug logging for each boost application
513 | - Info logging when persisting boosted scores to memory metadata
514 | - Preserved original quality score in RelevanceScore metadata for comparison
515 |
516 | - **Memory Relevance Metadata** - Extended to include quality boost tracking
517 | - `update_memory_relevance_metadata()` now persists boosted quality scores
518 | - Automatic quality score update if boost was applied
519 | - Metadata fields added: `quality_boost_applied`, `quality_boost_date`, `quality_boost_reason`, etc.
520 |
521 | ### Documentation
522 | - Added comprehensive feature guide: `docs/features/association-quality-boost.md`
523 | - Configuration examples (conservative, balanced, aggressive)
524 | - Impact on memory lifecycle (relevance, retention, forgetting resistance)
525 | - Use cases (knowledge graphs, code documentation, research notes)
526 | - Monitoring and troubleshooting guides
527 | - Performance impact analysis (negligible computational cost)
528 | - Future enhancement roadmap (connection quality analysis, temporal decay, bidirectional boost)
529 |
530 | - Updated `CLAUDE.md` with v8.47.0 release information
531 | - Added association-based quality boost to consolidation features list
532 | - Added configuration examples with environment variables
533 | - Updated version summary at top of file
534 |
535 | ### Tests
536 | - Added 5 comprehensive test cases in `tests/consolidation/test_decay.py`
537 | - `test_association_quality_boost_enabled`: Validates boost increases scores
538 | - `test_association_quality_boost_threshold`: Confirms minimum connection enforcement
539 | - `test_association_quality_boost_caps_at_one`: Verifies quality cap at 1.0
540 | - `test_association_quality_boost_disabled`: Tests feature disable functionality
541 | - `test_association_quality_boost_persists_to_memory`: Validates metadata persistence
542 | - All tests use monkeypatch for configuration override
543 | - 100% test pass rate (5/5 new tests, 17/18 total consolidation tests)
544 |
545 | ### Technical Details
546 | - Feature enabled by default to provide immediate value
547 | - Boost calculation time: ~5-10 microseconds per memory (negligible overhead)
548 | - Memory overhead: ~200 bytes per boosted memory (5 metadata fields)
549 | - No measurable impact on consolidation duration
550 | - Integration point: `ExponentialDecayCalculator._calculate_memory_relevance()`
551 | - Quality boost applied BEFORE quality multiplier calculation in relevance scoring
552 | - Boost only applied if: enabled, connection count ≥ threshold, boost would increase score
553 | - Future-proof: `MCP_CONSOLIDATION_MIN_CONNECTED_QUALITY` reserved for Phase 2 (connection quality analysis)
554 |
555 | ## [8.46.3] - 2025-12-06
556 |
557 | ### Fixed
558 | - **Quality Score Persistence in Hybrid Backend** - Fixed ONNX quality scores not persisting to Cloudflare in hybrid storage backend
559 | - Scores remained at default 0.5 instead of evaluated ~1.0 values
560 | - Root cause: `/api/quality/evaluate` endpoint was passing entire `memory.metadata` dict to `update_memory_metadata()`
561 | - Cloudflare backend expects quality fields wrapped in 'metadata' key, not as top-level fields
562 |
563 | - **Metadata Normalization for Cloudflare** - Added `_normalize_metadata_for_cloudflare()` helper function
564 | - Separates Cloudflare-recognized top-level keys (metadata, memory_type, tags, timestamps) from custom metadata fields
565 | - Wraps custom fields in 'metadata' key as expected by Cloudflare D1 backend
566 | - Only wraps if not already wrapped (idempotent operation)
567 |
568 | - **Quality API Metadata Handling** - Modified `/api/quality/evaluate` endpoint to extract only quality-related fields
569 | - Now passes only: quality_score, quality_provider, ai_scores, quality_components
570 | - Prevents accidental metadata overwrites from passing entire metadata dict
571 | - Added detailed logging for troubleshooting persistence issues
572 |
573 | - **Hybrid Backend Sync Operation** - Enhanced `SyncOperation` dataclass with `preserve_timestamps` flag
574 | - Ensures timestamp preservation through background sync queue
575 | - Passes flag to Cloudflare backend during update operations
576 | - Maintains temporal consistency across hybrid backends
577 |
578 | ### Technical Details
579 | - Affects only hybrid backend with Cloudflare secondary storage
580 | - SQLite-vec primary storage was working correctly (scores persisted locally)
581 | - Issue manifested during background sync to Cloudflare D1
582 | - Verification: Search results now show quality scores of 1.000 instead of 0.500
583 |
584 | ## [8.46.2] - 2025-12-06
585 |
586 | ### Fixed
587 | - **Session-Start Hook Crash** - Added missing `queryMemoriesByTagsAndTime()` function to HTTP memory client
588 | - Hook was calling undefined function, causing "is not a function" error on session start
589 | - Implemented client-side tag filtering on time-based search results
590 | - Works with both HTTP and MCP protocols
591 | - Enables users to use session-start hooks without crashes
592 |
593 | - **Hook Installer Warnings Eliminated** - Removed confusing package import warnings during installation
594 | - Created `_version.py` to isolate version metadata from main package
595 | - Updated `install_hooks.py` to read version from `pyproject.toml` (avoids heavy imports)
596 | - Warnings appeared because importing `mcp_memory_service` loaded sqlite-vec/sentence_transformers dependencies
597 | - Provides clean installation experience without misleading warnings
598 |
599 | ### Technical Details
600 | - Root cause (session-start): `memory-client.js` missing function implementation for combined tag+time queries
601 | - Root cause (installer warnings): Hook installer imported main package for version detection, triggering model initialization warnings
602 | - Fix applies to all platforms (Windows, macOS, Linux)
603 |
604 | ## [8.46.1] - 2025-12-06
605 |
606 | ### Fixed
607 | - **Windows Hooks Installer Encoding** - Fixed `'charmap' codec can't encode character` error when running `install_hooks.py` on Windows
608 | - Added UTF-8 console configuration (CP65001) at script startup
609 | - Reconfigured stdout/stderr with `encoding='utf-8', errors='replace'`
610 | - Added explicit `encoding='utf-8'` to all JSON file read/write operations
611 | - Added `ensure_ascii=False` to `json.dump()` for proper Unicode handling
612 |
613 | ### Technical Details
614 | - Root cause: Windows console default encoding (CP1252) doesn't support Unicode emojis (✅, ⚠️, etc.)
615 | - Fix applies to all Windows systems regardless of console code page setting
616 |
617 | ## [8.46.0] - 2025-12-06
618 |
619 | ### Added
620 | - **Quality System + Hooks Integration** - Complete 3-phase integration of AI quality scoring into memory awareness hooks:
621 | - **Phase 1**: Hooks read `backendQuality` from memory metadata (20% weight in scoring)
622 | - **Phase 2**: Session-end hook triggers async `/api/quality/memories/{hash}/evaluate` endpoint
623 | - **Phase 3**: Quality-boosted search with `quality_boost` and `quality_weight` parameters
624 |
625 | - **`POST /api/quality/memories/{hash}/evaluate`** - New endpoint to trigger AI-based quality evaluation
626 | - Uses multi-tier system (ONNX local → Groq → Gemini → Implicit)
627 | - Returns quality_score, quality_provider, ai_score, evaluation_time_ms
628 | - Performance: ~355ms with ONNX ranker
629 |
630 | - **Quality-Boosted Search** - Added `quality_boost` and `quality_weight` to `/api/search`
631 | - Over-fetches 3x results, reranks with composite score
632 | - Formula: `(1-weight)*semantic + weight*quality`
633 | - Returns `search_type: "semantic_quality_boost"` with score breakdown
634 |
635 | - **Hook Integration Functions**
636 | - `calculateBackendQuality()` in `memory-scorer.js` extracts quality_score from metadata
637 | - `triggerQualityEvaluation()` in `session-end.js` for async scoring
638 | - `queryMemories()` in `memory-client.js` supports `qualityBoost` option
639 |
640 | ### Changed
641 | - Updated hook scoring weights: timeDecay (20%), tagRelevance (30%), contentRelevance (10%), contentQuality (20%), backendQuality (20%)
642 |
643 | ### Technical Details
644 | - Hook evaluation: Non-blocking with 10s timeout, graceful fallback on failure
645 | - Requires Memory Quality System (v8.45.0+) to be enabled
646 |
647 | ## [8.45.3] - 2025-12-06
648 |
649 | ### Fixed
650 | - **ONNX Ranker Model Export** - Fixed broken model download URL (404 from HuggingFace) by implementing automatic model export from transformers to ONNX format on first use
651 | - **Offline Mode Support** - Added `local_files_only=True` support for air-gapped/offline environments using cached HuggingFace models
652 | - **Tokenizer Loading** - Fixed tokenizer initialization to load from exported pretrained files instead of broken archive
653 |
654 | ### Changed
655 | - Replaced failing `onnx.tar.gz` download approach with dynamic export from `cross-encoder/ms-marco-MiniLM-L-6-v2` via transformers
656 | - Model now exports to `~/.cache/mcp_memory/onnx_models/ms-marco-MiniLM-L-6-v2/model.onnx` on first initialization
657 | - Added graceful fallback: tries `local_files_only` first, then online download if not cached
658 |
659 | ### Technical Details
660 | - Performance: 7-16ms per memory scoring on CPU (CPUExecutionProvider)
661 | - Model size: ~23MB exported ONNX model
662 | - Dependencies: Requires `transformers`, `torch`, `onnxruntime`, `onnx` packages
663 |
664 | ## [8.45.2] - 2025-12-06
665 |
666 | ### Fixed
667 | - **Dashboard Dark Mode Consistency** - Fixed dark mode regression where form controls, select elements, and view buttons had white/light backgrounds in dark mode
668 | - **Global Dark Mode CSS** - Added comprehensive `.form-control` and `.form-select` dark mode overrides ensuring consistency across all 7 dashboard tabs (Dashboard, Search, Browse, Documents, Manage, Analytics, Quality)
669 | - **Quality Tab Chart Contrast** - Improved chart readability in dark mode with proper `var(--neutral-400)` backgrounds and visible grid lines
670 | - **Chart.js Dark Mode Support** - Added dynamic Chart.js color configuration in `applyTheme()` function with light text (#f9fafb) and proper legend colors
671 | - **Quality Distribution Chart** - Updated `renderQualityDistributionChart()` with dynamic text/grid colors for dark mode
672 | - **Quality Provider Chart** - Updated `renderQualityProviderChart()` with dark mode-aware legend colors
673 |
674 | ### Changed
675 | - Enhanced `.view-btn` dark mode styles with proper hover states for better user interaction
676 |
677 | ## [8.45.1] - 2025-12-05
678 |
679 | ### Fixed
680 | - **Quality System HTTP API** - Fixed router configuration causing 404 errors on all `/api/quality/*` endpoints (missing `/api/quality` prefix in app.py router inclusion)
681 | - **Quality Distribution MCP Tool** - Corrected storage method call from non-existent `search_all_memories()` to `get_all_memories()` in server.py quality distribution handler
682 | - **HTTP API Tests** - Replaced synchronous `TestClient` with async `httpx.AsyncClient` to fix SQLite thread safety issues in quality system tests
683 | - **Distribution Endpoint** - Fixed storage retrieval logic in quality.py and removed unnecessary dict-to-Memory conversions
684 |
685 | ### Added
686 | - **Dependencies** - Added `pytest-benchmark` for performance testing support
687 | - **Dependencies** - Added `onnxruntime` as optional dependency for ONNX model support
688 |
689 | ### Testing
690 | - All 27 functional tests passing
691 | - ONNX tests properly skip when model unavailable (expected behavior)
692 | - Zero errors in test suite
693 |
694 | ## [8.45.0] - 2025-12-05
695 |
696 | ### Added
697 | - **Memory Quality System** - AI-driven automatic quality scoring (Issue #260, Memento-inspired design)
698 | - Local SLM via ONNX (ms-marco-MiniLM-L-6-v2, 23MB) as Tier 1 (primary, default)
699 | - Multi-tier fallback chain: Local SLM → Groq API → Gemini API → Implicit signals
700 | - Zero cost, full privacy, offline-capable with local SLM
701 | - 50-100ms latency (CPU), 10-20ms (GPU with CUDA/MPS/DirectML)
702 | - Cross-platform: Windows (CUDA/DirectML), macOS (MPS), Linux (CUDA/ROCm)
703 |
704 | - **Quality-Based Memory Management**
705 | - Quality-based forgetting: High (≥0.7) preserved 365 days, Medium (0.5-0.7) 180 days, Low (<0.5) 30-90 days
706 | - Quality-weighted decay: High-quality memories decay 3x slower than low-quality
707 | - Quality-boosted search: 0.7×semantic + 0.3×quality reranking (opt-in via `MCP_QUALITY_BOOST_ENABLED`)
708 | - Adaptive retention based on access patterns and user feedback
709 |
710 | - **MCP Tools** (4 new tools for quality management)
711 | - `rate_memory` - Manual quality rating with thumbs up/down/neutral (-1/0/1)
712 | - `get_memory_quality` - Retrieve quality metrics (score, provider, confidence, access stats)
713 | - `analyze_quality_distribution` - System-wide analytics (distribution, provider breakdown, trends)
714 | - `retrieve_with_quality_boost` - Quality-boosted semantic search with reranking
715 |
716 | - **HTTP API Endpoints** (4 new REST endpoints)
717 | - POST `/api/quality/memories/{hash}/rate` - Rate memory quality manually
718 | - GET `/api/quality/memories/{hash}` - Get quality metrics for specific memory
719 | - GET `/api/quality/distribution` - Distribution statistics (high/medium/low counts)
720 | - GET `/api/quality/trends` - Time series quality analysis (weekly/monthly trends)
721 |
722 | - **Dashboard UI Enhancements**
723 | - Quality badges on all memory cards (color-coded by tier: green/yellow/red/gray)
724 | - Analytics view with distribution charts (bar chart for counts, pie chart for providers)
725 | - Provider breakdown visualization (local/groq/gemini/implicit usage statistics)
726 | - Top/bottom performers lists (highest and lowest quality memories)
727 | - Settings panel for quality configuration (enable/disable, provider selection, boost weight)
728 | - i18n support for quality UI elements (English + Chinese translations)
729 |
730 | - **Configuration** (10 new environment variables)
731 | - `MCP_QUALITY_SYSTEM_ENABLED` - Master toggle (default: true)
732 | - `MCP_QUALITY_AI_PROVIDER` - Provider selection (local/groq/gemini/auto/none, default: local)
733 | - `MCP_QUALITY_LOCAL_MODEL` - ONNX model name (default: ms-marco-MiniLM-L-6-v2)
734 | - `MCP_QUALITY_LOCAL_DEVICE` - Device selection (auto/cpu/cuda/mps/directml, default: auto)
735 | - `MCP_QUALITY_BOOST_ENABLED` - Enable quality-boosted search (default: false, opt-in)
736 | - `MCP_QUALITY_BOOST_WEIGHT` - Quality weight 0.0-1.0 (default: 0.3)
737 | - `MCP_QUALITY_RETENTION_HIGH` - High-quality retention days (default: 365)
738 | - `MCP_QUALITY_RETENTION_MEDIUM` - Medium-quality retention days (default: 180)
739 | - `MCP_QUALITY_RETENTION_LOW_MIN` - Low-quality minimum retention (default: 30)
740 | - `MCP_QUALITY_RETENTION_LOW_MAX` - Low-quality maximum retention (default: 90)
741 |
742 | ### Changed
743 | - **Memory Model** - Extended with quality properties (backward compatible)
744 | - Added `quality_score`, `quality_provider`, `quality_confidence`, `quality_calculated_at`
745 | - Added `access_count` and `last_accessed_at` for usage tracking
746 | - Existing memories work without modification (quality calculated on first access)
747 |
748 | - **Storage Backends** - Enhanced with access pattern tracking
749 | - SQLite-Vec: Tracks access_count and last_accessed_at on retrieval
750 | - Cloudflare: Tracks access_count and last_accessed_at on retrieval
751 | - Both backends support quality-boosted search (opt-in)
752 |
753 | - **Consolidation System** - Integrated quality scores for intelligent retention
754 | - Forgetting module uses quality scores for retention decisions
755 | - Decay module applies quality-weighted decay (high-quality decays slower)
756 | - Association discovery prioritizes high-quality memories
757 |
758 | - **Search System** - Optional quality-based reranking
759 | - Default: Pure semantic search (0% quality influence)
760 | - Opt-in: Quality-boosted search (70% semantic + 30% quality)
761 | - Configurable boost weight via `MCP_QUALITY_BOOST_WEIGHT`
762 |
763 | ### Documentation
764 | - Comprehensive user guide: `/Users/hkr/Documents/GitHub/mcp-memory-service/docs/guides/memory-quality-guide.md`
765 | - Setup and configuration (local SLM, cloud APIs, hybrid mode)
766 | - Usage examples (MCP tools, HTTP API, Dashboard UI)
767 | - Performance benchmarks (latency, accuracy, cost analysis)
768 | - Troubleshooting guide (common issues, diagnostics)
769 | - CLAUDE.md updated with quality system section
770 | - Configuration examples for all deployment scenarios
771 | - Migration notes for existing users (zero breaking changes)
772 |
773 | ### Performance
774 | - **Quality Calculation Overhead**: <10ms per memory (non-blocking async)
775 | - **Search Latency with Boost**: <100ms total (semantic search + quality reranking)
776 | - **Local SLM Inference**: 50-100ms CPU, 10-20ms GPU (CUDA/MPS/DirectML)
777 | - **Async Background Scoring**: Non-blocking, queued processing for new memories
778 | - **Model Size**: 23MB ONNX (ms-marco-MiniLM-L-6-v2)
779 |
780 | ### Testing
781 | - 25 unit tests for quality scoring (`tests/test_quality_system.py`)
782 | - 6 integration tests for consolidation (`tests/test_quality_integration.py`)
783 | - Test pass rate: 67% (22/33 tests passing)
784 | - Known issues: 4 HTTP API tests (non-critical, fix scheduled for v8.45.1)
785 |
786 | ### Known Issues
787 | - 4 HTTP API tests failing (non-critical, development environment only):
788 | - `test_analyze_quality_distribution_mcp_tool` - Storage retrieval edge case
789 | - `test_rate_memory_http_endpoint` - HTTP 404 (routing configuration)
790 | - `test_get_quality_http_endpoint` - HTTP 404 (routing configuration)
791 | - `test_distribution_http_endpoint` - HTTP 500 (async handling)
792 | - Fix scheduled for v8.45.1 patch release
793 | - Production functionality unaffected (manual testing validates all features work correctly)
794 |
795 | ### Migration Notes
796 | - **No breaking changes** - Quality system is opt-in and backward compatible
797 | - **Existing users**: System works as before, quality scoring happens automatically in background
798 | - **To enable quality-boosted search**: Set `MCP_QUALITY_BOOST_ENABLED=true` in configuration
799 | - **To use cloud APIs**: Set API keys (GROQ_API_KEY/GEMINI_API_KEY) and `MCP_QUALITY_AI_PROVIDER=auto`
800 | - **To disable quality system**: Set `MCP_QUALITY_SYSTEM_ENABLED=false` (not recommended)
801 |
802 | ### Success Metrics (Phase 1 Targets)
803 | - Target: >40% improvement in retrieval precision (to be measured with usage data)
804 | - Target: >95% local SLM usage (Tier 1, zero cost)
805 | - Target: <100ms search latency with quality boost
806 | - Target: $0 monthly cost (local SLM default, no external API calls)
807 |
808 | ## [8.44.0] - 2025-11-30
809 |
810 | ### Added
811 | - **Multi-Language Expansion** - Added 5 new languages to dashboard i18n system (commit a7d0ba7)
812 | - 🇯🇵 **Japanese (日本語)** - 359 translation keys, complete UI coverage
813 | - 🇰🇷 **Korean (한국어)** - 359 translation keys, complete UI coverage
814 | - 🇩🇪 **German (Deutsch)** - 359 translation keys, complete UI coverage
815 | - 🇫🇷 **French (Français)** - 359 translation keys, complete UI coverage
816 | - 🇪🇸 **Spanish (Español)** - 359 translation keys, complete UI coverage
817 | - All translations professionally validated (key parity, interpolation syntax, JSON structure)
818 | - **Complete i18n Coverage** - Extended translation support to all UI elements (+57 keys: 304 → 359)
819 | - Search results view: headers, view buttons, empty states
820 | - Browse by Tags view: title, subtitle, filter controls
821 | - Memory Details Modal: all buttons and labels
822 | - Add Memory Modal: complete form field coverage
823 | - Settings Modal: preferences, system info, backup sections
824 | - Loading states and connection status indicators
825 | - Memory Viewer Modal: all interactive elements
826 | - ~80 data-i18n attributes added to index.html for automatic translation
827 |
828 | ### Fixed
829 | - **Dark Mode Language Dropdown** - Fixed styling inconsistencies in dark mode (commit a7d0ba7)
830 | - Added proper background colors for dropdown items
831 | - Fixed hover state styling (translucent white overlay)
832 | - Fixed active language highlighting
833 | - Improved contrast and readability in dark theme
834 |
835 | ### Changed
836 | - **Translation Key Structure** - Expanded from 304 to 359 keys per language
837 | - Maintains backward compatibility with existing translations
838 | - English (en.json) and Chinese (zh.json) updated to match new structure
839 | - Consistent key naming conventions across all languages
840 |
841 | ## [8.43.0] - 2025-11-30
842 |
843 | ### Added
844 | - **Frontend Internationalization** - Complete i18n support for dashboard with English and Chinese translations (PR #256, thanks @amm10090!)
845 | - Language toggle switcher in header with 🌐 icon
846 | - 300+ translation keys in `en.json` and `zh.json`
847 | - Automatic language detection (localStorage > browser language > English)
848 | - Dynamic translation of all UI elements, placeholders, tooltips
849 | - English fallback for missing keys
850 | - **Enhanced Claude Branch Automation** - Integrated quality checks before PR creation
851 | - New file-level quality validation utility (`scripts/pr/run_quality_checks_on_files.sh`, 286 lines)
852 | - Groq API primary (fast, 200-300ms), Gemini CLI fallback
853 | - Code complexity analysis (blocks >8, warns 7-8)
854 | - Security vulnerability scan (SQL injection, XSS, command injection, path traversal, secrets)
855 | - Conditional PR creation (blocks if security issues detected)
856 | - GitHub Actions annotations for inline feedback
857 | - Machine-parseable output format for CI/CD integration
858 |
859 | ### Changed
860 | - **i18n Performance Optimization** - Reduced DOM traversal overhead (4 separate calls → single unified traversal)
861 |
862 | ### Fixed
863 | - **Translation Accuracy** - Removed incorrect translation wrapping for backend error messages
864 | - **Translation Completeness** - Added missing `{reason}` placeholder to error translations
865 |
866 | ## [8.42.1] - 2025-11-29
867 |
868 | ### Fixed
869 | - **MCP Resource Handler AttributeError** - Fixed `AttributeError: 'AnyUrl' object has no attribute 'startswith'` in `handle_read_resource` function (issue #254)
870 | - Added automatic URI string conversion at function start to handle both plain strings and Pydantic AnyUrl objects
871 | - MCP SDK may pass AnyUrl objects instead of strings, causing AttributeError when using `.startswith()` method
872 | - Fix converts AnyUrl to string using `str()` before processing, maintaining backward compatibility
873 |
874 | ## [8.42.0] - 2025-11-27
875 |
876 | ### Added
877 | - **Visible Memory Injection Display** - Users now see injected memories at session start (commit TBD)
878 | - Added `showInjectedMemories` config option to display top 3 memories with relevance scores
879 | - Shows memory age (e.g., "2 days ago"), tags, and relevance scores
880 | - Formatted with colored output box for clear visibility
881 | - Helps users understand what context the AI assistant is using
882 | - Configurable via `~/.claude/hooks/config.json`
883 |
884 | ### Changed
885 | - **Session-End Hook Quality Improvements** - Raised quality thresholds to prevent generic boilerplate (commit TBD)
886 | - Increased `minSessionLength` from 100 → 200 characters (requires more substantial content)
887 | - Increased `minConfidence` from 0.1 → 0.5 (requires 5+ meaningful items vs 1+)
888 | - Added optional LLM-powered session summarizer using Gemini CLI
889 | - New files: `llm-session-summarizer.js` utility and `session-end-llm.js` core hook
890 | - Prevents low-quality memories like "User asked Claude to review code" from polluting database
891 | - Database cleaned from 3352 → 3185 memories (167 generic entries removed)
892 |
893 | ### Fixed
894 | - **Duplicate MCP Fallback Messages** - Fixed duplicate "MCP Fallback → Using standard MCP tools" log messages (commit TBD)
895 | - Added module-level flag to track if fallback message was already logged
896 | - Message now appears once per session instead of once per query
897 | - Improved session start hook output clarity
898 |
899 | ### Performance
900 | - **Configuration Improvements** - Better defaults for session analysis
901 | - Enabled relevance scores in context formatting
902 | - Improved memory scoring to prioritize quality over recency for generic content
903 | - Session-end hook re-enabled with improved quality gates
904 |
905 | ## [8.41.2] - 2025-11-27
906 |
907 | ### Fixed
908 | - **Hook Installer Utility File Deployment** - Installer now copies ALL utility files instead of hardcoded lists (commit 557be0e)
909 | - **BREAKING**: Previous installer only copied 8/14 basic utilities and 5/14 enhanced utilities
910 | - Updated files like `memory-scorer.js` and `context-formatter.js` were not deployed with `--natural-triggers` flag
911 | - Replaced hardcoded file lists with glob pattern (`*.js`) to automatically include all utility files
912 | - Ensures v8.41.0/v8.41.1 project affinity filtering fixes get properly deployed
913 | - Future utility file additions automatically included without manual list maintenance
914 | - **Impact**: Users running `python install_hooks.py --natural-triggers` now get all 14 utility files, preventing stale hooks
915 |
916 | ## [8.41.1] - 2025-11-27
917 |
918 | ### Fixed
919 | - **Context Formatter Memory Sorting** - Memories now sorted by recency within each category (commit 2ede2a8)
920 | - Added sorting by `created_at_iso` (descending) after grouping memories into categories
921 | - Ensures most recent memories appear first in each section for better context relevance
922 | - Applied in `context-formatter.js` after category grouping logic
923 | - Improves user experience by prioritizing newest information in memory context
924 |
925 | ## [8.41.0] - 2025-11-27
926 |
927 | ### Fixed
928 | - **Session Start Hook Reliability** - Improved session start hook reliability and memory filtering (commit 924962a)
929 | - **Error Suppression**: Suppressed Code Execution ModuleNotFoundError spam
930 | - Added `suppressErrors: true` to Code Execution call configuration
931 | - Eliminates console noise from module import errors during session start
932 | - **Clean Output**: Removed duplicate "Injected Memory Context" output
933 | - Removed duplicate stdout console.log that caused double messages
934 | - Session start output now cleaner and easier to read
935 | - **Memory Filtering**: Added project affinity scoring to prevent cross-project memory pollution
936 | - New `calculateProjectAffinity()` function in `memory-scorer.js`
937 | - Hard filters out memories without project tag when in a project context
938 | - Soft scoring penalty (0.3x) for memories from different projects
939 | - Prevents Azure/Terraform memories from appearing in mcp-memory-service context
940 | - **Classification Fix**: Session summaries no longer misclassified as "Current Problems"
941 | - Excludes `session`, `session-summary`, and `session-end` memory types from problem classification
942 | - Prevents confusion between historical session notes and actual current issues
943 | - **Path Display**: "Unknown location" now shows actual path via `process.cwd()` fallback
944 | - When git repository detection fails, uses `process.cwd()` instead of "Unknown location"
945 | - Provides better context awareness even in non-git directories
946 |
947 | ## [8.40.0] - 2025-11-27
948 |
949 | ### Added
950 | - **Session Start Version Display** - Automatic version information display during session startup (commit f2f7d2b, fixes #250)
951 | - **Version Checker Utility**: New `version-checker.js` utility in `claude-hooks/utilities/`
952 | - Reads local version from `src/mcp_memory_service/__init__.py`
953 | - Fetches latest published version from PyPI API
954 | - Compares versions and displays status labels (published/development/outdated)
955 | - Configurable timeout for PyPI API requests
956 | - **Session Start Integration**: Version information now appears automatically during session initialization
957 | - Displays format: `📦 Version → X.Y.Z (local) • PyPI: X.Y.Z`
958 | - Shows after storage backend information
959 | - Provides immediate visibility into version status
960 | - **Testing**: Includes `test_version_checker.js` for utility validation
961 | - **Benefits**:
962 | - Quick version verification without manual checks
963 | - Early detection of outdated installations
964 | - Improved development workflow transparency
965 | - Helps users stay current with latest features and fixes
966 |
967 | ## [8.39.1] - 2025-11-27
968 |
969 | ### Fixed
970 | - **Dashboard Analytics Bugs** - Fixed three critical bugs in the analytics section (commit c898a72, fixes #253)
971 | - **Top Tags filtering**: Now correctly filters tags by selected timeframe (7d/30d/90d)
972 | - Implemented time-based filtering using `get_memories_by_time_range()`
973 | - Counts tags only from memories within the selected period
974 | - Maintains backward compatibility with all storage backends
975 | - **Recent Activity display**: Bars now show percentage distribution
976 | - Enhanced display to show both count and percentage of total
977 | - Tooltip includes both absolute count and percentage
978 | - Activity count label shows percentage (e.g., '42 (23.5%)')
979 | - **Storage Report field mismatches**: Fixed "undefined chars" display
980 | - Fixed field name: `size_kb` instead of `size`
981 | - Fixed field name: `preview` instead of `content_preview`
982 | - Fixed date parsing: `created_at` is ISO string, not timestamp
983 | - Added null safety and proper size display (KB with bytes fallback)
984 |
985 | ## [8.39.0] - 2025-11-26
986 |
987 | ### Performance
988 | - **Analytics date-range filtering**: Moved from application layer to storage layer for 10x performance improvement (#238)
989 | - Added `get_memories_by_time_range()` to Cloudflare backend with D1 database filtering
990 | - Updated memory growth endpoint to use database-layer queries instead of fetching all memories
991 | - **Performance gains**:
992 | - Reduced data transfer: 50MB → 1.5MB (97% reduction for 10,000 memories)
993 | - Response time (SQLite-vec): ~500ms → ~50ms (10x improvement)
994 | - Response time (Cloudflare): ~2-3s → ~200ms (10-15x improvement)
995 | - **Scalability**: Now handles databases with >10,000 memories efficiently
996 | - **Benefits**: Pushes filtering to database WHERE clauses, leverages indexes on `created_at`
997 |
998 | ## [8.38.1] - 2025-11-26
999 |
1000 | ### Fixed
1001 | - **HTTP MCP Transport: JSON-RPC 2.0 Compliance** - Fixed critical bug where HTTP MCP responses violated JSON-RPC 2.0 specification (PR #249, fixes #236)
1002 | - **Problem**: FastAPI ignored Pydantic's `ConfigDict(exclude_none=True)` when directly returning models, causing responses to include null fields (`"error": null` in success, `"result": null` in errors)
1003 | - **Impact**: Claude Code/Desktop rejected all HTTP MCP communications due to spec violation
1004 | - **Solution**: Wrapped all `MCPResponse` returns in `JSONResponse` with explicit `.model_dump(exclude_none=True)` serialization
1005 | - **Verification**:
1006 | - Success responses now contain ONLY: `jsonrpc`, `id`, `result`
1007 | - Error responses now contain ONLY: `jsonrpc`, `id`, `error`
1008 | - **Testing**: Validated with curl commands against all 5 MCP endpoint response paths
1009 | - **Credits**: @timkjr (Tim Knauff) for identifying root cause and implementing proper fix
1010 |
1011 | ## [8.38.0] - 2025-11-25
1012 |
1013 | ### Improved
1014 | - **Code Quality: Phase 2b Duplicate Consolidation COMPLETE** - Eliminated ~176-186 lines of duplicate code (issue #246)
1015 | - **Document chunk processing consolidation (Group 3)**:
1016 | - Extracted `process_document_chunk()` helper function from duplicate implementations
1017 | - Consolidated chunk_text/chunk_size/chunk_overlap pattern across document ingestion tools
1018 | - 2 occurrences reduced to 1 canonical implementation with consistent metadata handling
1019 | - **MCP response parsing consolidation (Group 3)**:
1020 | - Extracted `parse_mcp_response()` helper for isError/error/content pattern
1021 | - Standardized error handling across MCP tool invocations
1022 | - 2 occurrences reduced to 1 canonical implementation
1023 | - **Cache statistics logging consolidation (Group 5)**:
1024 | - Extracted `log_cache_statistics()` helper for storage/service cache metrics
1025 | - Standardized cache performance logging format (hits, misses, hit rates)
1026 | - 2 occurrences reduced to 1 canonical implementation with consistent percentage formatting
1027 | - **Winter season boundary logic consolidation (Group 7)**:
1028 | - Extracted `is_winter_boundary_case()` helper for cross-year winter season handling
1029 | - Centralized December-January transition logic (Dec 21 - Mar 20 spans years)
1030 | - 2 occurrences reduced to 1 canonical implementation
1031 | - **Test tempfile setup consolidation (Groups 10, 11)**:
1032 | - Extracted `create_test_document()` helper for pytest tmp_path fixture patterns
1033 | - Standardized temporary file creation across document ingestion tests
1034 | - 6 occurrences reduced to 2 canonical implementations (PDF, DOCX variants)
1035 | - **MCP server configuration consolidation (Phase 2b-3)**:
1036 | - Consolidated duplicate server config sections in install.py and scripts/installation/install.py
1037 | - Unified JSON serialization logic for mcpServers configuration blocks
1038 | - Improved maintainability through shared configuration structure
1039 | - **User input prompt consolidation (Phase 2b-2)**:
1040 | - Extracted shared prompt logic for backend selection and configuration
1041 | - Standardized input validation patterns across installation scripts
1042 | - Reduced code duplication in interactive installation workflows
1043 | - **Additional GPU detection consolidation (Phase 2b-1)**:
1044 | - Completed GPU platform detection consolidation from Phase 2a
1045 | - Refined helper function extraction for test_gpu_platform() and related utilities
1046 | - Enhanced configuration-driven GPU detection architecture
1047 | - **Consolidation Summary**:
1048 | - Total duplicate code eliminated: ~176-186 lines across 10 consolidation commits
1049 | - Functions/patterns consolidated: 10+ duplicate implementations → canonical versions
1050 | - Strategic deference: 5 groups intentionally skipped (high-risk/low-benefit per session analysis)
1051 | - Code maintainability: Enhanced through focused helper methods and consistent patterns
1052 | - 100% backward compatibility maintained (no breaking changes)
1053 | - Test coverage: 100% maintained across all consolidations
1054 |
1055 | ### Code Quality
1056 | - **Phase 2b Duplicate Consolidation**: 10 consolidation commits addressing multiple duplication groups
1057 | - **Duplication Score**: Reduced from 5.5% (Phase 2a baseline) to estimated 4.5-4.7%
1058 | - **Complexity Reduction**: Helper extraction pattern applied consistently across codebase
1059 | - **Expected Impact**:
1060 | - Duplication Score: Approaching <3% target with strategic consolidation
1061 | - Complexity Score: Improved through helper function extraction
1062 | - Overall Health Score: Strong progress toward 75+ target
1063 | - **Remaining Work**: 5 duplication groups intentionally deferred (high-risk backend logic, low-benefit shared imports)
1064 | - **Related**: Issue #246 Phase 2b (Duplicate Consolidation Strategy COMPLETE)
1065 |
1066 | ## [8.37.0] - 2025-11-24
1067 |
1068 | ### Improved
1069 | - **Code Quality: Phase 2a Duplicate Consolidation COMPLETE** - Eliminated 5 duplicate high-complexity functions (issue #246)
1070 | - **detect_gpu() consolidation (3 duplicates → 1 canonical)**:
1071 | - Consolidated ROOT install.py::detect_gpu() (119 lines, complexity 30) with refactored scripts/installation/install.py version (187 lines, configuration-driven)
1072 | - Refactored scripts/validation/verify_environment.py::EnvironmentVerifier.detect_gpu() (123 lines, complexity 27) to use helper-based architecture
1073 | - Final canonical implementation in install.py: GPU_PLATFORM_CHECKS config dict + test_gpu_platform() helper + CUDA_VERSION_PARSER
1074 | - Impact: -4% high-complexity functions (27 → 26), improved maintainability
1075 | - **verify_installation() consolidation (2 duplicates → 1 canonical)**:
1076 | - Replaced scripts/installation/install.py simplified version with canonical ROOT install.py implementation
1077 | - Added tokenizers check for ONNX dependencies, safer DirectML version handling
1078 | - Improved error messaging and user guidance
1079 | - **Consolidation Summary**:
1080 | - Total duplicate functions eliminated: 5 (3x detect_gpu + 2x verify_installation)
1081 | - High-complexity functions reduced: 27 → 24 (-11%)
1082 | - Code maintainability improved through focused helper methods and configuration-driven design
1083 | - 100% backward compatibility maintained (no breaking changes)
1084 |
1085 | ### Code Quality
1086 | - **Phase 2a Duplicate Consolidation**: 5 of 5 target functions consolidated (100% complete)
1087 | - **High-Complexity Functions**: Reduced from 27 to 24 (-11%)
1088 | - **Complexity Reduction**: Configuration-driven patterns replace monolithic if/elif chains
1089 | - **Expected Impact**:
1090 | - Duplication Score: Reduced toward <3% target
1091 | - Complexity Score: Improved through helper extraction
1092 | - Overall Health Score: On track for 75+ target
1093 | - **Related**: Issue #246 Phase 2a (Duplicate Consolidation Strategy COMPLETE)
1094 |
1095 | ## [8.36.1] - 2025-11-24
1096 |
1097 | ### Fixed
1098 | - **CRITICAL**: HTTP server crash on v8.36.0 startup - forward reference error in analytics.py (issue #247)
1099 | - Added `from __future__ import annotations` to enable forward references in type hints
1100 | - Added `Tuple` to typing imports for Python 3.9 compatibility
1101 | - Impact: Unblocks all v8.36.0 users experiencing startup failures
1102 | - Root cause: PR #244 refactoring introduced forward references without future annotations import
1103 | - Fix verified: HTTP server starts successfully, all 10 analytics routes registered
1104 |
1105 | ## [8.36.0] - 2025-11-24
1106 |
1107 | ### Improved
1108 | - **Code Quality: Phase 2 COMPLETE - 100% of Target Achieved** - Refactored final 7 functions, -19 complexity points (issue #240 PR #244)
1109 | - **consolidator.py (-8 points)**:
1110 | - `consolidate()`: 12 → 8 - Introduced SyncPauseContext for cleaner sync state management + extracted `check_horizon_requirements()` helper
1111 | - `_get_memories_for_horizon()`: 10 → 8 - Replaced conditional logic with data-driven HORIZON_CONFIGS dict lookup
1112 | - **analytics.py (-8 points)**:
1113 | - `get_tag_usage_analytics()`: 10 → 6 - Extracted `fetch_storage_stats()` and `calculate_tag_statistics()` helpers (40+ lines)
1114 | - `get_activity_breakdown()`: 9 → 7 - Extracted `calculate_activity_time_ranges()` helper (70+ lines)
1115 | - `get_memory_type_distribution()`: 9 → 7 - Extracted `aggregate_type_statistics()` helper
1116 | - **install.py (-2 points)**:
1117 | - `detect_gpu()`: 10 → 8 - Data-driven GPU_PLATFORM_CHECKS dict + extracted `test_gpu_platform()` helper
1118 | - **cloudflare.py (-1 point)**:
1119 | - `get_memory_timestamps()`: 9 → 8 - Extracted `_fetch_d1_timestamps()` method for D1 query logic
1120 | - **Gemini Review Improvements (5 iterations)**:
1121 | - **Critical Fixes**:
1122 | - Fixed timezone bug: `datetime.now()` → `datetime.now(timezone.utc)` in consolidator
1123 | - Fixed analytics double-counting: proper use of `count_all_memories()`
1124 | - CUDA/ROCm robustness: try all detection paths before failing
1125 | - **Quality Improvements**:
1126 | - Modernized deprecated APIs: `pkg_resources` → `importlib.metadata`, `universal_newlines` → `text=True`
1127 | - Enhanced error logging with `exc_info=True` for better debugging
1128 | - Improved code consistency and structure across all refactored functions
1129 |
1130 | ### Code Quality
1131 | - **Phase 2 Complete**: 10 of 10 functions refactored (100%)
1132 | - **Complexity Reduction**: -39 of -39 points achieved (100% of target)
1133 | - **Total Batches**:
1134 | - v8.34.0 (PR #242): `analytics.py::get_memory_growth()` (-5 points)
1135 | - v8.35.0 (PR #243): `install.py::configure_paths()`, `cloudflare.py::_search_by_tags_internal()` (-15 points)
1136 | - v8.36.0 (PR #244): Remaining 7 functions (-19 points)
1137 | - **Expected Impact**:
1138 | - Complexity Score: 40 → 51+ (+11 points, exceeded +10 target)
1139 | - Overall Health Score: 63 → 68-72 (Grade B achieved!)
1140 | - **Related**: Issue #240 Phase 2 (100% COMPLETE), Phase 1: v8.33.0 (dead code removal, +5-9 health points)
1141 |
1142 | ## [8.35.0] - 2025-11-24
1143 |
1144 | ### Improved
1145 | - **Code Quality: Phase 2 Batch 1 Complete** - Refactored 2 high-priority functions (issue #240 PR #243)
1146 | - **install.py::configure_paths()**: Complexity reduced from 15 → 5 (-10 points)
1147 | - Extracted 4 helper functions for better separation of concerns
1148 | - Main function reduced from 80 → ~30 lines
1149 | - Improved testability and maintainability
1150 | - **cloudflare.py::_search_by_tags_internal()**: Complexity reduced from 13 → 8 (-5 points)
1151 | - Extracted 3 helper functions for tag normalization and query building
1152 | - Method reduced from 75 → ~45 lines
1153 | - Better code organization
1154 | - **Gemini Review Improvements**:
1155 | - Dynamic PROJECT_ROOT detection in scripts
1156 | - Specific exception handling (OSError, IOError, PermissionError)
1157 | - Portable documentation paths
1158 |
1159 | ### Code Quality
1160 | - **Phase 2 Progress**: 3 of 10 functions refactored (30% complete)
1161 | - **Complexity Reduction**: -20 points achieved of -39 point target (51% of target)
1162 | - **Remaining Work**: 7 functions with implementation plans ready
1163 | - **Overall Health**: On track for 75+ target score
1164 |
1165 | ## [8.34.0] - 2025-11-24
1166 |
1167 | ### Improved
1168 | - **Code Quality: Phase 2 Complexity Reduction** - Refactored `analytics.py::get_memory_growth()` function (issue #240 Phase 2)
1169 | - Complexity reduced from 11 → 6-7 (-4 to -5 points, exceeding -3 point target)
1170 | - Introduced PeriodType Enum for type-safe period validation
1171 | - Data-driven period configuration with PERIOD_CONFIGS dict
1172 | - Data-driven label formatting with PERIOD_LABEL_FORMATTERS dict
1173 | - Improved maintainability and extensibility for analytics endpoints
1174 |
1175 | ### Code Quality
1176 | - Phase 2 Progress: 1 of 10 functions refactored
1177 | - Complexity Score: Estimated +1 point improvement (partial Phase 2)
1178 | - Overall Health: On track for 70+ target
1179 |
1180 | ## [8.33.0] - 2025-11-24
1181 |
1182 | ### Fixed
1183 | - **Critical Installation Bug**: Fixed early return in `install.py` that prevented Claude Desktop MCP configuration from executing (issue #240 Phase 1)
1184 | - 77 lines of Claude Desktop setup code now properly runs during installation
1185 | - Users will now get automatic MCP server configuration when running `install.py`
1186 | - Bug was at line 1358 - early `return False` in exception handler made lines 1360-1436 unreachable
1187 | - Resolves all 27 pyscn dead code violations identified in issue #240 Phase 1
1188 |
1189 | ### Improved
1190 | - Modernized `install.py` with pathlib throughout (via Gemini Code Assist automated review)
1191 | - Specific exception handling (OSError, PermissionError, JSONDecodeError) instead of bare `except`
1192 | - Fixed Windows `memory_wrapper.py` path resolution bug (now uses `resolve()` for absolute paths)
1193 | - Added config structure validation to prevent TypeError on malformed JSON
1194 | - Import optimization and better error messages
1195 | - Code structure improvements from 10+ Gemini Code Assist review iterations
1196 |
1197 | ### Code Quality
1198 | - **Dead Code Score**: 70 → 85-90 (projected +15-20 points from removing 27 violations)
1199 | - **Overall Health Score**: 63 → 68-72 (projected +5-9 points)
1200 | - All improvements applied via automated Gemini PR review workflow
1201 |
1202 | ## [8.32.0] - 2025-11-24
1203 |
1204 | ### Added
1205 | - **pyscn Static Analysis Integration**: Multi-layer quality workflow with comprehensive static analysis
1206 | - New `scripts/pr/run_pyscn_analysis.sh` for PR-time analysis with health score thresholds (blocks <50)
1207 | - New `scripts/quality/track_pyscn_metrics.sh` for historical metrics tracking (CSV storage)
1208 | - New `scripts/quality/weekly_quality_review.sh` for automated weekly reviews with regression detection
1209 | - Enhanced `scripts/pr/quality_gate.sh` with `--with-pyscn` flag for comprehensive checks
1210 | - Three-layer quality strategy: Pre-commit (Groq/Gemini LLM) → PR Gate (standard + pyscn) → Periodic (weekly)
1211 | - 6 comprehensive metrics: cyclomatic complexity, dead code, duplication, coupling, dependencies, architecture
1212 | - Health score thresholds: <50 (blocker), 50-69 (action required), 70-84 (good), 85+ (excellent)
1213 | - Complete documentation in `docs/development/code-quality-workflow.md` (651 lines)
1214 | - Integration guide in `.claude/agents/code-quality-guard.md`
1215 | - Updated `CLAUDE.md` with "Code Quality Monitoring" section
1216 |
1217 | ## [8.31.0] - 2025-11-23
1218 |
1219 | ### Added
1220 | - **Revolutionary Batch Update Performance** - Memory consolidation now 21,428x faster with new batch update API (#241)
1221 | - **Performance Improvement**: 300 seconds → 0.014 seconds for 500 memory batch updates (21,428x speedup)
1222 | - **Consolidation Workflow**: Complete consolidation time reduced from 5+ minutes to <1 second for 500 memories
1223 | - **New API Method**: `update_memories_batch()` in storage backends for atomic batch operations
1224 | - **Implementation**:
1225 | - **SQLite Backend**: Single transaction with executemany for 21,428x speedup
1226 | - **Cloudflare Backend**: Parallel batch updates with proper vectorize sync
1227 | - **Hybrid Backend**: Optimized dual-backend batch sync with queue processing
1228 | - **Backward Compatible**: Existing single-update code paths continue working
1229 | - **Real-world Impact**: Memory consolidation that previously took 5+ minutes now completes in <1 second
1230 | - **Files Modified**:
1231 | - `src/mcp_memory_service/storage/sqlite_vec.py` (lines 542-571): Batch update implementation
1232 | - `src/mcp_memory_service/storage/cloudflare.py` (lines 673-728): Cloudflare batch updates
1233 | - `src/mcp_memory_service/storage/hybrid.py` (lines 772-822): Hybrid backend batch sync
1234 | - `src/mcp_memory_service/consolidation/service.py` (line 472): Using batch update in consolidation
1235 |
1236 | ### Performance
1237 | - **Memory Consolidation**: 21,428x faster batch metadata updates (300s → 0.014s for 500 memories)
1238 | - **Consolidation Workflow**: Complete workflow time reduced from 5+ minutes to <1 second for 500 memories
1239 | - **Database Efficiency**: Single transaction instead of 500 individual updates with commit overhead
1240 |
1241 | ## [8.30.0] - 2025-11-23
1242 |
1243 | ### Added
1244 | - **Adaptive Chart Granularity** - Analytics charts now use semantically appropriate time intervals for better trend visualization
1245 | - **Last Month view**: Changed from 3-day intervals to weekly aggregation for clearer monthly trends
1246 | - **Last Year view**: Uses monthly aggregation for annual overview
1247 | - **Human-readable labels**: Charts display clear interval formatting:
1248 | - Daily view: "Nov 15" format
1249 | - Weekly aggregation: "Week of Nov 15" format
1250 | - Monthly aggregation: "November 2024" format
1251 | - **Improved UX**: Better semantic alignment between time period and chart granularity
1252 | - **Files Modified**: `src/mcp_memory_service/web/api/analytics.py` (lines 307-345), `src/mcp_memory_service/web/static/app.js` (line 3661)
1253 |
1254 | ### Fixed
1255 | - **CRITICAL: Interval Aggregation Bug** - Multi-day intervals (weekly, monthly) now correctly aggregate across entire period
1256 | - **Problem**: Intervals were only counting memories from the first day of the interval, not the entire period
1257 | - **Impact**: Analytics showed wildly inaccurate data (e.g., 0 memories instead of 427 for Oct 24-30 week)
1258 | - **Root Cause**: `strftime` format in date grouping only used the first timestamp, not the interval's date range
1259 | - **Solution**: Updated aggregation logic to properly filter and count all memories within each interval
1260 | - **Files Modified**: `src/mcp_memory_service/web/api/analytics.py` (lines 242-267)
1261 |
1262 | - **CRITICAL: Data Sampling Bug** - Analytics now fetch complete historical data with proper date range filtering
1263 | - **Problem**: API only fetched 1,000 most recent memories, missing historical data for longer time periods
1264 | - **Impact**: Charts showed incomplete or missing data for older time ranges
1265 | - **Solution**: Increased fetch limit to 10,000 memories with proper `created_at >= start_date` filtering
1266 | - **Files Modified**: `src/mcp_memory_service/web/api/analytics.py` (lines 56-62)
1267 | - **Performance**: Maintains fast response times (<200ms) even with larger dataset
1268 |
1269 | ### Changed
1270 | - **Analytics API**: Improved data fetching with larger limits and proper date filtering for accurate historical analysis
1271 |
1272 | ## [8.29.0] - 2025-11-23
1273 |
1274 | ### Added
1275 | - **Dashboard Quick Actions: Sync Controls Widget** - Compact, real-time sync management for hybrid backend users (#234, fixes #233)
1276 | - **Real-time sync status indicator**: Visual states for synced/syncing/pending/error/paused with color-coded icons
1277 | - **Pause/Resume controls**: Safely pause background sync for database maintenance or offline work
1278 | - **Force sync button**: Manual trigger for immediate synchronization
1279 | - **Sync metrics**: Display last sync time and pending operations count
1280 | - **Clean layout**: Removed redundant sync status bar between header and body, moved to sidebar widget
1281 | - **Backend-aware**: Widget automatically hides for sqlite-vec only users (hybrid-specific feature)
1282 | - **API endpoints**:
1283 | - `POST /api/sync/pause` - Pause background sync
1284 | - `POST /api/sync/resume` - Resume background sync
1285 | - **Hybrid backend methods**: Added `pause_sync()` and `resume_sync()` for sync control
1286 |
1287 | - **Automatic Scheduled Backup System** - Enterprise-grade backup with retention policies and scheduling (#234, fixes #233)
1288 | - **New backup module**: `src/mcp_memory_service/backup/` with `BackupService` and `BackupScheduler`
1289 | - **SQLite native backup API**: Uses safe `sqlite3.backup()` to prevent corruption (no file copying)
1290 | - **Async I/O**: Non-blocking backup operations with `asyncio.to_thread`
1291 | - **Flexible scheduling**: Hourly, daily, or weekly automatic backups
1292 | - **Retention policies**: Configurable by days and max backup count
1293 | - **Dashboard widget**: Backup status, last backup time, manual trigger, backup count, next scheduled time
1294 | - **Configuration via environment variables**:
1295 | - `MCP_BACKUP_ENABLED=true` (default: true)
1296 | - `MCP_BACKUP_INTERVAL=daily` (hourly/daily/weekly, default: daily)
1297 | - `MCP_BACKUP_RETENTION=7` (days, default: 7)
1298 | - `MCP_BACKUP_MAX_COUNT=10` (max backups, default: 10)
1299 | - **API endpoints**:
1300 | - `GET /api/backup/status` - Get backup status and scheduler info
1301 | - `POST /api/backup/now` - Trigger manual backup
1302 | - `GET /api/backup/list` - List available backups with metadata
1303 | - **Security**: OAuth protection on backup endpoints, no file path exposure in responses
1304 | - **Safari compatibility**: Improved event listener handling with lazy initialization
1305 |
1306 | ### Changed
1307 | - **Quick Actions Layout**: Moved sync controls from top status bar to sidebar widget for cleaner, more accessible UI
1308 | - **Sync State Persistence**: Pause state is now preserved during force sync operations
1309 | - **Dashboard Feedback**: Added toast notifications for sync and backup operations
1310 |
1311 | ### Fixed
1312 | - **Sync Button Click Events**: Resolved DOM timing issues with lazy event listeners for reliable button interactions
1313 | - **Spinner Animation**: Fixed syncing state visual feedback with proper CSS animations
1314 | - **Security**: Removed file path exposure from backup API responses (used backup IDs instead)
1315 |
1316 | ## [8.28.1] - 2025-11-22
1317 |
1318 | ### Fixed
1319 | - **CRITICAL: HTTP MCP Transport JSON-RPC 2.0 Compliance** - Fixed protocol violation causing Claude Code rejection (#236)
1320 | - **Problem**: HTTP MCP server returned `"error": null` in successful responses, violating JSON-RPC 2.0 spec which requires successful responses to OMIT the error field entirely (not include it as null)
1321 | - **Impact**: Claude Code's strict schema validation rejected all HTTP MCP responses with "Unrecognized key(s) in object: 'error'" errors, making HTTP transport completely unusable
1322 | - **Root Cause**: MCPResponse Pydantic model included both `result` and `error` fields in all responses, serializing null values
1323 | - **Solution**:
1324 | - Added `ConfigDict(exclude_none=True)` to MCPResponse model to exclude null fields from serialization
1325 | - Updated docstring to document JSON-RPC 2.0 compliance requirements
1326 | - Replaced deprecated `.dict()` with `.model_dump()` for Pydantic V2 compatibility
1327 | - Moved json import to top of file per PEP 8 style guidelines
1328 | - **Files Modified**:
1329 | - `src/mcp_memory_service/web/api/mcp.py` - Added ConfigDict, updated serialization
1330 | - **Affected Users**: All users attempting to use HTTP MCP transport with Claude Code or other strict JSON-RPC 2.0 clients
1331 | - **Testing**: Verified successful responses exclude `error` field and error responses exclude `result` field
1332 | - **Credits**: Thanks to @timkjr for identifying the issue and providing the fix
1333 |
1334 | ## [8.28.0] - 2025-11-21
1335 |
1336 | ### Added
1337 | - **Cloudflare Tag Filtering** - AND/OR operations for tag searches with unified API contracts (#228)
1338 | - Added `search_by_tags(tags, operation, time_start, time_end)` to the storage base class and implemented it across SQLite, Cloudflare, Hybrid, and HTTP client backends
1339 | - Normalized Cloudflare SQL to use `GROUP BY` + `HAVING COUNT(DISTINCT ...)` for AND semantics while supporting optional time ranges
1340 | - Introduced `get_all_tags_with_counts()` for Cloudflare to power analytics dashboards without extra queries
1341 |
1342 | ### Changed
1343 | - **Tag Filtering Behavior** - `get_all_memories(tags=...)` now performs exact tag comparisons with AND logic instead of substring OR matching, and hybrid storage exposes the same `operation` parameter for parity across backends.
1344 |
1345 | ## [8.27.2] - 2025-11-18
1346 |
1347 | ### Fixed
1348 | - **Memory Type Loss During Cloudflare-to-SQLite Sync** - Fixed `memory_type` not being preserved in sync script
1349 | - **Problem**: `scripts/sync/sync_memory_backends.py` did not extract or pass `memory_type` when syncing from Cloudflare to SQLite-vec
1350 | - **Impact**: All memories synced via `--direction cf-to-sqlite` showed as "untyped" (100%) in dashboard analytics
1351 | - **Root Cause**: Missing `memory_type` field in both memory dict extraction and Memory object creation
1352 | - **Solution**:
1353 | - Added `memory_type` to memory dictionary extraction from source
1354 | - Added `memory_type` and `updated_at` parameters when creating Memory objects for target storage
1355 | - **Files Modified**:
1356 | - `scripts/sync/sync_memory_backends.py` - Added memory_type and updated_at handling
1357 | - **Affected Users**: Users who ran `python scripts/sync/sync_memory_backends.py --direction cf-to-sqlite`
1358 | - **Recovery**: Re-run sync from Cloudflare to restore memory types (Cloudflare preserves original types)
1359 |
1360 | ## [8.27.1] - 2025-11-18
1361 |
1362 | ### Fixed
1363 | - **CRITICAL: Timestamp Regression Bug** - Fixed `created_at` timestamps being reset during metadata sync
1364 | - **Problem**: Bidirectional sync and drift detection (v8.25.0-v8.27.0) incorrectly reset `created_at` timestamps to current time during metadata updates
1365 | - **Impact**: All memories synced from Cloudflare → SQLite-vec appeared "just created", destroying historical timestamp data
1366 | - **Root Cause**: `preserve_timestamps=False` parameter reset **both** `created_at` and `updated_at`, when it should only update `updated_at`
1367 | - **Solution**:
1368 | - Modified `update_memory_metadata()` to preserve `created_at` from source memory during sync
1369 | - Hybrid storage now passes all 4 timestamp fields (`created_at`, `created_at_iso`, `updated_at`, `updated_at_iso`) during drift detection
1370 | - Cloudflare storage updated to handle timestamps consistently with SQLite-vec
1371 | - **Files Modified**:
1372 | - `src/mcp_memory_service/storage/sqlite_vec.py:1389-1406` - Fixed timestamp handling logic
1373 | - `src/mcp_memory_service/storage/hybrid.py:625-637, 935-947` - Pass source timestamps during sync
1374 | - `src/mcp_memory_service/storage/cloudflare.py:833-864` - Consistent timestamp handling
1375 | - **Tests Added**: `tests/test_timestamp_preservation.py` - Comprehensive test suite with 7 tests covering:
1376 | - Timestamp preservation with `preserve_timestamps=True`
1377 | - Regression test for `created_at` preservation without source timestamps
1378 | - Drift detection scenario
1379 | - Multiple sync operations
1380 | - Initial memory storage
1381 | - **Recovery Tools**:
1382 | - `scripts/validation/validate_timestamp_integrity.py` - Detect timestamp anomalies
1383 | - `scripts/maintenance/recover_timestamps_from_cloudflare.py` - Restore corrupted timestamps from Cloudflare
1384 | - **Affected Versions**: v8.25.0 (drift detection), v8.27.0 (bidirectional sync)
1385 | - **Affected Users**: Hybrid backend users who experienced automatic drift detection or initial sync
1386 | - **Data Recovery**: If using hybrid backend and Cloudflare has correct timestamps, run recovery script:
1387 | ```bash
1388 | # Preview recovery
1389 | python scripts/maintenance/recover_timestamps_from_cloudflare.py --dry-run
1390 |
1391 | # Apply recovery
1392 | python scripts/maintenance/recover_timestamps_from_cloudflare.py --apply
1393 | ```
1394 |
1395 | ### Changed
1396 | - **Timestamp Handling Semantics** - Clarified `preserve_timestamps` parameter behavior:
1397 | - `preserve_timestamps=True` (default): Only updates `updated_at` to current time, preserves `created_at`
1398 | - `preserve_timestamps=False`: Uses timestamps from `updates` dict if provided, otherwise preserves existing `created_at`
1399 | - **Never** resets `created_at` to current time (this was the bug)
1400 |
1401 | ### Added
1402 | - **Timestamp Integrity Validation** - New script to detect timestamp anomalies:
1403 | ```bash
1404 | python scripts/validation/validate_timestamp_integrity.py
1405 | ```
1406 | - Checks for impossible timestamps (`created_at > updated_at`)
1407 | - Detects suspicious timestamp clusters (bulk reset indicators)
1408 | - Analyzes timestamp distribution for anomalies
1409 | - Provides detailed statistics and warnings
1410 |
1411 | ## [8.27.0] - 2025-11-17
1412 |
1413 | ### Added
1414 | - **Hybrid Storage Sync Performance Optimization** - Dramatic initial sync speed improvement (3-5x faster)
1415 | - **Performance Metrics**:
1416 | - **Before**: ~5.5 memories/second (8 minutes for 2,619 memories)
1417 | - **After**: ~15-30 memories/second (1.5-3 minutes for 2,619 memories)
1418 | - **3-5x faster** initial sync from Cloudflare to local SQLite
1419 | - **Optimizations**:
1420 | - **Bulk Existence Check**: `get_all_content_hashes()` method eliminates 2,619 individual DB queries
1421 | - **Parallel Processing**: `asyncio.gather()` with Semaphore(15) for concurrent memory processing
1422 | - **Larger Batch Sizes**: Increased from 100 to 500 memories per Cloudflare API call (5x fewer requests)
1423 | - **Files Modified**:
1424 | - `src/mcp_memory_service/storage/sqlite_vec.py` - Added `get_all_content_hashes()` method (lines 1208-1227)
1425 | - `src/mcp_memory_service/storage/hybrid.py` - Parallel sync implementation (lines 859-921)
1426 | - `scripts/benchmarks/benchmark_hybrid_sync.py` - Performance validation script
1427 | - **Backward Compatibility**: Zero breaking changes, transparent optimization for all sync operations
1428 | - **Use Case**: Users with large memory databases (1000+ memories) will see significantly faster initial sync times
1429 |
1430 | ### Changed
1431 | - **Hybrid Initial Sync Architecture** - Refactored sync loop for better performance
1432 | - O(1) hash lookups instead of O(n) individual queries
1433 | - Concurrent processing with controlled parallelism (15 simultaneous operations)
1434 | - Reduced Cloudflare API overhead with larger batches (6 API calls vs 27)
1435 | - Maintains full drift detection and metadata synchronization capabilities
1436 |
1437 | ### Fixed
1438 | - **Duplicate Sync Queue Architecture** - Resolved inefficient dual-sync issue
1439 | - **Problem**: MCP server and HTTP server each created separate HybridStorage instances with independent sync queues
1440 | - **Impact**: Duplicate sync work, potential race conditions, memory not immediately visible across servers
1441 | - **Solution**: New `MCP_HYBRID_SYNC_OWNER` configuration to control which process handles Cloudflare sync
1442 | - **Configuration Options**:
1443 | - `"http"` - HTTP server only handles sync (recommended - avoids duplicate work)
1444 | - `"mcp"` - MCP server only handles sync
1445 | - `"both"` - Both servers sync independently (default for backward compatibility)
1446 | - **Files Modified**:
1447 | - `src/mcp_memory_service/config.py` - Added `HYBRID_SYNC_OWNER` configuration (lines 424-427)
1448 | - `src/mcp_memory_service/storage/factory.py` - Server-type aware storage creation (lines 76-110)
1449 | - `src/mcp_memory_service/mcp_server.py` - Pass server_type="mcp" (line 143)
1450 | - `src/mcp_memory_service/web/dependencies.py` - Pass server_type="http" (line 65)
1451 | - **Migration Guide**:
1452 | ```bash
1453 | # Recommended: Set HTTP server as sync owner to eliminate duplicate sync
1454 | export MCP_HYBRID_SYNC_OWNER=http
1455 | ```
1456 | - **Backward Compatibility**: Defaults to "both" (existing behavior), no breaking changes
1457 |
1458 | ### Performance
1459 | - **Benchmark Results** (`python scripts/benchmarks/benchmark_hybrid_sync.py`):
1460 | - Bulk hash loading: 2,619 hashes loaded in ~100ms (vs ~13,000ms for individual queries)
1461 | - Parallel processing: 15x concurrency reduces CPU idle time
1462 | - Batch size optimization: 78% reduction in API calls (27 → 6 for 2,619 memories)
1463 | - Combined speedup: 3-5x faster initial sync
1464 |
1465 | ## [8.26.0] - 2025-11-16
1466 |
1467 | ### Added
1468 | - **Global MCP Server Caching** - Revolutionary performance improvement for MCP tools (PR #227)
1469 | - **Performance Metrics**:
1470 | - **534,628x faster** on cache hits (1,810ms → 0.01ms per MCP tool call)
1471 | - **99.9996% latency reduction** for cached operations
1472 | - **90%+ cache hit rate** in normal usage patterns
1473 | - **MCP tools now 41x faster** than HTTP API after warm-up
1474 | - **New MCP Tool**: `get_cache_stats` - Real-time cache performance monitoring
1475 | - Track hits/misses, hit rate percentage
1476 | - Monitor storage and service cache sizes
1477 | - View initialization time statistics (avg/min/max)
1478 | - **Infrastructure**:
1479 | - Global cache structures: `_STORAGE_CACHE`, `_MEMORY_SERVICE_CACHE`, `_CACHE_STATS`
1480 | - Thread-safe concurrent access via `asyncio.Lock`
1481 | - Automatic cleanup on server shutdown (no memory leaks)
1482 | - **Files Modified**:
1483 | - `src/mcp_memory_service/server.py` - Production MCP server caching
1484 | - `src/mcp_memory_service/mcp_server.py` - FastMCP server caching
1485 | - `src/mcp_memory_service/utils/cache_manager.py` - New cache management utilities
1486 | - `scripts/benchmarks/benchmark_server_caching.py` - Cache effectiveness validation
1487 | - **Backward Compatibility**: Zero breaking changes, transparent caching for all MCP clients
1488 | - **Use Case**: MCP tools in Claude Desktop and Claude Code are now the fastest method for memory operations
1489 |
1490 | ### Changed
1491 | - **Code Quality Improvements** - Gemini Code Assist review implementation (PR #227)
1492 | - Eliminated code duplication across `server.py` and `mcp_server.py`
1493 | - Created shared `CacheManager.calculate_stats()` utility for statistics
1494 | - Enhanced PEP 8 compliance with proper naming conventions
1495 | - Added comprehensive inline documentation for cache implementation
1496 |
1497 | ### Fixed
1498 | - **Security Vulnerability** - Removed unsafe `eval()` usage in benchmark script (PR #227)
1499 | - Replaced `eval(stats_str)` with safe `json.loads()` for parsing cache statistics
1500 | - Eliminated arbitrary code execution risk in development tools
1501 | - Improved benchmark script robustness
1502 |
1503 | ### Performance
1504 | - **Benchmark Results** (10 consecutive MCP tool calls):
1505 | - First Call (Cache Miss): ~2,485ms
1506 | - Cached Calls Average: ~0.01ms
1507 | - Speedup Factor: 534,628x
1508 | - Cache Hit Rate: 90%
1509 | - **Impact**: MCP tools are now the recommended method for Claude Desktop and Claude Code users
1510 | - **Technical Details**:
1511 | - Caches persist across stateless HTTP calls
1512 | - Storage instances keyed by "{backend}:{path}"
1513 | - MemoryService instances keyed by storage ID
1514 | - Lazy initialization preserved to prevent startup hangs
1515 |
1516 | ### Documentation
1517 | - Updated Wiki: 05-Performance-Optimization.md with cache architecture
1518 | - Added cache monitoring guide using `get_cache_stats` tool
1519 | - Performance comparison tables now show MCP as fastest method
1520 |
1521 | ## [8.25.2] - 2025-11-16
1522 |
1523 | ### Changed
1524 | - **Drift Detection Script Refactoring** - Improved code maintainability in `check_drift.py` (PR #226)
1525 | - **Refactored**: Cloudflare config dictionary construction to use dictionary comprehension
1526 | - **Improvement**: Separated configuration keys list from transformation logic
1527 | - **Benefit**: Easier to maintain and modify configuration keys
1528 | - **Code Quality**: More Pythonic, cleaner, and more readable
1529 | - **Impact**: No functional changes, pure code quality improvement
1530 | - **File Modified**: `scripts/sync/check_drift.py`
1531 | - **Credit**: Implements Gemini code review suggestions from PR #224
1532 |
1533 | ## [8.25.1] - 2025-11-16
1534 |
1535 | ### Fixed
1536 | - **Drift Detection Script Initialization** - Corrected critical bugs in `check_drift.py` (PR #224)
1537 | - **Bug 1**: Fixed incorrect config attribute `SQLITE_DB_PATH` → `SQLITE_VEC_PATH` in AppConfig
1538 | - **Bug 2**: Added missing `cloudflare_config` parameter to HybridMemoryStorage initialization
1539 | - **Impact**: Script was completely broken for Cloudflare/Hybrid backends - now initializes successfully
1540 | - **Error prevented**: `AttributeError: 'AppConfig' object has no attribute 'SQLITE_DB_PATH'`
1541 | - **File Modified**: `scripts/sync/check_drift.py`
1542 | - **Severity**: High - Script was non-functional for users with hybrid or cloudflare backends
1543 | - **CI Test Infrastructure** - Added HuggingFace model caching to prevent network-related test failures (PR #225)
1544 | - **Root Cause**: GitHub Actions runners cannot access huggingface.co during test runs
1545 | - **Solution**: Implemented `actions/cache@v3` for `~/.cache/huggingface` directory
1546 | - **Pre-download step**: Downloads `all-MiniLM-L6-v2` model after dependency installation
1547 | - **Impact**: Fixes all future PR test failures caused by model download restrictions
1548 | - **Cache Strategy**: Key includes `pyproject.toml` hash for dependency tracking
1549 | - **Performance**: First run downloads model, subsequent runs use cache
1550 | - **File Modified**: `.github/workflows/main.yml`
1551 |
1552 | ### Technical Details
1553 | - **PR #224**: Drift detection script now properly initializes Cloudflare backend with all required parameters (api_token, account_id, d1_database_id, vectorize_index)
1554 | - **PR #225**: CI environment now caches embedding models, eliminating network dependency during test execution
1555 | - **Testing**: Both fixes validated in PR test runs - drift detection now works, tests pass consistently
1556 |
1557 | ## [8.25.0] - 2025-11-15
1558 |
1559 | ### Added
1560 | - **Hybrid Backend Drift Detection** - Automatic metadata synchronization using `updated_at` timestamps (issue #202)
1561 | - **Bidirectional awareness**: Detects metadata changes on either backend (SQLite-vec ↔ Cloudflare)
1562 | - **Periodic drift checks**: Configurable interval via `MCP_HYBRID_DRIFT_CHECK_INTERVAL` (default: 1 hour)
1563 | - **"Newer timestamp wins" conflict resolution**: Prevents data loss during metadata updates
1564 | - **Dry-run support**: Preview changes via `python scripts/sync/check_drift.py`
1565 | - **New configuration variables**:
1566 | - `MCP_HYBRID_SYNC_UPDATES` - Enable metadata sync (default: true)
1567 | - `MCP_HYBRID_DRIFT_CHECK_INTERVAL` - Seconds between drift checks (default: 3600)
1568 | - `MCP_HYBRID_DRIFT_BATCH_SIZE` - Memories to check per scan (default: 100)
1569 | - **New methods**:
1570 | - `BackgroundSyncService._detect_and_sync_drift()` - Core drift detection logic with dry-run mode
1571 | - `CloudflareStorage.get_memories_updated_since()` - Query memories by update timestamp
1572 | - **Enhanced initial sync**: Now detects and syncs metadata drift for existing memories
1573 |
1574 | ### Fixed
1575 | - **Issue #202** - Hybrid backend now syncs metadata updates (tags, types, custom fields)
1576 | - Previous behavior only detected missing memories, ignoring metadata changes
1577 | - Prevented silent data loss when memories updated on one backend but not synced
1578 | - Tag fixes in Cloudflare now properly propagate to local SQLite
1579 | - Metadata updates no longer diverge between backends
1580 |
1581 | ### Changed
1582 | - Initial sync (`_perform_initial_sync`) now compares timestamps for existing memories
1583 | - Periodic sync includes drift detection checks at configurable intervals
1584 | - Sync statistics tracking expanded with drift detection metrics
1585 |
1586 | ### Technical Details
1587 | - **Files Modified**:
1588 | - `src/mcp_memory_service/config.py` - Added 3 configuration variables
1589 | - `src/mcp_memory_service/storage/hybrid.py` - Drift detection implementation (~150 lines)
1590 | - `src/mcp_memory_service/storage/cloudflare.py` - Added `get_memories_updated_since()` method
1591 | - `scripts/sync/check_drift.py` - New dry-run validation script
1592 | - **Architecture**: Timestamp-based drift detection with 1-second clock skew tolerance
1593 | - **Performance**: Non-blocking async operations, configurable batch sizes
1594 | - **Safety**: Opt-in feature, dry-run mode, comprehensive audit logging
1595 |
1596 | ## [8.24.4] - 2025-11-15
1597 |
1598 | ### Changed
1599 | - **Code Quality Improvements** - Applied Gemini Code Assist review suggestions (issue #180)
1600 | - **documents.py:87** - Replaced chained `.replace()` calls with `re.sub()` for path separator sanitization
1601 | - **app.js:751-762** - Cached DOM elements in setProcessingMode to reduce query overhead
1602 | - **app.js:551-553, 778-780** - Cached upload option elements to optimize handleDocumentUpload
1603 | - **index.html:357, 570** - Fixed indentation consistency for closing `</div>` tags
1604 | - Performance impact: Minor - reduced DOM query overhead
1605 | - Breaking changes: None
1606 |
1607 | ### Technical Details
1608 | - **Files Modified**: `src/mcp_memory_service/web/api/documents.py`, `src/mcp_memory_service/web/static/app.js`, `src/mcp_memory_service/web/static/index.html`
1609 | - **Code Quality**: Regex-based sanitization more scalable, DOM element caching reduces redundant queries
1610 | - **Commit**: ffc6246 - refactor: code quality improvements from Gemini review (issue #180)
1611 |
1612 | ## [8.24.3] - 2025-11-15
1613 |
1614 | ### Fixed
1615 | - **GitHub Release Manager Agent** - Resolved systematic version history omission in README.md (commit ccf959a)
1616 | - Fixed agent behavior that was omitting previous versions from "Previous Releases" section
1617 | - Added v8.24.1 to Previous Releases list (was missing despite being valid release)
1618 | - Enhanced agent instructions with CRITICAL section for maintaining version history integrity
1619 | - Added quality assurance checklist item to prevent future omissions
1620 | - Root cause: Agent was replacing entire Previous Releases section instead of prepending new version
1621 |
1622 | ### Added
1623 | - **Test Coverage for Tag+Time Filtering** - Comprehensive test suite for issue #216 (commit ebff282)
1624 | - 10 unit tests passing across SQLite-vec, Cloudflare, and Hybrid backends
1625 | - Validates PR #215 functionality (tag+time filtering to fix semantic over-filtering bug #214)
1626 | - Tests verify memories can be retrieved using both tag criteria AND time range filters
1627 | - API integration tests created (with known threading issues documented for future fix)
1628 | - Ensures regression prevention for semantic search over-filtering bug
1629 |
1630 | ### Changed
1631 | - GitHub release workflow now more reliable with enhanced agent guardrails
1632 | - Test suite provides better coverage for multi-filter memory retrieval scenarios
1633 |
1634 | ### Technical Details
1635 | - **Files Modified**:
1636 | - `.claude/agents/github-release-manager.md` - Added CRITICAL section for Previous Releases maintenance
1637 | - `tests/test_time_filtering.py` - 10 new unit tests for tag+time filtering
1638 | - `tests/integration/test_api_time_search.py` - API integration tests (threading issues documented)
1639 | - **Test Execution**: All 10 unit tests passing, API tests have known threading limitations
1640 | - **Impact**: Prevents version history loss in future releases, ensures tag+time filtering remains functional
1641 |
1642 | ## [8.24.2] - 2025-11-15
1643 |
1644 | ### Fixed
1645 | - **CI/CD Workflow Infrastructure** - Development Setup Validation workflow fixes (issue #217 related)
1646 | - Fixed bash errexit handling in workflow tests - prevents premature exit on intentional test failures
1647 | - Corrected exit code capture using EXIT_CODE=0 and || EXIT_CODE=$? pattern
1648 | - All 5 workflow tests now passing: version consistency, pre-commit hooks, server warnings, developer prompts, docs accuracy
1649 | - Root cause: bash runs with -e flag (errexit), which exits immediately when commands return non-zero exit codes
1650 | - Tests intentionally run check_dev_setup.py expecting exit code 1, but bash was exiting before capture
1651 | - Commits: b4f9a5a, d1bcd67
1652 |
1653 | ### Changed
1654 | - Workflow tests can now properly validate that the development setup validator correctly detects problems
1655 | - Exit code capture no longer uses "|| true" pattern (was making all commands return 0)
1656 |
1657 | ### Technical Details
1658 | - **Files Modified**: .github/workflows/dev-setup-validation.yml
1659 | - **Pattern Change**:
1660 | - Before: `python script.py || true` (always returns 0, breaks exit code testing)
1661 | - After: `EXIT_CODE=0; python script.py || EXIT_CODE=$?` (captures actual exit code, prevents bash exit)
1662 | - **Test Jobs**: All 5 jobs in dev-setup-validation workflow now pass consistently
1663 | - **Context**: Part of test infrastructure improvement efforts (issue #217)
1664 |
1665 | ## [8.24.1] - 2025-11-15
1666 |
1667 | ### Fixed
1668 | - **Test Infrastructure Failures** - Resolved 27 pre-existing test failures (issue #217)
1669 | - Fixed async fixture incompatibility in 6 test files (19+ failures)
1670 | - Corrected missing imports (MCPMemoryServer → MemoryServer, removed MemoryMetadata)
1671 | - Added missing content_hash parameter to Memory() instantiations
1672 | - Updated hardcoded version strings (6.3.0 → 8.24.0)
1673 | - Improved test pass rate from 63% to 71% (412/584 tests passing)
1674 | - Execution: Automated via amp-bridge agent
1675 |
1676 | ### Changed
1677 | - Test suite now has cleaner baseline for detecting new regressions
1678 | - All async test fixtures now use @pytest_asyncio.fixture decorator
1679 |
1680 | ### Technical Details
1681 | - **Automated Fix**: Used amp-bridge agent for pattern-based refactoring
1682 | - **Execution Time**: ~15 minutes (vs 1-2 hours manual)
1683 | - **Files Modified**: 11 test files across tests/ and tests/integration/
1684 | - **Root Causes**: Test infrastructure issues, not code bugs
1685 | - **Remaining Failures**: 172 failures remain (backend config, performance, actual bugs)
1686 |
1687 | ## [8.24.0] - 2025-11-12
1688 |
1689 | ### Added
1690 | - **PyPI Publishing Automation** - Package now available via `pip install mcp-memory-service`
1691 | - **Workflow Automation**: Configured GitHub Actions workflow to automatically publish to PyPI on tag pushes
1692 | - **Installation Simplification**: Users can now install directly via `pip install mcp-memory-service` or `uv pip install mcp-memory-service`
1693 | - **Accessibility**: Resolves installation barriers for users without git access or familiarity
1694 | - **Token Configuration**: Secured with `PYPI_TOKEN` GitHub secret for automated publishing
1695 | - **Quality Gates**: Publishes only after successful test suite execution
1696 |
1697 | ### Changed
1698 | - **Distribution Method**: Added PyPI as primary distribution channel alongside GitHub releases
1699 | - **Installation Documentation**: Updated guides to include pip-based installation as recommended method
1700 |
1701 | ### Technical Details
1702 | - **Files Modified**:
1703 | - `.github/workflows/publish.yml` - NEW workflow for automated PyPI publishing
1704 | - GitHub repository secrets - Added `PYPI_TOKEN` for authentication
1705 | - **Trigger**: Workflow runs automatically on git tag creation (pattern: `v*.*.*`)
1706 | - **Build System**: Uses Hatchling build backend with `python-semantic-release`
1707 |
1708 | ### Migration Notes
1709 | - **For New Users**: Preferred installation is now `pip install mcp-memory-service`
1710 | - **For Existing Users**: No action required - git-based installation continues to work
1711 | - **For Contributors**: Tag creation now triggers PyPI publishing automatically
1712 |
1713 | ## [8.23.1] - 2025-11-10
1714 |
1715 | ### Fixed
1716 | - **Stale Virtual Environment Prevention System** - Comprehensive 6-layer strategy to prevent "stale venv vs source code" version mismatches
1717 | - **Root Cause**: MCP servers load from site-packages, not source files. System restart doesn't help - it relaunches with same stale package
1718 | - **Impact**: Prevented issue that caused v8.23.0 tag validation bug to persist despite v8.22.2 fix (source showed v8.23.0 while venv had v8.5.3)
1719 |
1720 | ### Added
1721 | - **Phase 1: Automated Detection**
1722 | - New `scripts/validation/check_dev_setup.py` - Validates source/venv version consistency, detects editable installs
1723 | - Enhanced `scripts/hooks/pre-commit` - Blocks commits when venv is stale, provides actionable error messages
1724 | - Added CLAUDE.md development setup section with explicit `pip install -e .` guidance
1725 |
1726 | - **Phase 2: Runtime Warnings**
1727 | - Added `check_version_consistency()` function in `src/mcp_memory_service/server.py`
1728 | - Server startup warnings when version mismatch detected (source vs package)
1729 | - Updated README.md developer section with editable install instructions
1730 | - Enhanced `docs/development/ai-agent-instructions.md` with proper setup commands
1731 |
1732 | - **Phase 3: Interactive Onboarding**
1733 | - Enhanced `scripts/installation/install.py` with developer detection (checks for git repo)
1734 | - Interactive prompt guides developers to use `pip install -e .` for editable installs
1735 | - New CI/CD workflow `.github/workflows/dev-setup-validation.yml` with 5 comprehensive test jobs:
1736 | 1. Version consistency validation
1737 | 2. Pre-commit hook functionality
1738 | 3. Server startup warnings
1739 | 4. Interactive developer prompts
1740 | 5. Documentation accuracy checks
1741 |
1742 | ### Changed
1743 | - **Developer Workflow**: Developers now automatically guided to use `pip install -e .` for proper setup
1744 | - **Pre-commit Hook**: Now validates venv consistency before allowing commits
1745 | - **Installation Process**: Detects developer mode and provides targeted guidance
1746 |
1747 | ### Technical Details
1748 | - **6-Layer Prevention System**:
1749 | 1. **Development**: Pre-commit hook blocks bad commits, detection script validates setup
1750 | 2. **Runtime**: Server startup warnings catch edge cases
1751 | 3. **Documentation**: CLAUDE.md, README.md, ai-agent-instructions.md all updated
1752 | 4. **Automation**: check_dev_setup.py, pre-commit hook, CI/CD workflow
1753 | 5. **Interactive**: install.py prompts developers for editable install
1754 | 6. **Testing**: CI/CD workflow with 5 comprehensive test jobs
1755 |
1756 | - **Files Modified**:
1757 | - `scripts/validation/check_dev_setup.py` - NEW automated detection script
1758 | - `scripts/hooks/pre-commit` - Enhanced with venv validation
1759 | - `CLAUDE.md` - Added development setup guidance
1760 | - `src/mcp_memory_service/server.py` - Added runtime version check
1761 | - `README.md` - Updated developer section
1762 | - `docs/development/ai-agent-instructions.md` - Updated setup commands
1763 | - `scripts/installation/install.py` - Added developer detection
1764 | - `.github/workflows/dev-setup-validation.yml` - NEW CI/CD validation
1765 |
1766 | ### Migration Notes
1767 | - **For Developers**: Run `pip install -e .` to install in editable mode (will be prompted by install.py)
1768 | - **For Users**: No action required - prevention system is transparent for production use
1769 | - **Pre-commit Hook**: Automatically installed during `install.py`, validates on every commit
1770 |
1771 | ### Commits Included
1772 | - `670fb74` - Phase 1: Automated detection (check_dev_setup.py, pre-commit hook, CLAUDE.md)
1773 | - `9537259` - Phase 2: Runtime warnings (server.py) + developer documentation
1774 | - `a17bcc7` - Phase 3: Interactive onboarding (install.py) + CI/CD validation
1775 | ## [8.23.0] - 2025-11-10
1776 |
1777 | ### Added
1778 | - **Consolidation Scheduler via Code Execution API** - Dream-based memory consolidation now operates independently of MCP server
1779 | - **Architecture Shift**: Migrated ConsolidationScheduler from MCP server to HTTP server using Code Execution API (v8.19.0+)
1780 | - **Token Efficiency**: Achieves **88% token reduction** (803K tokens/year saved) by eliminating redundant memory retrieval
1781 | - **24/7 Operation**: Consolidation now runs continuously via HTTP server, independent of Claude Desktop sessions
1782 | - **Code Execution Extensions**:
1783 | - Added `CompactConsolidationResult` and `CompactSchedulerStatus` types for efficient data transfer
1784 | - Implemented `consolidate()` and `scheduler_status()` functions in API operations
1785 | - Enhanced API client with consolidator/scheduler management capabilities
1786 | - **HTTP API Endpoints** (new):
1787 | - `POST /api/consolidation/trigger` - Manual consolidation trigger for specific time horizons
1788 | - `GET /api/consolidation/status` - Scheduler health and job status monitoring
1789 | - `GET /api/consolidation/recommendations` - Analysis-based consolidation suggestions
1790 | - **Graceful Lifecycle**: HTTP server lifespan events handle scheduler startup/shutdown
1791 | - **Dependencies**: Made `apscheduler>=3.11.0` a required dependency (previously optional)
1792 | - **Files Modified**:
1793 | - `src/mcp_memory_service/api/types.py` - New compact result types
1794 | - `src/mcp_memory_service/api/operations.py` - Consolidation functions
1795 | - `src/mcp_memory_service/api/client.py` - Client methods
1796 | - `src/mcp_memory_service/api/__init__.py` - Export updates
1797 | - `src/mcp_memory_service/web/app.py` - Scheduler integration
1798 | - `src/mcp_memory_service/web/api/consolidation.py` - NEW endpoint router
1799 | - `pyproject.toml` - Dependency update
1800 |
1801 | ### Changed
1802 | - **Consolidation Workflow**: Users can now trigger and monitor consolidation via HTTP API or web dashboard
1803 | - **Performance**: Background consolidation no longer impacts MCP server response times
1804 | - **Reliability**: Scheduler continues running even when Claude Desktop is closed
1805 |
1806 | ### Migration Notes
1807 | - **Backward Compatible**: Existing MCP consolidation tools continue to work via Code Execution API
1808 | - **HTTP Server Required**: For scheduled consolidation, HTTP server must be running (`export MCP_HTTP_ENABLED=true`)
1809 | - **No Action Needed**: Consolidation automatically migrates to HTTP server when enabled
1810 |
1811 | ### Technical Details
1812 | - **Token Savings Breakdown**:
1813 | - Before: ~900K tokens/year (MCP server retrieval overhead)
1814 | - After: ~97K tokens/year (compact API responses)
1815 | - Reduction: 803K tokens (88% efficiency gain)
1816 | - **Execution Model**: Code Execution API handles consolidation in isolated Python environment
1817 | - **Scheduler Configuration**: Same settings as before (`.env` or environment variables)
1818 |
1819 | ## [8.22.3] - 2025-11-10
1820 |
1821 | ### Fixed
1822 | - **Complete Tag Schema Validation Fix**: Extended oneOf schema pattern to ALL MCP tools with tags parameter
1823 | - Previous fixes (v8.22.1-v8.22.2) only addressed character-split bugs in handler code
1824 | - Root cause: 7 tools had schemas accepting ONLY arrays, rejecting comma-separated strings at MCP client validation
1825 | - Updated tool schemas to accept both array and string formats using `oneOf` pattern:
1826 | - `update_memory_metadata` (line 1733)
1827 | - `search_by_tag` (line 1428)
1828 | - `delete_by_tag` (line 1475)
1829 | - `delete_by_tags` (line 1506)
1830 | - `delete_by_all_tags` (line 1536)
1831 | - `ingest_document` (line 1958)
1832 | - `ingest_directory` (line 2015)
1833 | - Added `normalize_tags()` calls in all affected handlers to properly parse comma-separated strings
1834 | - Validation now happens gracefully: client accepts both formats, server normalizes to array
1835 | - **Breaking**: Users must reconnect MCP client (`/mcp` in Claude Code) to fetch updated schemas
1836 | - Resolves recurring "Input validation error: 'X' is not of type 'array'" errors
1837 |
1838 | ### Technical Details
1839 | - **Validation Flow**: MCP client validates against tool schema → Server normalizes tags → Storage processes
1840 | - **Schema Pattern**: Each tags parameter now uses `{"oneOf": [{"type": "array"}, {"type": "string"}]}`
1841 | - **Handler Updates**: 7 handlers updated to import and call `normalize_tags()` from `services/memory_service.py`
1842 | - **File Modified**: `src/mcp_memory_service/server.py` (schemas + handlers)
1843 |
1844 | ### Notes
1845 | - This completes the tag parsing fix saga (v8.22.1 → v8.22.2 → v8.22.3)
1846 | - v8.22.1: Fixed character-split bug in documents.py
1847 | - v8.22.2: Extended fix to server.py and cli/ingestion.py handlers
1848 | - v8.22.3: Fixed JSON schemas to accept comma-separated strings at validation layer
1849 |
1850 | ## [8.22.2] - 2025-11-09
1851 |
1852 | ### Fixed
1853 | - **Complete Tag Parsing Fix** - Extended v8.22.1 fix to all remaining locations where tag parsing bug existed
1854 | - **Additional Files Fixed**:
1855 | - `src/mcp_memory_service/server.py` - MCP ingest_document and ingest_directory tool handlers (2 locations)
1856 | - `src/mcp_memory_service/cli/ingestion.py` - CLI ingest_file and ingest_directory commands (2 locations)
1857 | - **Root Cause**: Same as v8.22.1 - `.extend()` on comma-separated string treated as character iterable
1858 | - **Impact**: MCP tools and CLI commands now correctly parse comma-separated tags
1859 | - **Database Repair**: 6 additional memories repaired from metadata backup (total 19 across both releases)
1860 | - **Verification**: All tag parsing code paths now include `isinstance()` type checking
1861 |
1862 | ## [8.22.1] - 2025-11-09
1863 |
1864 | ### Fixed
1865 | - **Document Ingestion Tag Parsing** - Fixed critical data corruption bug where tags were stored character-by-character instead of as complete strings
1866 | - **Root Cause**: When `chunk.metadata['tags']` contained a comma-separated string (e.g., `"claude-code-hooks,update-investigation"`), the `extend()` method treated it as an iterable and added each character individually
1867 | - **Symptom**: Tags like `"claude-code-hooks,update-investigation,configuration,breaking-changes"` became `['c','l','a','u','d','e','-','c','o','d','e','-','h','o','o','k','s',',','u','p','d','a','t','e',...]` (80+ character tags per memory)
1868 | - **Impact**: Memories were unsearchable by tags, tag filtering broken, tag display cluttered with single characters
1869 | - **Fix**: Added `isinstance()` type check to detect string vs list, properly split comma-separated strings before extending tag list
1870 | - **Database Repair**: 13 affected memories automatically repaired using metadata field (which stored correct tags)
1871 | - **Files Modified**: `src/mcp_memory_service/web/api/documents.py` (lines 424-430 for single uploads, 536-542 for batch uploads)
1872 |
1873 | ## [8.22.0] - 2025-11-09
1874 |
1875 | ### Fixed
1876 | - **Session-Start Hook Stability & UX** - Comprehensive reliability and output quality improvements
1877 | - **Memory Age Calculation**: Fixed memory age analyzer defaulting to 365 days for all memories
1878 | - Added `created_at_iso` field to Code Execution API response mapping
1879 | - Now correctly shows recent work (e.g., "🕒 today", "📅 2d ago")
1880 | - Resolves memory age display bug (Related: Issue #214)
1881 | - **Timeout Improvements**: Prevents timeouts during DNS retries and slow network operations
1882 | - Increased code execution timeout: 8000ms → 15000ms
1883 | - Increased sessionStart hook timeout: 10000ms → 20000ms
1884 | - **Tree Formatting Enhancements**: Complete rewrite for proper ANSI-aware rendering
1885 | - ANSI-aware width calculation in wrapText() function
1886 | - Tree prefix parameter for proper continuation line formatting
1887 | - Normalized embedded newlines to prevent structure breaks
1888 | - Fixed line breaks cutting through tree characters (│, ├─, └─)
1889 | - **Date Sanitization**: Enhanced patterns for multi-line date formats
1890 | - Removes clutter from old session summaries (e.g., "Date:\n 9.11.")
1891 | - Added re-sanitization after section extraction
1892 | - **Output Visibility**: Restored console.log output for user-visible tree display
1893 | - Critical fix for output regression where tree was invisible to users
1894 | - **Status Bar Improvements**: Added "memories" label for clarity
1895 | - Format: "💭 6 (4 recent) memories" instead of just "💭 6 (4 recent)"
1896 | - Corrected documentation: "static" instead of "300ms updates"
1897 | - **Configuration**: Removed duplicate codeExecution block from config.json
1898 | - Files modified: `core/session-start.js`, `utilities/context-formatter.js`, `statusline.sh`, `README.md`, `config.json`
1899 |
1900 | ## [8.21.0] - 2025-11-08
1901 |
1902 | ### Added
1903 | - **Amp PR Automator Agent** - Lightweight PR automation using Amp CLI (1,240+ lines)
1904 | - OAuth-free alternative to Gemini PR Automator with file-based workflow
1905 | - `.claude/agents/amp-pr-automator.md` - Complete agent definition
1906 | - `scripts/pr/amp_quality_gate.sh` - Parallel complexity, security, type hint checks
1907 | - `scripts/pr/amp_collect_results.sh` - Aggregate Amp analysis results
1908 | - `scripts/pr/amp_suggest_fixes.sh` - Generate fix suggestions from review feedback
1909 | - `scripts/pr/amp_generate_tests.sh` - Create pytest tests for new code
1910 | - `scripts/pr/amp_detect_breaking_changes.sh` - Identify API breaking changes
1911 | - `scripts/pr/amp_pr_review.sh` - Complete review workflow orchestration
1912 | - Fast parallel processing with UUID-based prompt/response tracking
1913 | - Credit conservation through focused, non-interactive tasks
1914 |
1915 | ### Fixed
1916 | - **Memory Hook Tag+Time Filtering** (Issue #214, PR #215) - Fixed semantic over-filtering bug
1917 | - Enhanced `search_by_tag()` with optional `time_start` parameter across all backends
1918 | - Replaced limited `parse_time_query` with robust `parse_time_expression` from `utils.time_parser`
1919 | - Fixed HTTP client time filter format (ISO date instead of custom string)
1920 | - Improved SQL construction clarity in Cloudflare backend
1921 | - Removed unused `match_all` parameter from hybrid backend (regression fix)
1922 | - Quality gate: 9.2/10 (Gemini Code Assist review - 4 critical issues fixed)
1923 | - Time parser tests: 14/14 PASS (100%)
1924 |
1925 | ## [8.20.1] - 2025-11-08
1926 |
1927 | ### Fixed
1928 | - **retrieve_memory MCP tool**: Fixed MemoryQueryResult serialization error introduced in v8.19.1
1929 | - Extract Memory object from MemoryQueryResult before formatting response
1930 | - Add similarity_score to response for consistency with recall_memory
1931 | - Affects all backends (sqlite-vec, cloudflare, hybrid)
1932 | - Issue #211 follow-up fix - thanks @VibeCodeChef for detailed testing!
1933 |
1934 | ## [8.20.0] - 2025-11-08
1935 |
1936 | ### Added
1937 | - **GraphQL PR Review Integration** - GitHub GraphQL API for advanced PR operations
1938 | - `resolve_threads.sh` - Auto-resolve review threads when commits address feedback (saves 2+ min/PR)
1939 | - `thread_status.sh` - Display all review threads with resolution status
1940 | - Reusable GraphQL helper library in `scripts/pr/lib/graphql_helpers.sh`
1941 | - Smart commit tracking for resolved vs outdated threads
1942 | - **PR Automation Workflow** - Comprehensive Gemini Code Assist integration
1943 | - `auto_review.sh` - Automated iterative PR review cycles (saves 10-30 min/PR)
1944 | - `quality_gate.sh` - Pre-PR quality checks (complexity, security, tests, breaking changes)
1945 | - `generate_tests.sh` - Auto-generate pytest tests for new code
1946 | - `detect_breaking_changes.sh` - API diff analysis with severity classification
1947 | - **Amp Bridge Redesign** - Direct code execution mode for batch operations
1948 | - Execute prompts directly without prompt file management
1949 | - Batch processing support for multiple operations
1950 | - Improved error handling and output formatting
1951 | - **Code Quality Guard Agent** - Fast automated code quality analysis
1952 | - Pre-commit hook for complexity scoring (blocks >8, warns >7)
1953 | - Security pattern detection (SQL injection, XSS, command injection)
1954 | - TODO prioritization with impact analysis (Critical/High/Medium/Low)
1955 | - Integrated with Gemini CLI for fast analysis
1956 | - **Gemini PR Automator Agent** - Eliminates manual review wait times
1957 | - Automated "Fix → Comment → /gemini review → Wait → Repeat" workflow
1958 | - Intelligent fix classification (safe vs unsafe)
1959 | - Comprehensive test generation for all new code
1960 | - Breaking change detection with severity levels
1961 | - **Groq Bridge Integration** - 10x faster alternative to Gemini CLI
1962 | - Python CLI (`groq_agent_bridge.py`) for non-interactive LLM calls
1963 | - Support for llama-3.3-70b-versatile, Kimi K2 (256K context), and other Groq models
1964 | - Drop-in replacement for Gemini CLI with same interface
1965 | - Model comparison documentation with performance benchmarks
1966 | - **Pre-commit Hook Infrastructure** - Quality gates before commit
1967 | - Symlinked hook: `.git/hooks/pre-commit` → `scripts/hooks/pre-commit`
1968 | - Automated complexity checks on staged Python files
1969 | - Security vulnerability scanning (blocks commit if found)
1970 | - Graceful degradation if Gemini CLI not installed
1971 |
1972 | ### Documentation
1973 | - Added `docs/pr-graphql-integration.md` - GraphQL PR review integration guide
1974 | - Added `docs/integrations/groq-bridge.md` - Setup and usage guide for Groq integration
1975 | - Added `docs/integrations/groq-integration-summary.md` - Integration overview
1976 | - Added `docs/integrations/groq-model-comparison.md` - Performance benchmarks and model selection
1977 | - Added `docs/amp-cli-bridge.md` - Amp CLI integration guide
1978 | - Added `docs/development/todo-tracker.md` - Automated TODO tracking output
1979 | - Added `docs/troubleshooting/hooks-quick-reference.md` - Hook debugging and troubleshooting
1980 | - Added `docs/document-ingestion.md` - Document parsing guide
1981 | - Added `docs/legacy/dual-protocol-hooks.md` - Historical hook configuration
1982 | - Added `scripts/maintenance/memory-types.md` - Memory type taxonomy documentation
1983 |
1984 | ### Changed
1985 | - Updated `.claude/agents/github-release-manager.md` - Enhanced with latest release workflow
1986 | - Updated `.env.example` - Removed deprecated ChromaDB backend references
1987 | - Updated API specification - Removed `chroma` from backend enum
1988 | - Updated example configs - Modernized to use Python module approach
1989 |
1990 | ### Fixed
1991 | - **PR Automation Scripts** - Addressed all Gemini Code Assist review feedback
1992 | - Removed hardcoded repository name from all PR scripts (now dynamic with `gh repo view`)
1993 | - Fixed script path handling in documentation examples
1994 | - Improved error messages and validation in GraphQL helpers
1995 | - Enhanced documentation with correct usage examples
1996 | - Removed all ChromaDB artifacts from active code (deprecated in v8.0.0)
1997 | - Fixed broken test imports (`CHROMADB_MAX_CONTENT_LENGTH` removed)
1998 | - Updated integration tests to remove `--chroma-path` CLI assertions
1999 | - Cleaned up example configurations
2000 | - Added clear deprecation warnings in `install.py`
2001 |
2002 | ### Performance
2003 | - Groq bridge provides 10x faster inference vs Gemini CLI
2004 | - llama-3.3-70b: ~300ms response time
2005 | - Kimi K2: ~200ms response time (fastest)
2006 | - llama-3.1-8b-instant: ~300ms response time
2007 | - Pre-commit hooks minimize developer wait time with complexity checks
2008 |
2009 | ## [8.19.1] - 2025-11-07
2010 |
2011 | ### Fixed
2012 | - **Critical MCP Tool Regressions** (Issue #211) - Two core MCP tools broken in v8.19.0
2013 | - **retrieve_memory**: Fixed parameter error where unsupported 'tags' parameter was passed to storage.retrieve()
2014 | - Removed unsupported parameters from storage call
2015 | - Implemented post-retrieval filtering in MemoryService
2016 | - File: `src/mcp_memory_service/services/memory_service.py`
2017 | - **search_by_tag**: Fixed type error where code assumed created_at was always string
2018 | - Added type checking for both float (timestamp) and string (ISO format)
2019 | - Uses `datetime.fromtimestamp()` for floats, `datetime.fromisoformat()` for strings
2020 | - Files: `src/mcp_memory_service/server.py` (handle_search_by_tag, handle_retrieve_memory)
2021 | - **Impact**: Both tools now work correctly with hybrid storage backend
2022 | - **Root Cause**: v8.19.0 refactoring introduced incompatibilities with hybrid storage
2023 |
2024 | ## [8.19.0] - 2025-11-07
2025 |
2026 | ### Added
2027 | - **Code Execution Interface API** 🚀 - Revolutionary token efficiency for MCP Memory Service (Issue #206)
2028 | - **Core API Module** (`src/mcp_memory_service/api/`):
2029 | - Compact NamedTuple types (91% size reduction vs MCP tool responses)
2030 | - Core operations: `search()`, `store()`, `health()`
2031 | - Sync wrapper utilities (hide asyncio complexity)
2032 | - Storage client with connection reuse
2033 | - **Session Hook Migration** (`claude-hooks/core/session-start.js`):
2034 | - Code execution wrapper for token-efficient memory retrieval
2035 | - Automatic MCP fallback (100% reliability)
2036 | - Performance metrics tracking
2037 | - Zero breaking changes
2038 | - **Migration Guide** (`docs/migration/code-execution-api-quick-start.md`):
2039 | - 5-minute migration workflow
2040 | - Cost savings calculator
2041 | - Comprehensive troubleshooting
2042 | - Platform-specific instructions
2043 | - **Comprehensive Documentation**:
2044 | - API reference guide
2045 | - Phase 1 and Phase 2 implementation summaries
2046 | - Research documents (10,000+ words)
2047 | - Performance benchmarks
2048 |
2049 | ### Changed
2050 | - **Installer Default** - Code execution now enabled by default for new installations
2051 | - Auto-detects Python path (Windows: `python`, Unix: `python3`)
2052 | - Validates Python version (warns if < 3.10)
2053 | - Shows token reduction benefits during installation
2054 | - Graceful upgrade path for existing users
2055 |
2056 | ### Performance
2057 | - **Token Reduction (Validated)**:
2058 | - Session hooks: **75% reduction** (3,600 → 900 tokens)
2059 | - Search operations: **85% reduction** (2,625 → 385 tokens)
2060 | - Store operations: **90% reduction** (150 → 15 tokens)
2061 | - Health checks: **84% reduction** (125 → 20 tokens)
2062 | - **Execution Performance**:
2063 | - Cold start: 61.1ms (target: <100ms)
2064 | - Warm calls: 1.3ms avg (target: <10ms)
2065 | - Memory overhead: <10MB
2066 | - **Annual Savings Potential**:
2067 | - 10 users: **$23.82/year** (158.8M tokens saved)
2068 | - 100 users: **$238.20/year** (1.59B tokens saved)
2069 | - 1000 users: **$2,382/year** (15.9B tokens saved)
2070 |
2071 | ### Fixed
2072 | - **Cross-Platform Compatibility** - Replaced hardcoded macOS paths with `get_base_directory()`
2073 | - **Async/Await Pattern** - Fixed async `health()` to properly await storage operations
2074 | - **Resource Management** - Added explicit `close()` and `close_async()` methods
2075 | - **Documentation** - Fixed Unicode symbols and absolute local paths for better compatibility
2076 |
2077 | ### Technical Details
2078 | - **Files Added**: 23 files, 6,517 lines (production + tests + docs)
2079 | - **Test Coverage**: 52 tests (88% passing)
2080 | - **Backward Compatibility**: 100% (zero breaking changes)
2081 | - **Platform Support**: macOS, Linux, Windows
2082 | - **API Exports**: `search`, `store`, `health`, `close`, `close_async`
2083 |
2084 | ### Removed
2085 | - **Obsolete ChromaDB Test Infrastructure** - Removed all test files referencing deprecated ChromaDB storage backend
2086 | - **Deleted Files**:
2087 | - `tests/performance/test_caching.py` - ChromaDB-specific performance tests
2088 | - `tests/test_timestamp_recall.py` - Timestamp tests using ChromaDB APIs
2089 | - `tests/test_tag_storage.py` - Tag storage tests for ChromaDB
2090 | - `tests/integration/test_storage.py` - ChromaDB storage diagnostic script
2091 | - `tests/unit/test_tags.py` - Tag deletion tests using deprecated CHROMA_PATH
2092 | - `tests/test_content_splitting.py::test_chromadb_limit()` - ChromaDB content limit test
2093 | - **Updated**: `tests/conftest.py` - Generic database testing fixture (removed ChromaDB reference)
2094 | - **Context**: ChromaDB backend was fully replaced by SQLite-vec, Cloudflare, and Hybrid backends
2095 | - **Impact**: Test suite no longer has broken imports or references to removed storage layer
2096 |
2097 | ## [8.18.2] - 2025-11-06
2098 |
2099 | ### Fixed
2100 | - **MCP Tool Handler Method Name** - Fixed critical bug where MCP tool handlers called non-existent `retrieve_memory()` method
2101 | - **Root Cause**: Method name mismatch introduced in commit 36e9845 during MemoryService refactoring (Oct 28, 2025)
2102 | - **Symptom**: `'MemoryService' object has no attribute 'retrieve_memory'` error when using MCP retrieve_memory tool
2103 | - **Fix**: Updated handlers to call correct `retrieve_memories()` method (plural)
2104 | - **Files Modified**: `src/mcp_memory_service/server.py` (line 2153), `src/mcp_memory_service/mcp_server.py` (line 227)
2105 | - **Additional**: Removed unsupported `min_similarity` parameter from MCP tool definition
2106 | - **Impact**: MCP retrieve_memory tool now functions correctly
2107 | - **Issue**: [#207](https://github.com/doobidoo/mcp-memory-service/issues/207)
2108 |
2109 | ## [8.18.1] - 2025-11-05
2110 |
2111 | ### Fixed
2112 | - **Test Suite Import Errors** - Resolved critical import failures blocking all test collection
2113 | - **MCP Client Import**: Updated from deprecated `mcp` module to `mcp.client.session` (v1.1.2 API)
2114 | - **Storage Path Import**: Removed obsolete `CHROMA_PATH` constant that no longer exists in current architecture
2115 | - **Impact**: Restored ability to collect and run 190 test cases across unit, integration, and E2E test suites
2116 | - **PR**: [#205](https://github.com/doobidoo/mcp-memory-service/pull/205)
2117 | - **Issue**: [#204](https://github.com/doobidoo/mcp-memory-service/issues/204)
2118 |
2119 | ### Technical Details
2120 | - **Test Files Updated**: `tests/unit/test_import.py`, `tests/integration/test_store_memory.py`
2121 | - **Import Fix**: `from mcp import ClientSession, StdioServerParameters` → `from mcp.client.session import ClientSession`
2122 | - **Cleanup**: Removed dependency on deprecated storage constants
2123 |
2124 | ## [8.18.0] - 2025-11-05
2125 |
2126 | ### Performance
2127 | - **Analytics Dashboard Optimization** - 90% performance improvement for dashboard analytics
2128 | - **New Method**: `get_memory_timestamps()` added to all storage backends (SQLite-Vec, Cloudflare, Hybrid)
2129 | - **Optimization**: Single optimized SQL query instead of N individual queries for timestamp retrieval
2130 | - **Impact**: Dashboard analytics load significantly faster, especially with large memory datasets
2131 | - **PR**: [#203](https://github.com/doobidoo/mcp-memory-service/pull/203)
2132 | - **Issue**: [#186](https://github.com/doobidoo/mcp-memory-service/issues/186)
2133 |
2134 | ### Added
2135 | - **Type Safety Enhancements** - Pydantic models for analytics data structures
2136 | - **Models**: `LargestMemory` (content hash, size, created timestamp) and `GrowthTrendPoint` (date, cumulative count)
2137 | - **Benefit**: Enhanced type checking and validation for analytics endpoints
2138 | - **File**: `src/mcp_memory_service/web/api/analytics.py`
2139 |
2140 | ### Fixed
2141 | - **Weekly Activity Year Handling** - Fixed incorrect aggregation of same week numbers across different years
2142 | - **Issue**: Week 1 of 2024 and Week 1 of 2025 were being combined in weekly activity charts
2143 | - **Solution**: Year included in grouping logic for proper temporal separation
2144 | - **Impact**: Weekly activity charts now accurately reflect year boundaries
2145 |
2146 | ### Technical Details
2147 | - **Storage Interface**: `get_memory_timestamps()` method added to base `MemoryStorage` class
2148 | - **Backend Implementation**: Optimized SQL queries for SQLite-Vec, Cloudflare D1, and Hybrid storage
2149 | - **Code Quality**: Import organization and naming consistency improvements per Gemini Code Assist review
2150 |
2151 | ## [8.17.1] - 2025-11-05
2152 |
2153 | ### Documentation
2154 | - **Workflow Documentation Harvest** - Comprehensive project management templates adapted from PR #199
2155 | - **GitHub Issue Templates**: Structured bug/feature/performance reports with environment validation
2156 | - `bug_report.yml`: OS, Python version, storage backend, reproduction steps
2157 | - `feature_request.yml`: Use case, alternatives, impact assessment
2158 | - `performance_issue.yml`: Metrics, database size, profiling data
2159 | - `config.yml`: Template selector with Wiki/Discussions links
2160 | - **Regression Test Scenarios**: 10 structured test procedures (Setup → Execute → Evidence → Pass/Fail)
2161 | - Database locking tests (concurrent MCP servers, concurrent operations)
2162 | - Storage backend integrity (hybrid sync, backend switching)
2163 | - Dashboard performance (page load <2s, operations <1s)
2164 | - Tag filtering correctness (exact matching, index usage)
2165 | - MCP protocol compliance (schema validation, tool execution)
2166 | - **PR Review Guide**: Standardized code review with Gemini integration
2167 | - Template compliance checklist, code quality standards (type hints, async patterns, security)
2168 | - Testing verification (>80% coverage), merge criteria, effective feedback templates
2169 | - **Issue Management Guide**: Triage, closure, and post-release workflows
2170 | - 48h triage response, professional closure templates, GitHub CLI automation
2171 | - Issue→PR→Release tracking, post-release systematic review
2172 | - **Release Checklist Enhancements**: Version management and emergency procedures
2173 | - 3-file version bump procedure (`__init__.py` → `pyproject.toml` → `uv lock`)
2174 | - CHANGELOG quality gates, GitHub workflow verification
2175 | - Emergency rollback procedure (Docker/PyPI/Git steps, recovery timeline)
2176 | - **Impact**: 2,400+ lines of actionable documentation (7 new files, 1 enhanced)
2177 | - **Files**: `.github/ISSUE_TEMPLATE/`, `docs/testing/regression-tests.md`, `docs/development/pr-review-guide.md`, `docs/development/issue-management.md`, `docs/development/release-checklist.md`
2178 | - **Source**: Adapted from [PR #199](https://github.com/doobidoo/mcp-memory-service/pull/199) by Ray Walker (27Bslash6)
2179 | - **Commit**: [ca5ccf3](https://github.com/doobidoo/mcp-memory-service/commit/ca5ccf3f460feca06d3c9232303a6e528ca2c76f)
2180 |
2181 | ### Fixed
2182 | - **CRITICAL: Dashboard Analytics Accuracy** - Fixed analytics endpoint showing incorrect memory count
2183 | - **Issue**: Dashboard displayed 1,000 memories (sampling) instead of actual 2,222 total
2184 | - **Root Cause**: Analytics endpoint used `get_recent_memories(n=1000)` sampling approach instead of direct SQL query
2185 | - **Solution**: Direct SQL query via `storage.primary.conn` for `HybridMemoryStorage` backend
2186 | - **File**: `src/mcp_memory_service/web/api/analytics.py` (line 386)
2187 | - **Impact**: Dashboard now shows accurate memory totals for all storage backends
2188 | - **Additional Fix**: Corrected attribute check from `storage.sqlite` to `storage.primary` for hybrid backend detection
2189 |
2190 | ### Added
2191 | - **Malformed Tags Repair Utility** - Intelligent repair tool for JSON serialization artifacts in tags
2192 | - **Script**: `scripts/maintenance/repair_malformed_tags.py`
2193 | - **Repaired**: 1,870 malformed tags across 369 memories
2194 | - **Patterns Detected**: JSON quotes (`\"tag\"`), brackets (`[tag]`), mixed artifacts
2195 | - **Features**: Multi-tier parser, dry-run mode, automatic backups, progress tracking
2196 | - **Safety**: Creates backup before modifications, validates repairs
2197 |
2198 | - **Intelligent Memory Type Assignment** - Automated type inference for untyped memories
2199 | - **Script**: `scripts/maintenance/assign_memory_types.py`
2200 | - **Processed**: 119 untyped memories with multi-tier inference algorithm
2201 | - **Inference Methods**:
2202 | - Tag-based mapping (80+ tag-to-type associations)
2203 | - Pattern-based detection (40+ content patterns)
2204 | - Metadata analysis (activity indicators)
2205 | - Fallback heuristics (default to "note")
2206 | - **Confidence Scoring**: High/medium/low confidence levels for inference quality
2207 | - **Features**: Dry-run mode, automatic backups, detailed statistics
2208 |
2209 | ### Technical Details
2210 | - **Analytics Fix**: Removed "Using sampling approach" warning from logs
2211 | - **Database Backups**: Both maintenance scripts create timestamped backups before modifications
2212 | - **Type Taxonomy**: Follows 24 core types from consolidated memory type system
2213 | - **Hybrid Backend**: Scripts properly detect and handle `HybridMemoryStorage` architecture
2214 |
2215 | ## [8.17.0] - 2025-11-04
2216 |
2217 | ### Added
2218 | - **Platform-Aware Consolidation Tool** - Cross-platform database path detection for memory type consolidation
2219 | - **Auto-detection**: macOS (`~/Library/Application Support`), Windows (`%LOCALAPPDATA%`), Linux (`~/.local/share`)
2220 | - **Script**: `scripts/maintenance/consolidate_memory_types.py` enhanced with `platform.system()` detection
2221 | - **Benefit**: Works seamlessly across all platforms without manual path configuration
2222 | - **PR**: [#201](https://github.com/doobidoo/mcp-memory-service/pull/201)
2223 |
2224 | - **External JSON Configuration** - Editable consolidation mappings for flexible type management
2225 | - **File**: `scripts/maintenance/consolidation_mappings.json` (294 mappings, v1.1.0)
2226 | - **Schema**: JSON Schema validation with taxonomy documentation
2227 | - **Extensibility**: Add custom type mappings without code changes
2228 | - **Taxonomy**: 24 core types organized into 5 categories
2229 | - **PR**: [#201](https://github.com/doobidoo/mcp-memory-service/pull/201)
2230 |
2231 | - **Agent System Documentation** - Comprehensive agent guidelines for development workflows
2232 | - **File**: `AGENTS.md` - Central documentation for available agents
2233 | - **Agent**: `amp-bridge` - Amp CLI integration for research without credit consumption
2234 | - **Integration**: Semi-automated file-based workflow with Amp's `@file` reference syntax
2235 | - **CLAUDE.md**: Updated with Amp CLI Bridge architecture and quick start guide
2236 | - **PR**: [#201](https://github.com/doobidoo/mcp-memory-service/pull/201)
2237 |
2238 | ### Fixed
2239 | - **Dashboard Analytics Chart Layout** - Resolved rendering and proportionality issues
2240 | - **Fixed**: Chart bars rendering outside containers
2241 | - **Fixed**: Uniform bar sizes despite different values
2242 | - **Fixed**: Memory type distribution showing incorrect proportions
2243 | - **Enhancement**: Switched to 200px pixel scale for proper visualization
2244 | - **Enhancement**: CSS container constraints with `overflow-x: auto` and flexbox improvements
2245 | - **Files**: `web/static/app.js`, `web/static/index.html`, `web/static/style.css`
2246 | - **PR**: [#200](https://github.com/doobidoo/mcp-memory-service/pull/200)
2247 |
2248 | ### Technical Details
2249 | - **Platform Detection**: Uses `platform.system()` for "Darwin" (macOS), "Windows", and Linux
2250 | - **Backward Compatibility**: Existing scripts continue to work with new platform-aware paths
2251 | - **Agent Workflow**: Claude Code creates prompts → User runs `amp @prompt-file` → Amp writes response → Agent presents results
2252 | - **Chart Rendering**: Dashboard now properly visualizes memory distribution with accurate proportions
2253 |
2254 | ## [8.16.2] - 2025-11-03
2255 |
2256 | ### Fixed
2257 | - **Critical Bug**: Fixed bidirectional sync script crash due to incorrect Memory attribute access
2258 | - **File**: `scripts/sync/sync_memory_backends.py`
2259 | - **Root Cause**: Script accessed non-existent `memory.id` and `memory.hash` attributes instead of correct `memory.content_hash`
2260 | - **Impact**: Bidirectional sync between SQLite-vec and Cloudflare backends completely broken
2261 | - **Lines Fixed**: 81, 121, 137, 146, 149, 151, 153, 155, 158
2262 | - **Testing**: Dry-run validated with 1,978 SQLite memories and 1,958 Cloudflare memories
2263 | - **Result**: Successfully identified 338 memories to sync, 1,640 duplicates correctly skipped
2264 |
2265 | ### Technical Details
2266 | - **Error Type**: `AttributeError: 'Memory' object has no attribute 'id'/'hash'`
2267 | - **Correct Attribute**: `content_hash` - SHA-256 based unique identifier for memory content
2268 | - **Affected Methods**: `get_all_memories_from_backend()`, `_sync_between_backends()`
2269 | - **Backward Compatibility**: No breaking changes, only fixes broken functionality
2270 |
2271 | ## [8.16.1] - 2025-11-02
2272 |
2273 | ### Fixed
2274 | - **Critical Bug**: Fixed `KeyError: 'message'` in MCP server handler (`server.py:2118`)
2275 | - **Issue**: [#198](https://github.com/doobidoo/mcp-memory-service/issues/198)
2276 | - **Root Cause**: `handle_store_memory()` attempted to access non-existent `result["message"]` key
2277 | - **Impact**: All memory store operations via MCP `server.py` handler failed completely
2278 | - **Fix**: Properly handle `MemoryService.store_memory()` response format:
2279 | - Success (single): `{"success": True, "memory": {...}}`
2280 | - Success (chunked): `{"success": True, "memories": [...], "total_chunks": N}`
2281 | - Failure: `{"success": False, "error": "..."}`
2282 | - **Response Messages**: Now include truncated content hash for verification
2283 | - **Related**: This was part of issue #197 where async/await bug was fixed in v8.16.0, but this response format bug was missed
2284 |
2285 | ### Added
2286 | - **Integration Tests**: New test suite for MCP handler methods (`tests/integration/test_mcp_handlers.py`)
2287 | - **Coverage**: 11 test cases for `handle_store_memory()`, `handle_retrieve_memory()`, `handle_search_by_tag()`
2288 | - **Regression Tests**: Specific tests for issue #198 to prevent future KeyError bugs
2289 | - **Test Scenarios**: Success, chunked response, error handling, edge cases
2290 | - **Purpose**: Prevent similar bugs in future releases
2291 |
2292 | ### Technical Details
2293 | - **Affected Handler**: Only `handle_store_memory()` was affected by this bug
2294 | - **Fixed Code Pattern**: Matches the correct pattern used in `mcp_server.py:182-205`
2295 | - **Backward Compatibility**: No breaking changes, only fixes broken functionality
2296 |
2297 | ## [8.16.0] - 2025-11-01
2298 |
2299 | ### Added
2300 | - **Memory Type Consolidation Tool** 🆕 - Professional-grade database maintenance for type taxonomy cleanup
2301 | - **Script**: `scripts/maintenance/consolidate_memory_types.py` (v1.0.0)
2302 | - **Configuration**: `scripts/maintenance/consolidation_mappings.json` (168 predefined mappings)
2303 | - **Performance**: ~5 seconds for 1,000 memory updates
2304 | - **Safety Features**:
2305 | - ✅ Automatic timestamped backups before execution
2306 | - ✅ Dry-run mode for safe preview
2307 | - ✅ Transaction safety (atomic with rollback)
2308 | - ✅ Database lock detection
2309 | - ✅ HTTP server status warnings
2310 | - ✅ Disk space verification
2311 | - ✅ Backup integrity validation
2312 | - **Consolidates**: 341 fragmented types → 24 core taxonomy types
2313 | - **Real-world test**: 1,049 memories updated in 5s (59% of database)
2314 | - **Type reduction**: 342 → 128 unique types (63% reduction)
2315 | - **Zero data loss**: Only type reassignments, preserves all content
2316 |
2317 | - **Standardized Memory Type Taxonomy** - 24 core types organized into 5 categories
2318 | - **Content Types** (4): note, reference, document, guide
2319 | - **Activity Types** (5): session, implementation, analysis, troubleshooting, test
2320 | - **Artifact Types** (4): fix, feature, release, deployment
2321 | - **Progress Types** (2): milestone, status
2322 | - **Infrastructure Types** (5): configuration, infrastructure, process, security, architecture
2323 | - **Other Types** (4): documentation, solution, achievement, technical
2324 | - **Purpose**: Prevents future type fragmentation
2325 | - **Benefits**: Improved query efficiency, consistent naming, better semantic grouping
2326 |
2327 | ### Changed
2328 | - **CLAUDE.md** - Added Memory Type Taxonomy section to Development Guidelines
2329 | - Documents 24 core types with clear usage guidelines
2330 | - Provides examples of what to avoid (bug-fix vs fix, technical-* prefixes)
2331 | - Added consolidation commands to Essential Commands section
2332 | - Includes best practices for maintaining type consistency
2333 |
2334 | ### Documentation
2335 | - **Comprehensive Maintenance Documentation**
2336 | - Updated `scripts/maintenance/README.md` with consolidation tool guide
2337 | - Added to Quick Reference table with performance metrics
2338 | - Detailed usage instructions with safety prerequisites
2339 | - Recovery procedures for backup restoration
2340 | - Maintenance schedule recommendations (monthly dry-run checks)
2341 | - **Real-world example**: Production consolidation results from Nov 2025
2342 |
2343 | ### Technical Details
2344 | - **Consolidation Mappings**:
2345 | - NULL/empty → `note` (609 memories in real test)
2346 | - Milestone/completion variants → `milestone` (21 source types → 60 memories)
2347 | - Session variants → `session` (8 source types → 37 memories)
2348 | - Technical-* prefix removal → base types (62 memories)
2349 | - Project-* prefix removal → base types (67 memories)
2350 | - Fix/bug variants → `fix` (8 source types → 28 memories)
2351 | - See `consolidation_mappings.json` for complete mapping list (168 rules)
2352 |
2353 | ### Notes
2354 | - **Customizable**: Edit `consolidation_mappings.json` to customize behavior
2355 | - **Idempotent**: Safe to run multiple times with same mappings
2356 | - **Platform support**: Linux, macOS, Windows (disk space check requires statvfs)
2357 | - **Recommended schedule**: Run --dry-run monthly, execute when types exceed 150
2358 |
2359 | ## [8.15.1] - 2025-10-31
2360 |
2361 | ### Fixed
2362 | - **Critical Python Syntax Error in Hook Installer** - Fixed IndentationError in `claude-hooks/install_hooks.py` (line 790)
2363 | - **Issue**: Extra closing braces in SessionEnd hook configuration caused installation to fail
2364 | - **Symptom**: `IndentationError: unexpected indent` when running `python install_hooks.py`
2365 | - **Root Cause**: Git merge conflict resolution left two extra `}` characters (lines 790-791)
2366 | - **Impact**: Users could not install or update hooks after pulling v8.15.0
2367 | - **Fix**: Removed extra closing braces, corrected indentation
2368 | - **Files Modified**: `claude-hooks/install_hooks.py`
2369 | - **Testing**: Verified successful installation on macOS after fix
2370 |
2371 | ### Technical Details
2372 | - **Line Numbers**: 788-791 in install_hooks.py
2373 | - **Error Type**: IndentationError (Python syntax)
2374 | - **Detection Method**: Manual testing during hook reinstallation
2375 | - **Resolution Time**: Immediate (same-day patch)
2376 |
2377 | ## [8.15.0] - 2025-10-31
2378 |
2379 | ### Added
2380 | - **`/session-start` Slash Command** - Manual session initialization for all platforms
2381 | - Provides same functionality as automatic SessionStart hook
2382 | - Displays project context, git history, relevant memories
2383 | - **Platform**: Works on Windows, macOS, Linux
2384 | - **Use Case**: Primary workaround for Windows SessionStart hook bug (#160)
2385 | - **Location**: `claude_commands/session-start.md`
2386 | - **Benefits**:
2387 | - ✅ Safe manual alternative to automatic hooks
2388 | - ✅ No configuration changes needed
2389 | - ✅ Full memory awareness functionality
2390 | - ✅ Prevents Claude Code hangs on Windows
2391 |
2392 | ### Changed
2393 | - **Windows-Aware Installer** - Platform detection and automatic configuration
2394 | - Detects Windows platform during hook installation
2395 | - Automatically skips SessionStart hook configuration on Windows
2396 | - Shows clear warning about SessionStart limitation
2397 | - Suggests `/session-start` slash command as alternative
2398 | - Also skips statusLine configuration on Windows (requires bash)
2399 | - **Files Modified**: `claude-hooks/install_hooks.py` (lines 749-817)
2400 | - **User Impact**: Prevents Windows users from accidentally breaking Claude Code
2401 |
2402 | ### Documentation
2403 | - **Enhanced Windows Support Documentation**
2404 | - Updated `claude_commands/README.md` with `/session-start` command details
2405 | - Added Windows workaround section to `claude-hooks/README.md`
2406 | - Updated `CLAUDE.md` with `/session-start` as #1 recommended workaround
2407 | - Added comprehensive troubleshooting guidance
2408 | - Updated GitHub issue #160 with new workaround instructions
2409 |
2410 | ### Fixed
2411 | - **Windows Installation Experience** - Prevents SessionStart hook deadlock (Issue #160)
2412 | - **Previous Behavior**: Windows users install hooks → Claude Code hangs → frustration
2413 | - **New Behavior**: Windows users see warning → skip SessionStart → use `/session-start` → works
2414 | - **Breaking Change**: None - fully backward compatible
2415 | - **Upstream Issue**: Awaiting fix from Anthropic Claude Code team (claude-code#9542)
2416 |
2417 | ### Technical Details
2418 | - **Files Created**: 1 new slash command
2419 | - `claude_commands/session-start.md` - Full command documentation
2420 | - **Files Modified**: 4 files
2421 | - `claude-hooks/install_hooks.py` - Windows platform detection and warnings
2422 | - `claude_commands/README.md` - Added `/session-start` to available commands
2423 | - `claude-hooks/README.md` - Added slash command workaround reference
2424 | - `CLAUDE.md` - Updated workaround prioritization
2425 |
2426 | - **Platform Compatibility**:
2427 | - ✅ Windows: `/session-start` command works, automatic hooks skipped
2428 | - ✅ macOS: All features work (automatic hooks + slash command)
2429 | - ✅ Linux: All features work (automatic hooks + slash command)
2430 |
2431 | ## [8.14.2] - 2025-10-31
2432 |
2433 | ### Performance
2434 | - **Optimized MemoryService.get_memory_by_hash()** - O(1) direct lookup replaces O(n) scan (Issue #196)
2435 | - **Previous Implementation**: Loaded ALL memories via `storage.get_all_memories()`, then filtered by hash
2436 | - **New Implementation**: Direct O(1) database lookup via `storage.get_by_hash()`
2437 | - **Performance Impact**:
2438 | - Small datasets (10-100 memories): ~2x faster
2439 | - Medium datasets (100-1000 memories): ~10-50x faster
2440 | - Large datasets (1000+ memories): ~100x+ faster
2441 | - **Memory Usage**: Single memory object vs loading entire dataset into memory
2442 |
2443 | ### Added
2444 | - **Abstract method `get_by_hash()` in MemoryStorage base class** (storage/base.py)
2445 | - Enforces O(1) direct hash lookup across all storage backends
2446 | - Required implementation for all storage backends
2447 | - Returns `Optional[Memory]` (None if not found)
2448 |
2449 | - **Implemented `get_by_hash()` in CloudflareStorage** (storage/cloudflare.py)
2450 | - Direct D1 SQL query: `SELECT * FROM memories WHERE content_hash = ?`
2451 | - Handles R2 content loading if needed
2452 | - Loads tags separately
2453 | - Follows same pattern as SqliteVecMemoryStorage implementation
2454 |
2455 | ### Changed
2456 | - **MemoryService.get_memory_by_hash()** now uses direct storage lookup
2457 | - Removed inefficient `get_all_memories()` + filter approach
2458 | - Simplified implementation (5 lines vs 10 lines)
2459 | - Updated docstring to reflect O(1) lookup
2460 |
2461 | ### Testing
2462 | - **Updated unit tests** (tests/unit/test_memory_service.py)
2463 | - Mocks now use `storage.get_by_hash()` instead of `storage.get_all_memories()`
2464 | - Added assertions to verify method calls
2465 | - All 3 test cases pass (found, not found, error handling)
2466 |
2467 | - **Updated integration tests** (tests/integration/test_api_with_memory_service.py)
2468 | - Mock updated for proper method delegation
2469 | - Real storage backends (SqliteVecMemoryStorage, HybridMemoryStorage) work correctly
2470 |
2471 | ### Technical Details
2472 | - **Files Modified**: 5 files
2473 | - `src/mcp_memory_service/storage/base.py`: Added abstract `get_by_hash()` method
2474 | - `src/mcp_memory_service/storage/cloudflare.py`: Implemented `get_by_hash()` (40 lines)
2475 | - `src/mcp_memory_service/services/memory_service.py`: Optimized `get_memory_by_hash()`
2476 | - `tests/unit/test_memory_service.py`: Updated mocks
2477 | - `tests/integration/test_api_with_memory_service.py`: Updated mocks
2478 |
2479 | - **Breaking Changes**: None - fully backward compatible
2480 | - **All Storage Backends Now Support get_by_hash()**:
2481 | - ✅ SqliteVecMemoryStorage (line 1153)
2482 | - ✅ CloudflareStorage (line 666)
2483 | - ✅ HybridMemoryStorage (line 974, delegates to primary)
2484 |
2485 | ## [8.14.1] - 2025-10-31
2486 |
2487 | ### Added
2488 | - **Type Safety Improvements** - Comprehensive TypedDict definitions for all MemoryService return types
2489 | - **Problem**: All MemoryService methods returned loose `Dict[str, Any]` types, providing no IDE support or compile-time validation
2490 | - **Solution**: Created 14 specific TypedDict classes for structured return types
2491 | - Store operations: `StoreMemorySingleSuccess`, `StoreMemoryChunkedSuccess`, `StoreMemoryFailure`
2492 | - List operations: `ListMemoriesSuccess`, `ListMemoriesError`
2493 | - Retrieve operations: `RetrieveMemoriesSuccess`, `RetrieveMemoriesError`
2494 | - Search operations: `SearchByTagSuccess`, `SearchByTagError`
2495 | - Delete operations: `DeleteMemorySuccess`, `DeleteMemoryFailure`
2496 | - Health operations: `HealthCheckSuccess`, `HealthCheckFailure`
2497 | - **Benefits**:
2498 | - ✅ IDE autocomplete for all return values (type `result["` to see available keys)
2499 | - ✅ Compile-time type checking catches typos (e.g., `result["succes"]` → type error)
2500 | - ✅ Self-documenting API - clear contracts for all methods
2501 | - ✅ Refactoring safety - renaming keys shows all affected code
2502 | - ✅ 100% backward compatible - no runtime changes
2503 | - ✅ Zero performance impact - pure static typing
2504 |
2505 | ### Fixed
2506 | - **Missing HybridMemoryStorage.get_by_hash()** - Added delegation method to HybridMemoryStorage
2507 | - Fixed `AttributeError: 'HybridMemoryStorage' object has no attribute 'get_by_hash'`
2508 | - All storage backends now implement `get_by_hash()`: SqliteVecMemoryStorage, CloudflareMemoryStorage, HybridMemoryStorage
2509 | - Enables direct memory retrieval by content hash without loading all memories
2510 | - See issue #196 for planned optimization to use this method in MemoryService
2511 |
2512 | ### Technical Details
2513 | - **Files Modified**:
2514 | - `src/mcp_memory_service/services/memory_service.py`: Added 14 TypedDict classes, updated 6 method signatures
2515 | - `src/mcp_memory_service/storage/hybrid.py`: Added `get_by_hash()` delegation method
2516 | - **Breaking Changes**: None - fully backward compatible (TypedDict is structural typing)
2517 | - **Testing**: All tests pass (15/15), comprehensive structure validation, HTTP API integration verified
2518 |
2519 | ## [8.14.0] - 2025-10-31
2520 |
2521 | ### Fixed
2522 | - **Comprehensive Tag Normalization** - DRY solution for all tag format handling
2523 | - **Problem**: Inconsistent tag handling across different APIs caused validation errors
2524 | - Top-level `tags` parameter accepted strings, but MemoryService expected arrays
2525 | - `metadata.tags` field had no normalization, causing "is not of type 'array'" errors
2526 | - Comma-separated strings like `"tag1,tag2,tag3"` were not split into arrays
2527 | - Normalization logic was duplicated in some methods but missing in others
2528 | - **Root Cause**:
2529 | - MCP/HTTP adapters accepted `Union[str, List[str], None]` in signatures
2530 | - But passed values to MemoryService without normalization
2531 | - MemoryService expected `Optional[List[str]]`, causing type mismatch
2532 | - `search_by_tag()` had normalization, but `store_memory()` did not (DRY violation)
2533 | - **Solution** (DRY Principle Applied):
2534 | - Created centralized `normalize_tags()` utility function (services/memory_service.py:27-56)
2535 | - Handles ALL input formats:
2536 | - `None` → `[]`
2537 | - `"tag1,tag2,tag3"` → `["tag1", "tag2", "tag3"]`
2538 | - `"single-tag"` → `["single-tag"]`
2539 | - `["tag1", "tag2"]` → `["tag1", "tag2"]` (passthrough)
2540 | - Updated `MemoryService.store_memory()` to:
2541 | - Accept `Union[str, List[str], None]` type hint
2542 | - Normalize both `tags` parameter and `metadata.tags` field
2543 | - Merge tags from both sources with deduplication
2544 | - Updated `MemoryService.search_by_tag()` to use utility (removed duplicate code)
2545 | - **Files Modified**:
2546 | - `src/mcp_memory_service/services/memory_service.py`: Added normalize_tags(), updated store_memory() and search_by_tag()
2547 | - `src/mcp_memory_service/mcp_server.py`: Updated docstring to reflect all formats supported
2548 | - **Benefits**:
2549 | - ✅ Single source of truth for tag normalization (DRY)
2550 | - ✅ All tag formats work everywhere (top-level, metadata, any protocol)
2551 | - ✅ No more validation errors for comma-separated strings
2552 | - ✅ Fully backward compatible
2553 | - ✅ Consistent behavior across all endpoints
2554 | - **User Impact**:
2555 | - Can use any tag format anywhere without errors
2556 | - No need to remember which parameter accepts which format
2557 | - Improved developer experience and reduced friction
2558 |
2559 | ### Technical Details
2560 | - **Affected Components**: MemoryService (business logic layer), MCP server documentation
2561 | - **Breaking Changes**: None - fully backward compatible
2562 | - **Tag Merge Behavior**: When tags provided in both parameter and metadata, they are merged and deduplicated
2563 | - **Testing**: Verified with all format combinations (None, string, comma-separated, array, metadata.tags)
2564 |
2565 | ## [8.13.5] - 2025-10-31
2566 |
2567 | ### Fixed
2568 | - **Memory Hooks Display Polish** - Visual improvements for cleaner, more professional CLI output
2569 | - **Issue**: Multiple visual inconsistencies in memory hooks tree structure display
2570 | - **Problems Identified**:
2571 | 1. Redundant bottom frame (`╰────╯`) after tree naturally ended with `└─`
2572 | 2. Wrapped text continuation showing vertical lines (`│`) after last items
2573 | 3. Duplicate final summary message ("Context injected") when header already shows count
2574 | 4. Embedded formatting (✅, •, markdown) conflicting with tree structure
2575 | 5. Excessive content length despite adaptive truncation
2576 | - **Fixes** (commits ed46d24, 998a39c):
2577 | - **Content Sanitization**: Remove checkmarks, bullets, markdown formatting that conflicts with tree characters
2578 | - **Smart Truncation**: Extract first 1-2 sentences for <400 char limits using sentence boundary detection
2579 | - **Tree Continuation Logic**: Last items show clean indentation without vertical lines on wrapped text
2580 | - **Remove Redundant Frame**: Tree ends naturally with `└─`, no separate closing box
2581 | - **Remove Duplicate Message**: Header shows "X memories loaded", no redundant final summary
2582 | - **Files Modified**:
2583 | - `claude-hooks/utilities/context-formatter.js`: Content sanitization, smart truncation, tree continuation fixes
2584 | - `claude-hooks/core/session-start.js`: Removed redundant success message
2585 | - **Result**: Clean, consistent tree structure with proper visual hierarchy and no redundancy
2586 | - **User Impact**: Professional CLI output, easier to scan, maintains continuous blue tree lines properly
2587 |
2588 | ### Technical Details
2589 | - **Affected Component**: Claude Code memory awareness hooks (SessionStart display)
2590 | - **Deployment**: Hooks loaded from repository automatically, no server restart needed
2591 | - **Testing**: Verified with mock execution and real Claude Code session
2592 |
2593 | ## [8.13.4] - 2025-10-30
2594 |
2595 | ### Fixed
2596 | - **Critical: Memory Hooks Showing Incorrect Ages** (#195) - Timestamp unit mismatch causing 20,371-day ages
2597 | - **Error**: Memory hooks reporting `avgAge: 20371 days, medianAge: 20371 days` when actual age was 6 days
2598 | - **User Impact**: Recent memories didn't surface, auto-calibration incorrectly triggered "stale memory" warnings
2599 | - **Root Cause** (claude-hooks/utilities/memory-client.js:273): Timestamp unit mismatch
2600 | - HTTP API returns Unix timestamps in **SECONDS**: `1758344479.729`
2601 | - JavaScript `Date()` expects **MILLISECONDS**: Interpreted as `Jan 21, 1970` (55 years ago)
2602 | - Age calculation: `(now - 1758344479ms) / 86400000 = 20371 days`
2603 | - **Symptoms**:
2604 | - `[Memory Age Analyzer] { avgAge: 20371, recentPercent: 0, isStale: true }`
2605 | - Hooks showed "Stale memory set detected (median: 20371d old)"
2606 | - Recent development work (< 7 days) never surfaced in context
2607 | - **Fix** (claude-hooks/utilities/memory-client.js:273-294, commit 5c54894):
2608 | - Convert API timestamps from seconds to milliseconds (`× 1000`)
2609 | - Added year 2100 check (`< 4102444800`) to prevent double-conversion
2610 | - Applied in `_performApiPost()` response handler for both `created_at` and `updated_at`
2611 | - **Result**:
2612 | - `avgAge: 6 days, medianAge: 5 days, recentPercent: 100%, isStale: false`
2613 | - Recent memories surface correctly
2614 | - Auto-calibration works properly
2615 | - Git context weight adjusts based on actual ages
2616 | - **Note**: Affects all users using HTTP protocol for memory hooks
2617 |
2618 | ### Technical Details
2619 | - **Affected Component**: Claude Code memory awareness hooks (HTTP protocol path)
2620 | - **File Changed**: `claude-hooks/utilities/memory-client.js` (lines 273-294)
2621 | - **Deployment**: Hooks loaded from repository automatically, no server restart needed
2622 | - **Issue**: https://github.com/doobidoo/mcp-memory-service/issues/195
2623 |
2624 | ## [8.13.3] - 2025-10-30
2625 |
2626 | ### Fixed
2627 | - **Critical: MCP Memory Tools Broken** - v8.12.0 regression preventing all MCP memory operations
2628 | - **Error**: `KeyError: 'message'` when calling any MCP memory tool (store, retrieve, search, etc.)
2629 | - **User Impact**: MCP tools completely non-functional - "Error storing memory: 'message'"
2630 | - **Root Cause** (mcp_server.py:175): Return format mismatch between MemoryService and MCP tool expectations
2631 | - MCP tool expects: `{success: bool, message: str, content_hash: str}`
2632 | - MemoryService returns: `{success: bool, memory: {...}}`
2633 | - MCP protocol tries to access missing 'message' field → KeyError
2634 | - **Why It Persisted**: HTTP API doesn't require these specific fields, so integration tests passed
2635 | - **Fix** (mcp_server.py:173-206): Transform MemoryService response to MCP TypedDict format
2636 | - Capture result from MemoryService.store_memory()
2637 | - Extract content_hash from nested memory object
2638 | - Add descriptive "message" field
2639 | - Handle 3 cases: failure (error message), chunked (multiple memories), single memory
2640 | - **Result**: MCP tools now work correctly with proper error messages
2641 | - **Note**: Requires MCP server restart (`/mcp` command in Claude Code) to load fix
2642 |
2643 | ### Technical Details
2644 | - **Introduced**: v8.12.0 MemoryService architecture refactoring (#176)
2645 | - **Affected Tools**: store_memory, all MCP protocol operations
2646 | - **HTTP API**: Unaffected (different response format requirements)
2647 | - **Test Gap**: No integration tests validating MCP tool response formats
2648 |
2649 | ## [8.13.2] - 2025-10-30
2650 |
2651 | ### Fixed
2652 | - **Memory Sync Script Broken** (#193): Fixed sync_memory_backends.py calling non-existent `store_memory()` method
2653 | - **Error**: `AttributeError: 'CloudflareStorage' object has no attribute 'store_memory'`
2654 | - **User Impact**: Sync script completely non-functional - couldn't sync memories between Cloudflare and SQLite backends
2655 | - **Root Cause** (scripts/sync/sync_memory_backends.py:144-147): Script used old `store_memory()` API that no longer exists
2656 | - **Fix** (#194, b69de83): Updated to use proper `Memory` object creation and `storage.store()` method
2657 | - Create `Memory` object with `content`, `content_hash`, `tags`, `metadata`, `created_at`
2658 | - Call `await target_storage.store(memory_obj)` instead of non-existent `store_memory()`
2659 | - Added safe `.get('metadata', {})` to prevent KeyError on missing metadata
2660 | - Fixed import order to comply with PEP 8 (config → models → storage)
2661 | - **Result**: Sync script now successfully syncs memories between backends
2662 | - **Credit**: Fix by AMP via PR #194, reviewed by Gemini
2663 |
2664 | ## [8.13.1] - 2025-10-30
2665 |
2666 | ### Fixed
2667 | - **Critical Concurrent Access Bug**: MCP server initialization failed with "database is locked" when HTTP server running
2668 | - **Error**: `sqlite3.OperationalError: database is locked` during MCP tool initialization
2669 | - **User Impact**: MCP memory tools completely non-functional while HTTP server running - "this worked before without any flaws"
2670 | - **Root Cause #1** (sqlite_vec.py:329): Connection timeout set AFTER opening database instead of during connection
2671 | - Original: `sqlite3.connect(path)` used default 5-second timeout, then applied `PRAGMA busy_timeout=15000`
2672 | - SQLite only respects timeout parameter passed to `connect()`, not pragma applied afterward
2673 | - MCP server timed out before it could set the higher timeout value
2674 | - **Root Cause #2** (sqlite_vec.py:467-476): Both servers attempting DDL operations (CREATE TABLE, CREATE INDEX) simultaneously
2675 | - Even with WAL mode, DDL operations require brief exclusive locks
2676 | - No detection of already-initialized database before running DDL
2677 | - **Fix #1** (sqlite_vec.py:291-326): Parse `busy_timeout` from `MCP_MEMORY_SQLITE_PRAGMAS` environment variable BEFORE opening connection
2678 | - Convert from milliseconds to seconds (15000ms → 15.0s)
2679 | - Pass timeout to `sqlite3.connect(path, timeout=15.0)` for immediate effect
2680 | - Allows MCP server to wait up to 15 seconds for HTTP server's DDL operations
2681 | - **Fix #2** (sqlite_vec.py:355-373): Detect already-initialized database and skip DDL operations
2682 | - Check if `memories` and `memory_embeddings` tables exist after loading sqlite-vec extension
2683 | - If tables exist, just load embedding model and mark as initialized
2684 | - Prevents "database is locked" errors from concurrent CREATE TABLE/INDEX attempts
2685 | - **Result**: MCP and HTTP servers now coexist without conflicts, maintaining pre-v8.9.0 concurrent access behavior
2686 |
2687 | ### Technical Details
2688 | - **Timeline**: Bug discovered during memory consolidation testing, fixed same day
2689 | - **Affected Versions**: v8.9.0 introduced database lock prevention pragmas but didn't fix concurrent initialization
2690 | - **Test Validation**: MCP health check returns healthy with 1857 memories while HTTP server running
2691 | - **Log Evidence**: "Database already initialized by another process, skipping DDL operations" confirms fix working
2692 |
2693 | ## [8.13.0] - 2025-10-29
2694 |
2695 | ### Added
2696 | - **HTTP Server Integration Tests** (#190): Comprehensive test suite with 32 tests prevents production bugs like v8.12.0
2697 | - `tests/integration/test_http_server_startup.py`: 8 tests for server startup validation
2698 | - `tests/unit/test_fastapi_dependencies.py`: 11 tests for dependency injection
2699 | - `tests/unit/test_storage_interface_compatibility.py`: 13 tests for backend interface consistency
2700 | - Extended `tests/integration/test_api_with_memory_service.py`: +11 HTTP API tests with TestClient
2701 | - Tests would have caught all 3 v8.12.0 production bugs (import-time evaluation, syntax errors, interface mismatches)
2702 |
2703 | - **Storage Method: get_largest_memories()** (#186): Efficient database queries for largest memories by content length
2704 | - Added to all storage backends (SQLite, Cloudflare, Hybrid)
2705 | - Uses `ORDER BY LENGTH(content) DESC LIMIT n` instead of loading 1000 memories and sorting in Python
2706 | - Analytics dashboard now queries entire dataset for truly largest memories
2707 |
2708 | ### Fixed
2709 | - **Analytics Dashboard Timezone Bug** (#186): Fixed heatmap calendar showing wrong day-of-week near timezone boundaries
2710 | - JavaScript `new Date('YYYY-MM-DD')` parsed as UTC midnight, but `getDay()` used local timezone
2711 | - Changed to parse date components in local timezone: `new Date(year, month-1, day)`
2712 | - Prevents calendar cells from shifting to previous/next day for users in UTC-12 to UTC+12 timezones
2713 |
2714 | ### Improved
2715 | - **Analytics Performance**: Reduced memory sample for average size calculation from 1000→100 memories
2716 | - **Test Coverage**: Zero HTTP integration tests → 32 comprehensive tests covering server startup, dependencies, and API endpoints
2717 |
2718 | ### Documentation
2719 | - **MCP Schema Caching** (#173): Closed with comprehensive documentation in CLAUDE.md and troubleshooting guides
2720 | - Root cause: MCP protocol caches tool schemas client-side
2721 | - Workaround: `/mcp` command reconnects server with fresh schema
2722 | - Documented symptoms, diagnosis, and resolution steps
2723 |
2724 | ## [8.12.1] - 2025-10-28
2725 |
2726 | ### Fixed
2727 | - **Critical Production Bug #1** (ef2c64d): Import-time default parameter evaluation in `get_memory_service()`
2728 | - **Error**: `HTTPException: 503: Storage not initialized` during module import
2729 | - **Root Cause**: Python evaluates default parameters at function definition time, not call time
2730 | - **Impact**: HTTP server couldn't start - module import failed immediately
2731 | - **Fix**: Changed from `storage: MemoryStorage = get_storage()` to `storage: MemoryStorage = Depends(get_storage)`
2732 | - **Technical**: FastAPI's `Depends()` defers evaluation until request time and integrates with dependency injection
2733 |
2734 | - **Critical Production Bug #2** (77de4d2): Syntax error + missing FastAPI Depends import in `memories.py`
2735 | - **Error**: `SyntaxError: expected an indented block after 'if' statement on line 152`
2736 | - **Root Cause**: `if INCLUDE_HOSTNAME:` had no indented body, nested if-elif-else block not indented
2737 | - **Impact**: SyntaxError prevented module import + FastAPI validation failure
2738 | - **Fix**: Properly indented hostname resolution logic, added missing `Depends` import to dependencies.py
2739 |
2740 | - **Critical Production Bug #3** (f935c56): Missing `tags` parameter in `count_all_memories()` across all storage backends
2741 | - **Error**: `TypeError: count_all_memories() got an unexpected keyword argument 'tags'`
2742 | - **User Report**: "failed to load dashboard data"
2743 | - **Root Cause**: MemoryService called `count_all_memories(memory_type=type, tags=tags)` but base class and implementations didn't accept tags parameter
2744 | - **Impact**: Dashboard completely broken - GET /api/memories returned 500 errors
2745 | - **Fix**: Updated 4 files (base.py, hybrid.py, sqlite_vec.py, cloudflare.py) to add tags parameter with SQL LIKE filtering
2746 | - **Why Tests Missed It**: AsyncMock accepts ANY parameters, never tested real storage backend implementations
2747 |
2748 | - **Analytics Metrics Bug** (8beeb07): Analytics tab showed different metrics than Dashboard tab
2749 | - **Problem**: Dashboard queried ALL memories, Analytics sampled only 1000 recent memories
2750 | - **Impact**: "This Week" count was inaccurate when total memories > 1000
2751 | - **Fix**: Changed Analytics endpoint to use `storage.get_stats()` instead of sampling
2752 | - **Performance**: Eliminated O(n) memory loading for simple count operation, now uses efficient SQL COUNT
2753 |
2754 | ### Changed
2755 | - **Analytics Endpoint Performance** - Increased monthly sample from 2,000 to 5,000 memories
2756 | - **Code Quality** - Added TODO comments for moving monthly calculations to storage layer
2757 |
2758 | ### Technical Details
2759 | - **Timeline**: All 4 bugs discovered and fixed within 4 hours of v8.12.0 release (15:03 UTC → 22:03 UTC)
2760 | - **Post-Mortem**: Created Issue #190 for HTTP server integration tests to prevent future production bugs
2761 | - **Test Coverage Gap**: v8.12.0 had 55 tests but zero HTTP server integration tests
2762 | - **Lesson Learned**: Tests used mocked storage that never actually started the server or tested real FastAPI dependency injection
2763 |
2764 | **Note**: This patch release resolves all production issues from v8.12.0 architectural changes. Comprehensive analysis stored in memory with tag `v8.12.0,post-release-bugs`.
2765 |
2766 | ## [8.12.0] - 2025-10-28
2767 |
2768 | ### Added
2769 | - **MemoryService Architecture** - Centralized business logic layer (Issue #188, PR #189)
2770 | - Single source of truth for all memory operations
2771 | - Consistent behavior across API endpoints and MCP tools
2772 | - 80% code duplication reduction between API and MCP servers
2773 | - Dependency injection pattern for clean architecture
2774 | - **Comprehensive Test Coverage**:
2775 | - 34 unit tests (100% pass rate)
2776 | - 21 integration tests for API layer
2777 | - End-to-end workflow tests with real storage
2778 | - Performance validation for database-level filtering
2779 |
2780 | ### Fixed
2781 | - **Critical Bug #1**: `split_content()` missing required `max_length` parameter
2782 | - Impact: Would crash immediately on any content chunking operation
2783 | - Fix: Added proper parameter passing with storage backend max_length
2784 | - **Critical Bug #2**: `storage.delete_memory()` method does not exist in base class
2785 | - Impact: Delete functionality completely broken
2786 | - Fix: Changed to use `storage.delete(content_hash)` from base class
2787 | - **Critical Bug #3**: `storage.get_memory()` method does not exist in base class
2788 | - Impact: Get by hash functionality completely broken
2789 | - Fix: Implemented using `get_all_memories()` with client-side filtering
2790 | - **Critical Bug #4**: `storage.health_check()` method does not exist in base class
2791 | - Impact: Health check functionality completely broken
2792 | - Fix: Changed to use `storage.get_stats()` from base class
2793 | - **Critical Bug #5**: `storage.search_by_tags()` method mismatch (plural vs singular)
2794 | - Impact: Tag search functionality completely broken
2795 | - Fix: Changed to use `storage.search_by_tag()` (singular) from base class
2796 | - **Critical Bug #6**: Incorrect chunking logic comparing `len(content) > CONTENT_PRESERVE_BOUNDARIES`
2797 | - Impact: ALL content >1 character would trigger chunking (CONTENT_PRESERVE_BOUNDARIES is boolean `True`)
2798 | - Fix: Proper comparison using `storage.max_content_length` numeric value
2799 | - **Critical Bug #7**: Missing `store()` return value handling
2800 | - Impact: Success/failure not properly tracked
2801 | - Fix: Proper unpacking of `(success, message)` tuple from storage operations
2802 |
2803 | ### Changed
2804 | - **API Endpoints** - Refactored to use MemoryService dependency injection
2805 | - `/api/memories` (list, create) uses MemoryService
2806 | - `/api/search` endpoints use MemoryService
2807 | - Consistent response formatting via service layer
2808 | - **Code Maintainability** - Removed 356 lines of duplicated code
2809 | - Single place to modify business logic
2810 | - Unified error handling
2811 | - Consistent hostname tagging logic
2812 | - **Performance** - Database-level filtering prevents O(n) memory loading
2813 | - Scalable pagination with offset/limit at storage layer
2814 | - Efficient tag and type filtering
2815 |
2816 | ### Technical Details
2817 | - **Files Modified**: 6 files, 1469 additions, 356 deletions
2818 | - **Test Coverage**: 55 new tests (34 unit + 21 integration)
2819 | - **Bug Discovery**: Comprehensive testing revealed 7 critical bugs that would have made the release non-functional
2820 | - **Quality Process**: Test-driven debugging approach prevented broken release
2821 |
2822 | **Note**: This release demonstrates the critical importance of comprehensive testing before merging architectural changes. All 7 bugs were caught through systematic unit and integration testing.
2823 |
2824 | ## [8.11.0] - 2025-10-28
2825 |
2826 | ### Added
2827 | - **JSON Document Loader** - Complete implementation of JSON file ingestion (Issue #181, PR #187)
2828 | - **Nested Structure Flattening**: Converts nested JSON to searchable text with dot notation or bracket notation
2829 | - **Configurable Strategies**: Choose flattening style, max depth, type inclusion
2830 | - **Array Handling**: Multiple modes (expand, summarize, flatten) for different use cases
2831 | - **Comprehensive Tests**: 15 unit tests covering all functionality
2832 | - **Use Cases**: Knowledge base exports, API documentation, config files, structured metadata
2833 |
2834 | - **CSV Document Loader** - Complete implementation of CSV file ingestion (Issue #181, PR #187)
2835 | - **Auto-Detection**: Automatically detects delimiters (comma, semicolon, tab, pipe) and headers
2836 | - **Row-Based Formatting**: Converts tabular data to searchable text with column context
2837 | - **Encoding Support**: Auto-detects UTF-8, UTF-16, UTF-32, Latin-1, CP1252
2838 | - **Large File Handling**: Efficient row-based chunking for scalability
2839 | - **Comprehensive Tests**: 14 unit tests covering all functionality
2840 | - **Use Cases**: Data dictionaries, reference tables, tabular documentation, log analysis
2841 |
2842 | ### Fixed
2843 | - **False Advertising** - Resolved issue where JSON and CSV were listed in `SUPPORTED_FORMATS` but had no loader implementations
2844 | - Previous behavior: Upload would fail with "No loader available" error
2845 | - New behavior: Full functional support with proper chunking and metadata
2846 |
2847 | ### Changed
2848 | - **Ingestion Module** - Updated to register new JSON and CSV loaders
2849 | - **Test Coverage** - Added 29 new unit tests (15 JSON + 14 CSV)
2850 |
2851 | ## [8.10.0] - 2025-10-28
2852 |
2853 | ### Added
2854 | - **Complete Analytics Dashboard Implementation** (Issue #182, PR #183)
2855 | - Memory Types Breakdown (pie chart)
2856 | - Activity Heatmap (GitHub-style calendar with 90d/6mo/1yr periods)
2857 | - Top Tags Report (usage trends, co-occurrence patterns)
2858 | - Recent Activity Report (hourly/daily/weekly breakdowns)
2859 | - Storage Report (largest memories, efficiency metrics)
2860 | - Streak Tracking (current and longest consecutive days)
2861 |
2862 | ### Fixed
2863 | - **Activity Streak Calculation** - Fixed current streak to include today check
2864 | - **Total Days Calculation** - Corrected date span vs active days count
2865 | - **Longest Streak Initialization** - Fixed from 0 to 1
2866 |
2867 | ### Changed
2868 | - **Analytics API** - Added 5 new endpoints with Pydantic models
2869 | - **Dashboard Documentation** - Updated wiki with complete analytics features
2870 |
2871 | ## [8.9.0] - 2025-10-27
2872 |
2873 | ### Fixed
2874 | - **Database Lock Prevention** - Resolved "database is locked" errors during concurrent HTTP + MCP server access (Issue discovered during performance troubleshooting)
2875 | - **Root Cause**: Default `busy_timeout=5000ms` too short for concurrent writes from multiple MCP clients
2876 | - **Solution**: Applied recommended SQLite pragmas (`busy_timeout=15000,cache_size=20000`)
2877 | - **WAL Mode**: Already enabled by default, now properly configured for multi-client access
2878 | - **Impact**: Zero database locks during testing with 5 concurrent write operations
2879 | - **Documentation**: Updated multi-client architecture docs with pragma recommendations
2880 |
2881 | ### Added
2882 | - **Hybrid Backend Installer Support** - Full hybrid backend support in simplified installer (`scripts/installation/install.py`)
2883 | - **Interactive Selection**: Hybrid now option 4 (recommended default) in installer menu
2884 | - **Automatic Configuration**: SQLite pragmas set automatically for sqlite_vec and hybrid backends
2885 | - **Cloudflare Setup**: Interactive credential configuration with connection testing
2886 | - **Graceful Fallback**: Falls back to sqlite_vec if Cloudflare setup cancelled or fails
2887 | - **Claude Desktop Integration**: Hybrid backend configuration includes:
2888 | - SQLite pragmas for concurrent access (`MCP_MEMORY_SQLITE_PRAGMAS`)
2889 | - Cloudflare credentials for background sync
2890 | - Proper environment variable propagation
2891 | - **Benefits**:
2892 | - 5ms local reads (SQLite-vec)
2893 | - Zero user-facing latency (background Cloudflare sync)
2894 | - Multi-device synchronization
2895 | - Concurrent access support
2896 |
2897 | ### Changed
2898 | - **Installer Defaults** - Hybrid backend now recommended for production use
2899 | - Updated argparse choices to include `hybrid` option
2900 | - Changed default selection from sqlite_vec to hybrid (option 4)
2901 | - Enhanced compatibility detection with "recommended" status for hybrid
2902 | - Improved final installation messages with backend-specific guidance
2903 | - **Environment Management** - Cloudflare credentials now set in current environment immediately
2904 | - `save_credentials_to_env()` sets both .env file AND os.environ
2905 | - Ensures credentials available for Claude Desktop config generation
2906 | - Proper variable propagation for hybrid and cloudflare backends
2907 | - **Path Configuration** - Updated `configure_paths()` to handle all backends
2908 | - SQLite database paths for: `sqlite_vec`, `hybrid`, `cloudflare`
2909 | - Cloudflare credentials included when backend requires them
2910 | - Backward compatible with existing installations
2911 |
2912 | ### Technical Details
2913 | - **Files Modified**:
2914 | - `scripts/installation/install.py`: Lines 655-659 (compatibility), 758 (menu), 784-802 (selection), 970-1017 (hybrid install), 1123-1133 (env config), 1304 (path config), 1381-1401 (Claude Desktop config), 1808-1821 (final messages)
2915 | - `src/mcp_memory_service/__init__.py`: Line 50 (version bump)
2916 | - `pyproject.toml`: Line 7 (version bump)
2917 | - **Concurrent Access Testing**: 5/5 simultaneous writes succeeded without locks
2918 | - **HTTP Server Logs**: Confirmed background Cloudflare sync working (line 369: "Successfully stored memory")
2919 |
2920 | ## [8.8.2] - 2025-10-26
2921 |
2922 | ### Fixed
2923 | - **Document Upload Tag Validation** - Prevents bloated tags from space-separated file paths (Issue #174, PR #179)
2924 | - **Enhanced Tag Parsing**: Split tags by comma OR space instead of comma only
2925 | - **Robust file:// URI Handling**: Uses `urllib.parse` for proper URL decoding and path handling
2926 | - Handles URL-encoded characters (e.g., `%20` for spaces)
2927 | - Handles different path formats (e.g., `file:///C:/...`)
2928 | - Properly handles Windows paths with leading slash from urlparse
2929 | - **File Path Sanitization**: Remove `file://` prefixes, extract filenames only, clean path separators
2930 | - **Explicit Tag Length Validation**: Tags exceeding 100 chars now raise explicit HTTPException instead of being silently dropped
2931 |
2932 | ### Added
2933 | - **Processing Mode Toggle** - UI enhancement for multiple file uploads (PR #179)
2934 | - **Batch Processing**: All files processed together (faster, default)
2935 | - **Individual Processing**: Each file processed separately with better error isolation
2936 | - Toggle only appears when multiple files are selected
2937 | - Comprehensive help section explaining both modes with pros/cons
2938 |
2939 | ### Changed
2940 | - **Code Quality Improvements** - Eliminated code duplication in document upload endpoints (PR #179)
2941 | - Extracted `parse_and_validate_tags()` helper function to eliminate duplicate tag parsing logic
2942 | - Removed 44 lines of duplicate code from `upload_document` and `batch_upload_documents`
2943 | - Extracted magic number (500ms upload delay) to static constant `INDIVIDUAL_UPLOAD_DELAY`
2944 | - Simplified toggle display logic with ternary operator
2945 | - Created Issue #180 for remaining medium-priority code quality suggestions
2946 |
2947 | ## [8.8.1] - 2025-10-26
2948 |
2949 | ### Fixed
2950 | - **Error Handling Improvements** - Enhanced robustness in MemoryService and maintenance scripts (Issue #177)
2951 | - **MemoryService.store_memory()**: Added specific exception handling for better error classification
2952 | - `ValueError` → validation errors with "Validation error" messages
2953 | - `httpx.NetworkError/TimeoutException/HTTPStatusError` → storage errors with "Storage error" messages
2954 | - Generic `Exception` → unexpected errors with full logging and "unexpected error" messages
2955 | - **Maintenance Scripts**: Added proper error handling to prevent crashes
2956 | - `find_cloudflare_duplicates.py`: Wrapped `get_all_memories_bulk()` in try/except, graceful handling of empty results
2957 | - `delete_orphaned_vectors_fixed.py`: Already used public API (no changes needed)
2958 |
2959 | ### Added
2960 | - **Encapsulation Methods** - New public APIs for Cloudflare storage operations (Issue #177)
2961 | - `CloudflareStorage.delete_vectors_by_ids()` - Batch vector deletion with proper error handling
2962 | - `CloudflareStorage.get_all_memories_bulk()` - Efficient bulk loading without N+1 tag queries
2963 | - `CloudflareStorage._row_to_memory()` - Helper for converting D1 rows to Memory objects
2964 | - **Performance**: Bulk operations avoid expensive individual tag lookups
2965 | - **Maintainability**: Public APIs instead of direct access to private `_retry_request` method
2966 |
2967 | ### Changed
2968 | - **Dependency Management** - Added conditional typing-extensions for Python 3.10 (Issue #177)
2969 | - Added `"typing-extensions>=4.0.0; python_version < '3.11'"` to pyproject.toml
2970 | - Ensures `NotRequired` import works correctly on Python 3.10
2971 | - No impact on Python 3.11+ installations
2972 |
2973 | ### Review
2974 | - **Gemini Code Assist**: "This pull request significantly improves the codebase by enhancing error handling and improving encapsulation... well-executed and contribute to better maintainability"
2975 | - **Feedback Addressed**: All review suggestions implemented, including enhanced exception handling
2976 |
2977 | ## [8.8.0] - 2025-10-26
2978 |
2979 | ### Changed
2980 | - **DRY Refactoring** - Eliminated code duplication between MCP and HTTP servers (PR #176, Issue #172)
2981 | - **Problem**: MCP (`mcp_server.py`) and HTTP (`server.py`) servers had 364 lines of duplicated business logic
2982 | - Bug fixes applied to one server were missed in the other (e.g., PR #162 tags validation)
2983 | - Maintenance burden of keeping two implementations synchronized
2984 | - Risk of behavioral inconsistencies between protocols
2985 | - **Solution**:
2986 | - Created `MemoryService` class (442 lines) as single source of truth for business logic
2987 | - Refactored `mcp_server.py` to thin adapter (-338 lines, now ~50 lines per method)
2988 | - Refactored `server.py` to use MemoryService (169 lines modified)
2989 | - Both servers now delegate to shared business logic
2990 | - **Benefits**:
2991 | - **Single source of truth**: All memory operations (store, retrieve, search, delete) in one place
2992 | - **Consistent behavior**: Both protocols guaranteed identical business logic
2993 | - **Easier maintenance**: Bug fixes automatically apply to both servers
2994 | - **Better testability**: Business logic isolated and independently testable
2995 | - **Prevents future bugs**: Impossible to fix one server and forget the other
2996 | - **Type Safety**: Added TypedDict classes (`MemoryResult`, `OperationResult`, `HealthStats`) for better type annotations
2997 | - **Backward Compatibility**: No API changes, both servers remain fully compatible
2998 | - **Testing**: All tests passing (15/15 Cloudflare storage tests)
2999 | - **Review**: Gemini Code Assist: "significant and valuable refactoring... greatly improves maintainability and consistency"
3000 | - **Follow-up**: Minor improvements tracked in Issue #177 (error handling, encapsulation)
3001 |
3002 | ### Fixed
3003 | - **Python 3.10 Compatibility** - Added `NotRequired` import fallback (src/mcp_memory_service/mcp_server.py:23-26)
3004 | - Uses `typing.NotRequired` on Python 3.11+
3005 | - Falls back to `typing_extensions.NotRequired` on Python 3.10
3006 | - Ensures compatibility across Python versions
3007 |
3008 | ### Added
3009 | - **Maintenance Scripts** - Cloudflare cleanup utilities (from v8.7.1 work)
3010 | - `scripts/maintenance/find_cloudflare_duplicates.py` - Detect duplicates in Cloudflare D1
3011 | - `scripts/maintenance/delete_orphaned_vectors_fixed.py` - Clean orphaned Vectorize vectors
3012 | - `scripts/maintenance/fast_cleanup_duplicates_with_tracking.sh` - Platform-aware SQLite cleanup
3013 | - `scripts/maintenance/find_all_duplicates.py` - Platform detection (macOS/Linux paths)
3014 |
3015 | ## [8.7.1] - 2025-10-26
3016 |
3017 | ### Fixed
3018 | - **Cloudflare Vectorize Deletion** - Fixed vector deletion endpoint bug (src/mcp_memory_service/storage/cloudflare.py:671)
3019 | - **Problem**: Used incorrect endpoint `/delete-by-ids` (hyphens) causing 404 Not Found errors, preventing vector deletion
3020 | - **Solution**:
3021 | - Changed to correct Cloudflare API endpoint `/delete_by_ids` (underscores)
3022 | - Fixed payload format from `[vector_id]` to `{"ids": [vector_id]}`
3023 | - Created working cleanup script: `scripts/maintenance/delete_orphaned_vectors_fixed.py`
3024 | - Removed obsolete broken script: `scripts/maintenance/delete_orphaned_vectors.py`
3025 | - **Impact**: Successfully deleted 646 orphaned vectors from Vectorize in 7 batches
3026 | - **Testing**: Verified with production data (646 vectors, 100/batch, all mutations successful)
3027 | - **Discovery**: Found via web research of official Cloudflare Vectorize API documentation
3028 |
3029 | ## [8.7.0] - 2025-10-26
3030 |
3031 | ### Fixed
3032 | - **Cosine Similarity Migration** - Fixed 0% similarity scores in search results (src/mcp_memory_service/storage/sqlite_vec.py:187)
3033 | - **Problem**: L2 distance metric gave 0% similarity for all searches due to score calculation `max(0, 1-distance)` returning 0 for distances >1.0
3034 | - **Solution**:
3035 | - Migrated embeddings table from L2 to cosine distance metric
3036 | - Updated score calculation to `1.0 - (distance/2.0)` for cosine range [0,2]
3037 | - Added automatic migration logic with database locking retry (exponential backoff)
3038 | - Implemented `_initialized` flag to prevent multiple initialization
3039 | - Created metadata table for storage configuration persistence
3040 | - **Performance**: Search scores improved from 0% to 70-79%, exact match accuracy 79.2% (was 61%)
3041 | - **Impact**: 2605 embeddings regenerated successfully
3042 |
3043 | - **Dashboard Search Improvements** - Enhanced search threshold handling (src/mcp_memory_service/web/static/app.js:283)
3044 | - Fixed search threshold always being sent even when not explicitly set
3045 | - Improved document filtering to properly handle memory object structure
3046 | - Only send `similarity_threshold` parameter when user explicitly sets it
3047 | - Better handling of `memory.memory_type` and `memory.tags` for document results
3048 |
3049 | ### Added
3050 | - **Maintenance Scripts** - Comprehensive database maintenance tooling (scripts/maintenance/)
3051 | - **regenerate_embeddings.py** - Regenerate all embeddings after migrations (~5min for 2600 memories)
3052 | - **fast_cleanup_duplicates.sh** - 1800x faster duplicate removal using direct SQL (<5s for 100+ duplicates vs 2.5 hours via API)
3053 | - **find_all_duplicates.py** - Fast duplicate detection with timestamp normalization (<2s for 2000 memories)
3054 | - **README.md** - Complete documentation with performance benchmarks, best practices, and troubleshooting
3055 |
3056 | ### Technical Details
3057 | - **Migration Approach**: Drop-and-recreate embeddings table to change distance metric (vec0 limitation)
3058 | - **Retry Logic**: Exponential backoff for database locking (1s → 2s → 4s delays)
3059 | - **Performance Benchmark**: Direct SQL vs API operations show 1800x speedup for bulk deletions
3060 | - **Duplicate Detection**: Content normalization removes timestamps for semantic comparison using MD5 hashing
3061 |
3062 | ## [8.6.0] - 2025-10-25
3063 |
3064 | ### Added
3065 | - **Document Ingestion System** - Complete document upload and management through web UI (#147, #164)
3066 | - **Single and Batch Upload**: Drag-and-drop or file browser support for PDF, TXT, MD, JSON documents
3067 | - **Background Processing**: Async document processing with progress tracking and status updates
3068 | - **Document Management UI**: New Documents tab in web dashboard with full CRUD operations
3069 | - **Upload History**: Track all document ingestion with status, chunk counts, and file sizes
3070 | - **Document Viewer**: Modal displaying all memory chunks from uploaded documents (up to 1000 chunks)
3071 | - **Document Removal**: Delete documents and their associated memory chunks with confirmation
3072 | - **Search Ingested Content**: Semantic search within uploaded documents to verify indexing
3073 | - **Claude Commands**: `/memory-ingest` and `/memory-ingest-dir` for CLI document upload
3074 | - **API Endpoints**:
3075 | - `POST /api/documents/upload` - Single document upload
3076 | - `POST /api/documents/batch-upload` - Multiple document upload
3077 | - `GET /api/documents/history` - Upload history
3078 | - `GET /api/documents/status/{upload_id}` - Upload status
3079 | - `GET /api/documents/search-content/{upload_id}` - View document chunks
3080 | - `DELETE /api/documents/remove/{upload_id}` - Remove document
3081 | - `DELETE /api/documents/remove-by-tags` - Bulk remove by tags
3082 | - **Files Created**:
3083 | - `src/mcp_memory_service/web/api/documents.py` (779 lines) - Document API
3084 | - `claude_commands/memory-ingest.md` - Single document ingestion command
3085 | - `claude_commands/memory-ingest-dir.md` - Directory ingestion command
3086 | - `docs/development/dashboard-workflow.md` - Development workflow documentation
3087 |
3088 | - **Chunking Configuration Help** - Interactive UI guidance for document chunking parameters
3089 | - Inline help panels with collapsible sections for chunk size and overlap settings
3090 | - Visual diagram showing how overlap works between consecutive chunks
3091 | - Pre-configured recommendations (Default: 1000/200, Smaller: 500/100, Larger: 2000/400)
3092 | - Rule-of-thumb guidelines (15-25% overlap of chunk size)
3093 | - Full dark mode support for all help elements
3094 |
3095 | - **Tag Length Validation** - Server-side validation to prevent data corruption (#174)
3096 | - Maximum tag length enforced at 100 characters
3097 | - Validation on both single and batch upload endpoints
3098 | - Clear error messages showing first invalid tag
3099 | - Frontend filtering to hide malformed tags in display
3100 | - Prevents bloated tags from accidental file path pasting
3101 |
3102 | ### Fixed
3103 | - **Security Vulnerabilities** - Multiple critical security fixes addressed
3104 | - Path traversal vulnerability in file uploads (use `tempfile.NamedTemporaryFile()`)
3105 | - XSS prevention in tag display and event handlers (escape all user-provided filenames)
3106 | - CSP compliance by removing inline `onclick` handlers, using `addEventListener` instead
3107 | - Proper input validation and sanitization throughout upload flow
3108 |
3109 | - **Document Viewer Critical Bugs** - Comprehensive fixes for document management
3110 | - **Chunk Limit**: Increased from 10 to 1000 chunks (was only showing first 10 of 430 chunks)
3111 | - **Upload Session Persistence**: Documents now viewable after server restart (session optional, uses `upload_id` tag search)
3112 | - **Filename Retrieval**: Get filename from memory metadata when session unavailable
3113 | - **Batch File Size**: Calculate and display total file size for batch uploads (was showing 0.0 KB)
3114 | - **Multiple Confirmation Dialogs**: Fixed duplicate event listeners causing N dialogs for N uploads
3115 | - **Event Listener Deduplication**: Added `documentsListenersSetup` flag to prevent duplicate setup
3116 |
3117 | - **Storage Backend Enhancements** - `delete_by_tags` implementation for document deletion
3118 | - Added `delete_by_tags()` method to `MemoryStorage` base class with error aggregation
3119 | - Optimized `SqliteVecMemoryStorage.delete_by_tags()` with single SQL query using OR conditions
3120 | - Added `HybridMemoryStorage.delete_by_tags()` with sync queue support for cloud backends
3121 | - Fixed return value handling (tuple unpacking instead of dict access)
3122 |
3123 | - **UI/UX Improvements** - Enhanced user experience across document management
3124 | - Added scrolling to Recent Memories section (max-height: 600px) to prevent infinite expansion
3125 | - Document chunk modal now scrollable (max-height: 400px) for long content
3126 | - Modal visibility fixed with proper `active` class pattern and CSS transitions
3127 | - Dark mode support for all document UI components (chunk items, modals, previews)
3128 | - Event handlers for View/Remove buttons in document preview cards
3129 | - Responsive design with mobile breakpoints (768px, 1024px)
3130 |
3131 | - **Resource Management** - Proper cleanup and error handling
3132 | - Temp file cleanup moved to `finally` blocks to prevent orphaned files
3133 | - File extension validation fixed (strip leading dot for consistent checking)
3134 | - Session cleanup timing bug fixed (use `total_seconds()` instead of `.seconds`)
3135 | - Loader registration order corrected (PDFLoader takes precedence as fallback)
3136 |
3137 | - **MCP Server Tag Format Support** - Accept both string and array formats
3138 | - MCP tools now accept `"tag1,tag2"` (string) and `["tag1", "tag2"]` (array)
3139 | - Consistent tag handling between API and MCP endpoints
3140 | - Fixes validation errors from schema mismatches
3141 |
3142 | ### Changed
3143 | - **API Response Improvements** - Better error messages and status handling
3144 | - Float timestamp handling in document search (convert via `datetime.fromtimestamp()`)
3145 | - Partial success handling for bulk operations with clear error reporting
3146 | - Progress tracking for background tasks with status updates
3147 |
3148 | ### Technical Details
3149 | - **Testing**: 19 Gemini Code Assist reviews addressed with comprehensive fixes
3150 | - **Performance**: Document viewer handles 430+ chunks efficiently
3151 | - **Compatibility**: Cross-platform temp file handling (Windows, macOS, Linux)
3152 | - **Code Quality**: Removed dead code, duplicate docstrings, and unused Pydantic models
3153 |
3154 | ### Migration Notes
3155 | - No breaking changes - fully backward compatible
3156 | - Existing installations will automatically gain document ingestion capabilities
3157 | - Tag validation only affects new uploads (existing tags unchanged)
3158 |
3159 | ## [8.5.14] - 2025-10-23
3160 |
3161 | ### Added
3162 | - **Memory Hooks: Expanded Git Keyword Extraction** - Dramatically improved memory retrieval by capturing more relevant technical terms from git commits
3163 | - **Problem**: Limited keyword extraction (only 12 terms) missed important development context
3164 | - Git analyzer captured only generic terms: `fix, memory, chore, feat, refactor`
3165 | - Recent work on timestamp parsing, dashboard, analytics not reflected in queries
3166 | - Version numbers (v8.5.12, v8.5.13) not extracted
3167 | - Memory hooks couldn't match against specific technical work
3168 | - **Solution**: Expanded keyword extraction in `git-analyzer.js`
3169 | - **Technical Terms**: Increased from 12 to 38 terms including:
3170 | - Time/Date: `timestamp, parsing, sort, sorting, date, age`
3171 | - Dashboard: `dashboard, analytics, footer, layout, grid, css, stats, display`
3172 | - Development: `async, sync, bugfix, release, version`
3173 | - Features: `embedding, consolidation, memory, retrieval, scoring`
3174 | - Infrastructure: `api, endpoint, server, http, mcp, client, protocol`
3175 | - **Version Extraction**: Added regex to capture version numbers (v8.5.12, v8.5.13, etc.)
3176 | - **Changelog Terms**: Expanded from 12 to 23 terms with same additions
3177 | - **Keyword Limits**: Increased capacity
3178 | - keywords: 15 → 20 terms
3179 | - themes: 10 → 12 entries
3180 | - filePatterns: 10 → 12 entries
3181 | - **Impact**:
3182 | - **Before**: 5 generic terms → limited semantic matching
3183 | - **After**: 20 specific development terms → precise context retrieval
3184 | - Example: `feat, git, memory, retrieval, fix, timestamp, age, v8.5.8, chore, version, v8.5.13, sort, date, dashboard, analytics, stats, display, footer, layout, v8.5.12`
3185 | - **Result**: Memory hooks now capture and retrieve memories about specific technical work (releases, features, bugfixes)
3186 | - **Files Modified**:
3187 | - `claude-hooks/utilities/git-analyzer.js` - Expanded `extractDevelopmentKeywords()` function (commit 4a02c1a)
3188 | - **Testing**: Verified improved extraction with test run showing 20 relevant keywords vs previous 5 generic terms
3189 |
3190 | ## [8.5.13] - 2025-10-23
3191 |
3192 | ### Fixed
3193 | - **Memory Hooks: Unix Timestamp Parsing in Date Sorting** - Fixed critical bug where memories were not sorting chronologically in Claude Code session start
3194 | - **Root Cause**: JavaScript `Date()` constructor expects milliseconds but API returns Unix timestamps in seconds
3195 | - **Impact**: Memory hooks showed old memories (Oct 11-21) before recent ones (Oct 23) despite `sortByCreationDate: true` configuration
3196 | - **Technical Details**:
3197 | - API returns `created_at` as Unix timestamp in seconds (e.g., 1729700000)
3198 | - JavaScript `new Date(1729700000)` interprets this as milliseconds → January 21, 1970
3199 | - All dates appeared as 1970-01-01, breaking chronological sort
3200 | - Relevance scores then determined order, causing old high-scoring memories to rank first
3201 | - **Fix**:
3202 | - Created `getTimestamp()` helper function in `session-start.js` (lines 907-928)
3203 | - Converts `created_at` (seconds) to milliseconds by multiplying by 1000
3204 | - Falls back to `created_at_iso` string parsing if available
3205 | - Proper date comparison ensures newest memories sort first
3206 | - **Result**: Memory hooks now correctly show most recent project memories at session start
3207 | - **Files Modified**:
3208 | - `claude-hooks/core/session-start.js` - Added Unix timestamp conversion helper (commit 71606e5)
3209 |
3210 | ## [8.5.12] - 2025-10-23
3211 |
3212 | ### Fixed
3213 | - **Dashboard: Analytics Stats Display** - Fixed analytics tab showing 0/N/A for key metrics
3214 | - **Root Cause**: Async/sync mismatch in `get_stats()` method implementations
3215 | - **Impact**: Analytics dashboard displayed only "this week" count; total memories, unique tags, and database size showed 0 or N/A
3216 | - **Fix**:
3217 | - Made `SqliteVecMemoryStorage.get_stats()` async (line 1242)
3218 | - Updated `HybridMemoryStorage.get_stats()` to properly await primary storage call (line 878)
3219 | - Added `database_size_bytes` and `database_size_mb` to hybrid stats response
3220 | - Fixed all callers in `health.py` and `mcp.py` to await `get_stats()`
3221 | - **Result**: All metrics now display correctly (1778 memories, 2549 tags, 7.74MB)
3222 | - **Files Modified**:
3223 | - `src/mcp_memory_service/storage/sqlite_vec.py` - Made get_stats() async
3224 | - `src/mcp_memory_service/storage/hybrid.py` - Added await and database size fields
3225 | - `src/mcp_memory_service/web/api/health.py` - Simplified async handling
3226 | - `src/mcp_memory_service/web/api/mcp.py` - Added await calls
3227 |
3228 | - **Dashboard: Footer Layout** - Fixed footer appearing between header and content instead of at bottom
3229 | - **Root Cause**: Footer not included in CSS grid layout template
3230 | - **Impact**: Broken visual layout with footer misplaced in page flow
3231 | - **Fix**:
3232 | - Updated `.app-container` grid to include 5th row with "footer" area
3233 | - Assigned `grid-area: footer` to `.app-footer` class
3234 | - **Result**: Footer now correctly positioned at bottom of page
3235 | - **Files Modified**:
3236 | - `src/mcp_memory_service/web/static/style.css` - Updated grid layout (lines 101-110, 1899)
3237 |
3238 | - **HTTP Server: Runtime Warnings** - Eliminated "coroutine was never awaited" warnings in logs
3239 | - **Root Cause**: Legacy sync/async detection code after all backends became async
3240 | - **Impact**: Runtime warnings cluttering server logs
3241 | - **Fix**: Removed hybrid backend detection logic, all `get_stats()` calls now consistently await
3242 | - **Result**: Clean server logs with no warnings
3243 |
3244 | ## [8.5.11] - 2025-10-23
3245 |
3246 | ### Fixed
3247 | - **Consolidation System: Embedding Retrieval in get_all_memories()** - Fixed SQLite-vec backend to actually retrieve embeddings (PR #171, fixes #169)
3248 | - **Root Cause**: `get_all_memories()` methods only queried `memories` table without joining `memory_embeddings` virtual table
3249 | - **Impact**: Consolidation system received 0 embeddings despite 1773 memories in database, preventing association discovery and semantic clustering
3250 | - **Discovery**: PR #170 claimed to fix this but only modified debug tools; actual fix required changes to `sqlite_vec.py`
3251 | - **Fix**:
3252 | - Added `deserialize_embedding()` helper function using numpy.frombuffer() (sqlite-vec only provides serialize, not deserialize)
3253 | - Updated both `get_all_memories()` methods (lines 1468 and 1681) with LEFT JOIN to `memory_embeddings` table
3254 | - Modified `_row_to_memory()` helper to handle 10-column rows with embeddings
3255 | - Applied Gemini Code Assist improvement to simplify row unpacking logic
3256 | - **Test Results** (1773 memories):
3257 | - Embeddings retrieved: 1773/1773 (100%)
3258 | - Associations discovered: 90-91 (0.3-0.7 similarity range)
3259 | - Semantic clusters created: 3 (DBSCAN grouping)
3260 | - Performance: 1249-1414 memories/second
3261 | - Duration: 1.25-1.42 seconds
3262 | - **Consolidation Status**: ✅ **FULLY FUNCTIONAL** (all three blockers fixed: PR #166, #168, #171)
3263 | - **Files Modified**:
3264 | - `src/mcp_memory_service/storage/sqlite_vec.py` - Added embedding retrieval to all memory fetch operations
3265 |
3266 | ## [8.5.10] - 2025-10-23
3267 |
3268 | ### Fixed
3269 | - **Debug Tools: Embedding Retrieval Functionality** - Fixed debug MCP tools for SQLite-vec backend (PR #170, addresses #169)
3270 | - **Root Cause**: `debug_retrieve_memory` function was written for ChromaDB but codebase now uses SQLite-vec storage
3271 | - **Impact**: Debug tools (`debug_retrieve`) were broken, preventing debugging of embedding retrieval operations
3272 | - **Fix**: Updated debug utilities to work with current SQLite-vec storage backend
3273 | - **Changes**:
3274 | - Fixed `debug_retrieve_memory` in `src/mcp_memory_service/utils/debug.py` to use storage's `retrieve()` method
3275 | - Enhanced debug output with similarity scores, backend information, query details, and raw distance values
3276 | - Added proper filtering by similarity threshold
3277 | - **Files Modified**:
3278 | - `src/mcp_memory_service/utils/debug.py` - Updated for SQLite-vec compatibility
3279 | - `src/mcp_memory_service/server.py` - Enhanced debug output formatting
3280 |
3281 | ### Added
3282 | - **Debug Tool: get_raw_embedding MCP Tool** - New debugging capability for embedding inspection (PR #170)
3283 | - **Purpose**: Direct debugging of embedding generation process
3284 | - **Features**:
3285 | - Shows raw embedding vectors with configurable display (first 10 and last 10 values for readability)
3286 | - Displays embedding dimensions
3287 | - Shows generation status and error messages
3288 | - **Use Case**: Troubleshooting embedding-related issues in consolidation and semantic search
3289 | - **Files Modified**:
3290 | - `src/mcp_memory_service/server.py` - Added `get_raw_embedding` tool and handler
3291 |
3292 | ## [8.5.9] - 2025-10-22
3293 |
3294 | ### Fixed
3295 | - **Consolidation System: Missing update_memory() Method** - Added `update_memory()` method to all storage backends (PR #166, fixes #165)
3296 | - **Root Cause**: Storage backends only implemented `update_memory_metadata()`, but consolidation system's `StorageProtocol` required `update_memory()` for saving consolidated results
3297 | - **Impact**: Prevented consolidation system from saving associations, clusters, compressions, and archived memories
3298 | - **Fix**: Added `update_memory()` method to base `MemoryStorage` class, delegating to `update_memory_metadata()` for proper implementation
3299 | - **Affected Backends**: CloudflareStorage, SqliteVecMemoryStorage, HybridMemoryStorage
3300 | - **Test Results**:
3301 | - Verified on SQLite-vec backend with 1773 memories
3302 | - Performance: 5011 memories/second (local SQLite-vec) vs 2.5 mem/s (Cloudflare)
3303 | - Method successfully executes without AttributeError
3304 | - **Files Modified**:
3305 | - `src/mcp_memory_service/storage/base.py` - Added `update_memory()` to base class
3306 | - `src/mcp_memory_service/storage/http_client.py` - Updated HTTP client call
3307 | - `src/mcp_memory_service/storage/hybrid.py` - Fixed method reference
3308 |
3309 | - **Consolidation System: Datetime Timezone Mismatch** - Fixed timezone handling in decay calculator (PR #168, fixes #167)
3310 | - **Root Cause**: Mixed offset-naive and offset-aware datetime objects causing `TypeError` when calculating time differences
3311 | - **Location**: `src/mcp_memory_service/consolidation/decay.py:191` in `_calculate_access_boost()`
3312 | - **Impact**: Blocked decay calculator from completing, preventing associations, clustering, compression, and archival
3313 | - **Fix**: Added timezone normalization to ensure both `current_time` and `last_accessed` are timezone-aware (UTC) before subtraction
3314 | - **Implementation**:
3315 | - Check if datetime is timezone-naive and convert to UTC if needed
3316 | - Ensures consistent timezone handling across all datetime operations
3317 | - **Files Modified**:
3318 | - `src/mcp_memory_service/consolidation/decay.py` - Added timezone normalization logic
3319 |
3320 | ### Added
3321 | - **Consolidation Documentation** - Comprehensive setup and testing guides
3322 | - `CONSOLIDATION_SETUP.md` - Complete configuration guide for dream-inspired memory consolidation
3323 | - `CONSOLIDATION_TEST_RESULTS.md` - Expected results and troubleshooting guide
3324 | - Documentation covers all 7 consolidation engines and 7 MCP tools
3325 |
3326 | ## [8.5.8] - 2025-10-22
3327 |
3328 | ### Fixed
3329 | - **Critical: Memory Age Calculation in Hooks** - Fixed Unix timestamp handling that caused memories to appear 20,363 days old (55 years) when they were actually recent
3330 | - **Root Cause**: JavaScript's `Date()` constructor expects milliseconds, but SQLite database stores Unix timestamps in seconds. Three functions incorrectly treated seconds as milliseconds: `calculateTimeDecay()`, `calculateRecencyBonus()`, and `analyzeMemoryAgeDistribution()`
3331 | - **Symptoms**:
3332 | - Memory Age Analyzer showed `avgAge: 20363` days instead of actual age
3333 | - Stale memory detection incorrectly triggered (`isStale: true`)
3334 | - Recent memory percentage showed 0% when should be 100%
3335 | - Time decay scores incorrect (1% instead of 100% for today's memories)
3336 | - Recency bonus not applied (0% instead of +15%)
3337 | - **Fix**: Added type checking to convert Unix timestamps properly - multiply by 1000 when timestamp is a number (seconds), pass through when it's an ISO string
3338 | - **Impact**: Memory age calculations now accurate, stale detection works correctly, recency bonuses applied properly
3339 | - **Files Modified**:
3340 | - `claude-hooks/utilities/memory-scorer.js` (lines 11-17, 237-243, 524-534)
3341 | - **Test Results**: Memories now show correct ages (0.4 days vs 20,363 days before fix)
3342 | - **Platform**: All platforms (macOS, Linux, Windows)
3343 |
3344 | ### Changed
3345 | - **Installer Enhancement**: Added automatic statusLine configuration for v8.5.7 features
3346 | - Installer now copies `statusline.sh` to `~/.claude/hooks/`
3347 | - Checks for `jq` dependency (required for statusLine parsing)
3348 | - Automatically adds `statusLine` configuration to `settings.json`
3349 | - Enhanced documentation for statusLine setup and requirements
3350 |
3351 | ### Documentation
3352 | - Added `jq` as required dependency for statusLine feature
3353 | - Documented statusLine configuration in README.md installation section
3354 | - Clarified Unix timestamp handling in memory-scorer.js code comments
3355 |
3356 | ## [8.5.7] - 2025-10-21
3357 |
3358 | ### Added
3359 | - **SessionStart Hook Visibility Features** - Three complementary methods to view session memory context
3360 | - **Visible Summary Output**: Clean bordered console display showing project, storage, memory count with recent indicator, and git context
3361 | - **Detailed Log File**: Complete session context written to `~/.claude/last-session-context.txt` including project details, storage backend, memory statistics, git analysis, and top loaded memories
3362 | - **Status Line Display**: Always-visible status bar at bottom of Claude Code terminal showing `🧠 8 (5 recent) | 📊 10 commits`
3363 | - **Files Modified**:
3364 | - `~/.claude/hooks/core/session-start.js` - Added summary output, log file generation, and cache file write logic
3365 | - `~/.claude/settings.json` - Added statusLine configuration
3366 | - **Files Created**:
3367 | - `~/.claude/statusline.sh` - Bash script for status line display (requires `jq`)
3368 | - `~/.claude/last-session-context.txt` - Auto-generated detailed log file
3369 | - `~/.claude/hooks/utilities/session-cache.json` - Status line data cache
3370 | - **Platform**: Linux/macOS (Windows SessionStart hook still broken - issue #160)
3371 |
3372 | ### Changed
3373 | - SessionStart hook output now provides visible feedback instead of being hidden in system-reminder tags
3374 | - Status line updates every 300ms with latest session memory context
3375 | - Log file automatically updates on each SessionStart hook execution
3376 |
3377 | ### Documentation
3378 | - Clarified difference between macOS and Linux hook output behavior (both use system-reminder tags since v2.2.0)
3379 | - Documented that `<session-start-hook>` wrapper tags were intentionally removed in v2.2.0 for cleaner output
3380 | - Added troubleshooting guide for status line visibility features
3381 |
3382 | ## [8.5.6] - 2025-10-16
3383 |
3384 | ### Fixed
3385 | - **Critical: Memory Hooks HTTPS SSL Certificate Validation** - Fixed hooks failing to connect to HTTPS server with self-signed certificates
3386 | - **Root Cause**: Node.js HTTPS requests were rejecting self-signed SSL certificates silently, causing "No active connection available" errors
3387 | - **Symptoms**:
3388 | - Hooks showed "Failed to connect using any available protocol"
3389 | - No memories retrieved despite server being healthy
3390 | - HTTP server running but hooks couldn't establish connection
3391 | - **Fix**: Added `rejectUnauthorized: false` to both health check and API POST request options in memory-client.js
3392 | - **Impact**: Hooks now successfully connect via HTTPS to servers with self-signed certificates
3393 | - **Files Modified**:
3394 | - `claude-hooks/utilities/memory-client.js` (lines 174, 257)
3395 | - `~/.claude/hooks/utilities/memory-client.js` (deployed)
3396 | - **Test Results**: ✅ 7 memories retrieved from 1558 total, all phases working correctly
3397 | - **Platform**: All platforms (macOS, Linux, Windows)
3398 |
3399 | ### Changed
3400 | - Memory hooks now support HTTPS endpoints with self-signed certificates without manual certificate trust configuration
3401 |
3402 | ## [8.5.5] - 2025-10-14
3403 |
3404 | ### Fixed
3405 | - **Critical: Claude Code Hooks Configuration** - Fixed session-start hook hanging/unresponsiveness on Windows
3406 | - **Root Cause**: Missing forced process exit in session-start.js caused Node.js event loop to remain active with unclosed connections
3407 | - **Fix 1**: Added `.finally()` block with 100ms delayed `process.exit(0)` to ensure clean termination
3408 | - **Fix 2**: Corrected port mismatch in `~/.claude/hooks/config.json` (8889 → 8000) to match HTTP server
3409 | - **Impact**: Hooks now complete in <15 seconds without hanging, Claude Code remains responsive
3410 | - **Files Modified**:
3411 | - `~/.claude/hooks/core/session-start.js` (lines 1010-1013)
3412 | - `~/.claude/hooks/config.json` (line 7)
3413 | - **Platform**: Windows (also applies to macOS/Linux)
3414 |
3415 | ### Changed
3416 | - **Documentation**: Added critical warning section to CLAUDE.md about hook configuration synchronization
3417 | - Documents port mismatch symptoms (hanging hooks, unresponsive Claude Code, connection timeouts)
3418 | - Lists all configuration files to check (`config.json`, HTTP server port, dashboard port)
3419 | - Provides verification commands for Windows/Linux/macOS
3420 | - Explains common mistakes (using dashboard port 8888/8443 instead of API port 8000)
3421 |
3422 | ## [8.5.4] - 2025-10-13
3423 |
3424 | ### Fixed
3425 | - **MCP Server**: Added explicit documentation to `store_memory` tool clarifying that `metadata.tags` must be an array, not a comma-separated string
3426 | - Prevents validation error: `Input validation error: '...' is not of type 'array'`
3427 | - Includes clear examples showing correct (array) vs incorrect (string) format
3428 | - Documentation-only change - no code logic modified
3429 |
3430 | ### Changed
3431 | - Improved `store_memory` tool docstring with metadata format validation examples in `src/mcp_memory_service/mcp_server.py`
3432 |
3433 | ## [Unreleased]
3434 |
3435 | ### ✨ **Added**
3436 |
3437 | #### **Linux systemd Service Support**
3438 | Added comprehensive systemd user service support for automatic HTTP server management on Linux systems.
3439 |
3440 | **New Files:**
3441 | - `scripts/service/mcp-memory-http.service` - systemd user service definition
3442 | - `scripts/service/install_http_service.sh` - Interactive installation script
3443 | - `docs/deployment/systemd-service.md` - Detailed systemd setup guide
3444 |
3445 | **Features:**
3446 | - ✅ **Automatic startup** on user login
3447 | - ✅ **Persistent operation** with loginctl linger support
3448 | - ✅ **Automatic restarts** on failure (RestartSec=10)
3449 | - ✅ **Centralized logging** via journald
3450 | - ✅ **Easy management** via systemctl commands
3451 | - ✅ **Environment loading** from .env file
3452 | - ✅ **Security hardening** (NoNewPrivileges, PrivateTmp)
3453 |
3454 | **Usage:**
3455 | ```bash
3456 | bash scripts/service/install_http_service.sh # Install
3457 | systemctl --user start mcp-memory-http.service
3458 | systemctl --user enable mcp-memory-http.service
3459 | loginctl enable-linger $USER
3460 | ```
3461 |
3462 | ### 📚 **Documentation**
3463 |
3464 | #### **Enhanced HTTP Server Management**
3465 | - Updated `docs/http-server-management.md` with systemd section
3466 | - Added troubleshooting for port mismatch issues (8000 vs 8889)
3467 | - Documented hooks endpoint configuration requirements
3468 |
3469 | #### **CLAUDE.md Updates**
3470 | - Added systemd commands to Essential Commands section
3471 | - Added "Troubleshooting Hooks Not Retrieving Memories" section
3472 | - Cross-referenced detailed documentation guides
3473 |
3474 | ### 🐛 **Fixed**
3475 |
3476 | #### **Hooks Configuration Troubleshooting**
3477 | - Documented common port mismatch issue between hooks config and HTTP server
3478 | - Added diagnostic commands for verifying HTTP server status
3479 | - Clarified that HTTP server is **required** for hooks (stdio MCP cannot be used)
3480 |
3481 | **Root Cause:** Many installations had hooks configured for port 8889 while HTTP server runs on port 8000 (default in .env). This caused silent failures where hooks couldn't connect.
3482 |
3483 | **Solution:**
3484 | 1. Update hooks config endpoint to `http://127.0.0.1:8000`
3485 | 2. Verify with: `systemctl --user status mcp-memory-http.service`
3486 | 3. Test with: `curl http://127.0.0.1:8000/api/health`
3487 |
3488 | ### 🔧 **Changed**
3489 |
3490 | - Service files now use `WantedBy=default.target` for user services (not multi-user.target)
3491 | - Removed `User=` and `Group=` directives from user service (causes GROUP error)
3492 | - Enhanced error messages and troubleshooting documentation
3493 |
3494 | ### 🎨 **Improved**
3495 |
3496 | #### **Claude Code Hooks UI Enhancements**
3497 | Significantly improved visual formatting and readability of memory context injection in Claude Code hooks.
3498 |
3499 | **Enhanced Features:**
3500 | - ✅ **Intelligent Text Wrapping** - New `wrapText()` function preserves word boundaries and indentation
3501 | - ✅ **Unicode Box Drawing** - Professional visual formatting with ╭╮╯╰ characters for better structure
3502 | - ✅ **Recency-Based Display** - Recent memories (< 7 days) stay prominent, older ones are dimmed
3503 | - ✅ **Simplified Date Formatting** - Cleaner date display with recency indicators (today, yesterday, day name, date)
3504 | - ✅ **Enhanced Memory Categorization** - Better visual hierarchy for different memory types
3505 |
3506 | **Files Modified:**
3507 | - `claude-hooks/utilities/context-formatter.js` - Major refactoring with wrapText function and enhanced formatMemoryForCLI
3508 | - `claude-hooks/core/session-start.js` - Minor display improvements for project detection
3509 | - `.claude/settings.local.json` - Platform-specific configuration updates (Windows→Linux path migration)
3510 |
3511 | **Performance:**
3512 | - No performance impact - Lightweight formatting enhancements
3513 | - Better readability improves development efficiency
3514 | - Maintains all existing functionality while improving presentation
3515 |
3516 | ---
3517 |
3518 | ## [8.5.3] - 2025-10-12
3519 |
3520 | ### 🐛 **Fixed**
3521 |
3522 | #### **Critical Memory Hooks Bug Fixes (Claude Code Integration)**
3523 | Fixed critical bugs preventing memory retrieval in Claude Code session-start hooks. Memory awareness now works correctly with both semantic and time-based searches.
3524 |
3525 | **Problem**: Memory hooks showed "No relevant memories found" despite 1,419 memories in database. Retrieved memories were unrelated (from wrong projects) and sorted incorrectly (oldest first).
3526 |
3527 | **Root Causes Fixed:**
3528 |
3529 | 1. **Empty Semantic Query Bug** (search.py:264-272)
3530 | - **Issue**: `storage.retrieve("")` with empty string returned no results
3531 | - **Fix**: Now uses `get_recent_memories()` when `semantic_query` is empty
3532 | - **Impact**: Time-based searches without semantic filtering now work correctly
3533 |
3534 | 2. **Missing Time Expression** (search.py:401-403)
3535 | - **Issue**: Hook sends `'last-2-weeks'` but parser didn't recognize it
3536 | - **Fix**: Added support for 'last 2 weeks', 'past 2 weeks', 'last-2-weeks'
3537 | - **Impact**: Phase 2 fallback queries now work properly
3538 |
3539 | 3. **Performance Optimization** (search.py:36)
3540 | - **Change**: Reduced candidate pool from 1000 to 100 for time filtering
3541 | - **Rationale**: Prevents timeout on large databases, improves response time
3542 | - **Impact**: Search completes in <100ms vs timing out
3543 |
3544 | 4. **CRITICAL: Missing `await` Keywords** (hybrid.py:912, 916, 935, 947)
3545 | - **Issue**: 4 async methods returned unawaited coroutines, causing server hangs
3546 | - **Methods Fixed**:
3547 | - Line 912: `get_all_tags()`
3548 | - Line 916: `get_recent_memories(n)` ⭐ **THE CRITICAL ONE**
3549 | - Line 935: `recall_memory(query, n_results)`
3550 | - Line 947: `get_memories_by_time_range(start_time, end_time)`
3551 | - **Impact**: Hybrid backend now works perfectly (11ms response time!)
3552 |
3553 | 5. **JavaScript Refactoring** (memory-client.js:213-293)
3554 | - **Issue**: ~100 lines of duplicated HTTP request code
3555 | - **Fix**: Created `_performApiPost()` helper to eliminate duplication
3556 | - **Impact**: Improved maintainability, DRY compliance
3557 |
3558 | 6. **Port Consistency** (memory-client.js:166)
3559 | - **Issue**: Health checks used standard web ports (443/80) while API calls used dev ports (8443/8889)
3560 | - **Fix**: Made both use development ports consistently
3561 | - **Impact**: Prevents connection failures with development endpoints
3562 |
3563 | **Testing & Verification:**
3564 | ```bash
3565 | # Before fix: Timeout
3566 | curl -s -m 5 "http://127.0.0.1:8889/api/search/by-time" -H "Content-Type: application/json" -d '{"query":"last-2-weeks","n_results":10}'
3567 | # (hangs indefinitely)
3568 |
3569 | # After fix: Success
3570 | curl -s -m 5 "http://127.0.0.1:8889/api/search/by-time" -H "Content-Type: application/json" -d '{"query":"last-2-weeks","n_results":10}'
3571 | # Status: 200 (11ms)
3572 | # Results: 5 memories retrieved
3573 | ```
3574 |
3575 | **Files Modified:**
3576 | - `src/mcp_memory_service/web/api/search.py` - Empty query fix, time expression, pool size, UTC timezone
3577 | - `src/mcp_memory_service/storage/hybrid.py` - Fixed 4 missing await keywords
3578 | - `claude-hooks/utilities/memory-client.js` - Refactored HTTP helpers, port consistency, API contract
3579 | - `claude-hooks/core/session-start.js` - Updated hardcoded endpoint fallbacks
3580 | - `claude-hooks/config.json` - HTTP endpoint configuration
3581 |
3582 | **Code Review**: All fixes reviewed and approved by Gemini Code Assist with PEP 8 compliance, timezone-aware datetimes, list comprehensions, and proper error handling.
3583 |
3584 | **PR Reference**: [#156](https://github.com/doobidoo/mcp-memory-service/pull/156)
3585 |
3586 | ## [8.5.2] - 2025-10-11
3587 |
3588 | ### 🐛 **Fixed**
3589 |
3590 | #### **v8.5.0 Implementation Missing (Code Completion)**
3591 | Complete implementation of Hybrid Backend Sync Dashboard feature that was documented in v8.5.0 CHANGELOG but code was never committed.
3592 |
3593 | **Context**: v8.5.0 release (c241292) included CHANGELOG documentation and version bump but the actual implementation files were accidentally not staged/committed. This release completes the v8.5.0 feature by committing the missing implementation code.
3594 |
3595 | **Files Added:**
3596 | - `src/mcp_memory_service/web/api/sync.py` - Sync API endpoints (GET /api/sync/status, POST /api/sync/force)
3597 | - `start_http_server.sh` - Cross-platform HTTP server management script
3598 |
3599 | **Files Modified:**
3600 | - `src/mcp_memory_service/web/app.py` - Integrated sync router
3601 | - `src/mcp_memory_service/web/static/app.js` - Sync status UI with polling
3602 | - `src/mcp_memory_service/web/static/index.html` - Sync status bar markup
3603 | - `src/mcp_memory_service/web/static/style.css` - Sync bar styling + grid layout
3604 | - `src/mcp_memory_service/storage/hybrid.py` - Added `get_sync_status()` method
3605 | - `src/mcp_memory_service/web/api/health.py` - Health check enhancements
3606 | - `src/mcp_memory_service/storage/sqlite_vec.py` - Database path fixes
3607 |
3608 | **Additional Improvements:**
3609 | - `claude-hooks/utilities/context-formatter.js` - Tree text wrapping improvements for better CLI output
3610 |
3611 | **Impact**: Users can now access the complete Hybrid Backend Sync Dashboard feature including manual sync triggers and real-time status monitoring as originally intended in v8.5.0.
3612 |
3613 | ## [8.5.1] - 2025-10-11
3614 |
3615 | ### 🎯 **New Features**
3616 |
3617 | #### **Dynamic Memory Weight Adjustment (Claude Code Hooks)**
3618 | Intelligent auto-calibration prevents stale memories from dominating session context when recent development exists.
3619 |
3620 | **Problem Solved:**
3621 | Users reported "Current Development" section showing outdated memories (24-57 days old) instead of recent work from the last 7 days. Root cause: static configuration couldn't adapt to mismatches between git activity and memory age.
3622 |
3623 | **Solution - Memory Age Distribution Analyzer:**
3624 | - **Auto-Detection**: Analyzes memory age percentiles (median, p75, p90, avg)
3625 | - **Staleness Detection**: Triggers when median > 30 days or < 20% recent memories
3626 | - **Smart Calibration**: Automatically adjusts weights:
3627 | - `timeDecay`: 0.25 → 0.50 (+100% boost for recent memories)
3628 | - `tagRelevance`: 0.35 → 0.20 (-43% reduce old tag matches)
3629 | - **Impact**: Stale memory sets automatically prioritize any recent memories
3630 |
3631 | **Solution - Adaptive Git Context Weight:**
3632 | - **Scenario 1**: Recent commits (< 7d) + Stale memories (median > 30d)
3633 | - Reduces git weight by 30%: `1.8x → 1.3x`
3634 | - Prevents old git-related memories from dominating
3635 | - **Scenario 2**: Recent commits + Recent memories (both < 14d)
3636 | - Keeps configured weight: `1.8x → 1.8x`
3637 | - Git context is relevant and aligned
3638 | - **Scenario 3**: Old commits (> 14d) + Some recent memories
3639 | - Reduces git weight by 15%: `1.8x → 1.5x`
3640 | - Lets recent non-git memories surface
3641 |
3642 | **Configuration Options:**
3643 | ```json
3644 | {
3645 | "memoryScoring": {
3646 | "autoCalibrate": true // Enable/disable auto-calibration
3647 | },
3648 | "gitAnalysis": {
3649 | "adaptiveGitWeight": true // Enable/disable adaptive git weight
3650 | }
3651 | }
3652 | ```
3653 |
3654 | **Transparency Output:**
3655 | ```
3656 | 🎯 Auto-Calibration → Stale memory set detected (median: 54d old, 0% recent)
3657 | Adjusted Weights → timeDecay: 0.50, tagRelevance: 0.20
3658 | ⚙️ Adaptive Git Weight → Recent commits (1d ago) but stale memories - reducing git boost: 1.8 → 1.3
3659 | ```
3660 |
3661 | **Files Added:**
3662 | - `claude-hooks/test-adaptive-weights.js` - Comprehensive test scenarios
3663 |
3664 | **Files Modified:**
3665 | - `claude-hooks/utilities/memory-scorer.js` (+162 lines):
3666 | - `analyzeMemoryAgeDistribution()` - Detects staleness and recommends adjustments
3667 | - `calculateAdaptiveGitWeight()` - Dynamically adjusts git boost based on context alignment
3668 | - `claude-hooks/core/session-start.js` (+60 lines):
3669 | - Integrated age analysis before scoring
3670 | - Auto-calibration logic with config check
3671 | - Adaptive git weight calculation with transparency output
3672 | - `claude-hooks/config.json` (+2 options):
3673 | - Added `memoryScoring.autoCalibrate: true` (default enabled)
3674 | - Added `gitAnalysis.adaptiveGitWeight: true` (default enabled)
3675 |
3676 | **Benefits:**
3677 | - ✅ **Automatic Detection**: No manual config changes when memories become stale
3678 | - ✅ **Context-Aware**: Git boost only applies when it enhances (not harms) relevance
3679 | - ✅ **Transparent**: Shows reasoning for adjustments in session output
3680 | - ✅ **Opt-Out Available**: Users can disable via config if desired
3681 | - ✅ **Backward Compatible**: Defaults preserve existing behavior when memories are recent
3682 |
3683 | **Test Results:**
3684 | - Scenario 1 (Stale): Automatically calibrated weights and reduced git boost 1.8x → 1.3x
3685 | - Scenario 2 (Recent): No calibration needed, preserved git weight at 1.8x
3686 | - Both scenarios working as expected, preventing outdated context issues
3687 |
3688 | ## [8.5.0] - 2025-10-11
3689 |
3690 | ### 🎉 **New Features**
3691 |
3692 | #### **Hybrid Backend Sync Dashboard**
3693 | Manual sync management UI with real-time status monitoring for hybrid storage backend.
3694 |
3695 | **Features:**
3696 | - **Sync Status Bar** - Color-coded visual indicator between navigation and main content
3697 | - 🔄 Syncing (blue gradient) - Active synchronization in progress
3698 | - ⏱️ Pending (yellow gradient) - Operations queued, shows ETA and count
3699 | - ✅ Synced (green gradient) - All operations synchronized, shows last sync time
3700 | - ⚠️ Error (red gradient) - Sync failures detected, shows failed operation count
3701 | - **"Sync Now" Button** - Manual trigger for immediate Cloudflare ↔ SQLite synchronization
3702 | - **Real-time Monitoring** - 10-second polling for live sync status updates
3703 | - **REST API Endpoints:**
3704 | - `GET /api/sync/status` - Current sync state, pending operations, last sync time
3705 | - `POST /api/sync/force` - Manually trigger immediate sync
3706 |
3707 | **Technical Implementation:**
3708 | - New sync API router: `src/mcp_memory_service/web/api/sync.py` (complete CRUD endpoints)
3709 | - Frontend integration: `src/mcp_memory_service/web/static/app.js:379-485` (status monitoring + manual sync)
3710 | - CSS styling: `src/mcp_memory_service/web/static/style.css:292-403` (grid layout + animations)
3711 | - HTML structure: `src/mcp_memory_service/web/static/index.html:125-138` (sync bar markup)
3712 | - Backend method: `src/mcp_memory_service/storage/hybrid.py:982-994` (added `get_sync_status()`)
3713 |
3714 | ### 🐛 **Fixed**
3715 |
3716 | - **CSS Grid Layout Bug** - Sync status bar invisible despite JavaScript detecting hybrid mode
3717 | - **Root Cause**: `.app-container` grid layout defined `"header" "nav" "main"` but sync bar wasn't assigned a grid area
3718 | - **Fix**: Added `grid-area: sync` to `.sync-status-bar` and expanded grid to include sync row
3719 | - **Files**: `style.css:101-109` (grid layout), `style.css:293` (sync bar grid area)
3720 |
3721 | - **Sync Status Logic Error** - "Sync Now" button incorrectly disabled when background service running
3722 | - **Root Cause**: Confused `is_running` (service alive) with `actively_syncing` (active sync operation)
3723 | - **Fix**: Changed status determination to check `actively_syncing` field instead of `is_running`
3724 | - **Impact**: Button now correctly enabled when 0 pending operations
3725 | - **File**: `src/mcp_memory_service/web/api/sync.py:106-118`
3726 |
3727 | - **Database Path Mismatch** - HTTP server using different SQLite database than Claude Code MCP
3728 | - **Root Cause**: Missing `MCP_MEMORY_SQLITE_PATH` environment variable in HTTP server startup
3729 | - **Fix**: Added explicit database path to match Claude Desktop config
3730 | - **File**: `start_http_server.sh:4` (added `MCP_MEMORY_SQLITE_PATH` export)
3731 |
3732 | - **Backend Configuration Inconsistency** - Claude Desktop using `cloudflare` backend while HTTP server using `hybrid`
3733 | - **Root Cause**: Mismatched storage backend configurations preventing data synchronization
3734 | - **Fix**: Unified both to use `hybrid` backend with same SQLite database
3735 | - **File**: `claude_desktop_config.json:70` (changed `"cloudflare"` → `"hybrid"`)
3736 | - **Impact**: Dashboard now shows same 1413 memories as Claude Code
3737 |
3738 | ### 🔧 **Improvements**
3739 |
3740 | - **Enhanced Health Check** - `/api/health/detailed` now includes sync status for hybrid backend
3741 | - Shows sync service state, pending operations, last sync time, failed operations
3742 | - File: `src/mcp_memory_service/web/api/health.py:141-154`
3743 |
3744 | - **Cleaned Database Files** - Removed obsolete SQLite databases to prevent confusion
3745 | - Deleted: `memory_http.db` (701 memories), `backup_sqlite_vec.db`, `sqlite_vec_backup_20250822_230643.db`
3746 |
3747 | - **Updated Startup Script** - `start_http_server.sh` now includes all required environment variables
3748 | - Added: `MCP_MEMORY_SQLITE_PATH`, `MCP_HTTP_ENABLED`
3749 | - Ensures HTTP server uses same database as Claude Code
3750 |
3751 | ### 📊 **Impact**
3752 |
3753 | - **User Experience**: Dashboard now provides complete visibility and control over hybrid backend synchronization
3754 | - **Data Consistency**: Unified backend configuration ensures Claude Code and HTTP dashboard always show same data
3755 | - **Performance**: Manual sync trigger allows immediate synchronization instead of waiting 5 minutes
3756 | - **Reliability**: Fixed grid layout bug ensures sync status bar always visible when in hybrid mode
3757 |
3758 | ## [8.4.3] - 2025-10-11
3759 |
3760 | ### 🐛 Fixed
3761 | - **Sync Script Import Path:** Fixed `scripts/sync/sync_memory_backends.py` module import path to work correctly from scripts directory
3762 | - Changed `sys.path.insert(0, str(Path(__file__).parent.parent))` → `sys.path.insert(0, str(Path(__file__).parent.parent.parent))`
3763 | - Resolves `ModuleNotFoundError: No module named 'src'` when using manual sync commands
3764 | - Fixes: `python scripts/sync/claude_sync_commands.py backup/restore/sync` commands
3765 |
3766 | ### 📊 Impact
3767 | - Users can now successfully run manual sync utilities for hybrid backend
3768 | - Manual Cloudflare ↔ SQLite synchronization commands now functional
3769 |
3770 | ## [8.4.2] - 2025-10-11
3771 |
3772 | ### 🎯 **Performance & Optimization**
3773 |
3774 | #### **Additional MCP Context Optimization: Debug Tools Removal**
3775 | - **Problem**: Continuing context optimization efforts from v8.4.1, identified 2 additional low-value debug tools
3776 | - **Solution**: Removed debug/maintenance MCP tools with zero test dependencies
3777 |
3778 | **Tools Removed:**
3779 | - `get_embedding` (606 tokens) - Returns raw embedding vectors; low-level debugging only
3780 | - `check_embedding_model` (553 tokens) - Checks if embedding model loaded; errors surface naturally
3781 |
3782 | **Rationale:** These were specialized debugging tools rarely needed in practice. Embedding errors are caught during normal retrieval operations, and raw embedding inspection is a niche development task not required for AI assistant integration.
3783 |
3784 | **Impact:**
3785 | - ✅ **MCP tools**: 26.8k → 25.6k tokens (4.5% additional reduction, -1.2k tokens)
3786 | - ✅ **Total optimization since v8.4.0**: 31.4k → 25.6k tokens (18.5% reduction, -5.8k tokens saved)
3787 | - ✅ **Zero breaking changes**: No test coverage for these tools
3788 | - ✅ **Conservative approach**: Removed only tools with no dependencies
3789 |
3790 | **Files Modified:**
3791 | - `src/mcp_memory_service/server.py`: Removed 2 tool definitions, handlers, and implementations (~61 lines)
3792 |
3793 | **Note:** Further optimization possible with MODERATE approach (debug_retrieve, exact_match_retrieve, cleanup_duplicates) if additional context savings needed.
3794 |
3795 | ## [8.4.1] - 2025-10-11
3796 |
3797 | ### 🎯 **Performance & Optimization**
3798 |
3799 | #### **MCP Context Optimization: Dashboard Tools Removal**
3800 | - **Problem**: MCP tools consuming 31.4k tokens (15.7% of context budget) with redundant dashboard variants that duplicated web UI functionality
3801 | - **Solution**: Removed 8 dashboard-specific MCP tools that were unnecessary for Claude Code integration
3802 |
3803 | **Tools Removed:**
3804 | - `dashboard_check_health`, `dashboard_recall_memory`, `dashboard_retrieve_memory`
3805 | - `dashboard_search_by_tag`, `dashboard_get_stats`, `dashboard_optimize_db`
3806 | - `dashboard_create_backup`, `dashboard_delete_memory`
3807 |
3808 | **Rationale:** Web dashboard uses REST API endpoints (`/api/*`), not MCP tools. These were legacy wrappers created during early dashboard development that bloated context without providing value for AI assistant integration.
3809 |
3810 | **Impact:**
3811 | - ✅ **MCP tools**: 31.4k → 26.8k tokens (15% reduction, -4.6k tokens saved)
3812 | - ✅ **Zero functional impact**: Core memory tools preserved (`check_database_health`, `recall_memory`, etc.)
3813 | - ✅ **Cleaner separation**: MCP protocol for Claude Code integration, HTTP REST API for web dashboard
3814 |
3815 | **Files Modified:**
3816 | - `src/mcp_memory_service/server.py`: Removed 8 tool definitions, call_tool handlers, and method implementations (~506 lines)
3817 | - `docs/api/tag-standardization.md`: Updated to use `check_database_health()` instead of `dashboard_get_stats()`
3818 | - `docs/maintenance/memory-maintenance.md`: Removed redundant dashboard tool reference
3819 | - `docs/guides/mcp-enhancements.md`: Removed `dashboard_optimize_db` progress tracking example
3820 | - `docs/assets/images/project-infographic.svg`: Removed `dashboard_*_ops` visual reference
3821 |
3822 | **Note:** Web dashboard at `https://localhost:8443` continues working normally via REST API. No user-facing changes.
3823 |
3824 | ## [8.4.0] - 2025-10-08
3825 |
3826 | ### ✨ **Features & Improvements**
3827 |
3828 | #### **Claude Code Memory Hooks Recency Optimization**
3829 | - **Problem Solved**: Memory hooks were surfacing 60+ day old memories instead of recent development work (Oct v8.0-v8.3), causing critical development context to be missing despite being stored in the database
3830 | - **Core Enhancement**: Comprehensive recency optimization with rebalanced scoring algorithm to prioritize recent memories over well-tagged old content
3831 |
3832 | ##### **Scoring Algorithm Improvements**
3833 | - **Weight Rebalancing** (`config.json`):
3834 | - `timeDecay`: 0.25 → 0.40 (+60% influence on recency)
3835 | - `tagRelevance`: 0.35 → 0.25 (-29% to reduce tag dominance)
3836 | - `contentQuality`: 0.25 → 0.20 (-20% to balance with time)
3837 | - **Gentler Time Decay**:
3838 | - `timeDecayRate`: 0.1 → 0.05 (30-day memories: 0.22 vs 0.05 score - preserves older memories)
3839 | - **Stronger Git Context**:
3840 | - `gitContextWeight`: 1.2 → 1.8 (80% boost vs 20% for git-derived memories)
3841 | - Implemented multiplication in `session-start.js` after scoring
3842 | - **Expanded Time Windows**:
3843 | - `recentTimeWindow`: "last-week" → "last-month" (broader recent search)
3844 | - `fallbackTimeWindow`: "last-month" → "last-3-months" (wider fallback range)
3845 | - **Higher Quality Bar**: `minRelevanceScore`: 0.3 → 0.4 (filters generic old content)
3846 |
3847 | ##### **New Recency Bonus System** (`memory-scorer.js`)
3848 | - **Tiered Additive Bonuses**:
3849 | - < 7 days: +0.15 bonus (strong boost for last week)
3850 | - < 14 days: +0.10 bonus (moderate boost for last 2 weeks)
3851 | - < 30 days: +0.05 bonus (small boost for last month)
3852 | - **Implementation**: Configurable tier-based system using `RECENCY_TIERS` array
3853 | - **Impact**: Ensures recent memories always get advantage regardless of tag relevance
3854 |
3855 | ##### **Documentation & Testing**
3856 | - **Added**: Comprehensive `CONFIGURATION.md` (450+ lines)
3857 | - All scoring weights with impact analysis
3858 | - Time decay behavior and examples
3859 | - Git context weight strategy
3860 | - Recency bonus system documentation
3861 | - Tuning guide for different workflows
3862 | - Migration notes from v1.0
3863 | - **Added**: Validation test suite (`test-recency-scoring.js`)
3864 | - Tests scoring algorithm with memories of different ages
3865 | - Validates time decay and recency bonus calculations
3866 | - Confirms recent memories rank higher (success criteria: 2 of top 3 < 7 days old)
3867 |
3868 | ##### **Results**
3869 | - **Before**: Top 3 memories averaged 45+ days old (July-Sept content)
3870 | - **After**: All top 3 memories < 7 days old ✅
3871 | - **Validation**: 80% higher likelihood of surfacing recent work
3872 |
3873 | **Impact**: ✅ Memory hooks now reliably surface recent development context, significantly improving Claude Code session awareness for active projects
3874 |
3875 | ##### **Technical Details**
3876 | - **PR**: [#155](https://github.com/doobidoo/mcp-memory-service/pull/155) - Memory hooks recency optimization
3877 | - **Files Modified**:
3878 | - Configuration: `claude-hooks/config.json` (scoring weights, time windows, git context)
3879 | - Scoring: `claude-hooks/utilities/memory-scorer.js` (recency bonus, configurable decay)
3880 | - Session: `claude-hooks/core/session-start.js` (git context weight implementation)
3881 | - Tests: `claude-hooks/test-recency-scoring.js` (validation suite)
3882 | - Documentation: `claude-hooks/CONFIGURATION.md` (comprehensive guide)
3883 | - **Code Review**: 7 rounds of Gemini Code Assist review completed
3884 | - **CRITICAL bugs fixed**: Config values not being used (round 5), gitContextWeight not implemented (round 6)
3885 | - **Security fixes**: TLS certificate validation, future timestamp handling
3886 | - **Maintainability**: DRY refactoring, tier-based configuration, comprehensive docs
3887 | - **Test Results**: ✅ All validation checks passed - recent memories consistently prioritized
3888 |
3889 | ## [8.3.1] - 2025-10-07
3890 |
3891 | ### ✨ **Features & Improvements**
3892 |
3893 | #### **HTTP Server Management Tools**
3894 | - **Added**: Cross-platform HTTP server management utilities for Claude Code Natural Memory Triggers
3895 | - **New Scripts**:
3896 | - `scripts/server/check_http_server.py`: Health check utility for HTTP server status verification
3897 | - Supports both HTTP and HTTPS endpoints via environment variables
3898 | - Verbose output by default, `-q` flag for quiet mode (exit codes only)
3899 | - Detects MCP_HTTPS_ENABLED, MCP_HTTP_PORT, MCP_HTTPS_PORT configuration
3900 | - `scripts/server/start_http_server.sh`: Auto-start script for Unix/macOS
3901 | - Intelligent server detection with 5-second polling loop
3902 | - Background process management via nohup
3903 | - Logs to `/tmp/mcp-http-server.log`
3904 | - `scripts/server/start_http_server.bat`: Auto-start script for Windows
3905 | - 5-second polling loop for reliable startup detection
3906 | - Starts server in new window for easy monitoring
3907 | - Handles already-running servers gracefully
3908 | - **Documentation**: Comprehensive `docs/http-server-management.md` guide
3909 | - Why HTTP server is required for Natural Memory Triggers
3910 | - Quick health check commands
3911 | - Manual and auto-start procedures
3912 | - Troubleshooting guide with common issues
3913 | - Integration with Claude Code hooks
3914 | - Automation examples (launchd, Task Scheduler, shell aliases)
3915 | - **Use Case**: Essential for Claude Code hooks to inject relevant memories at session start without MCP conflicts
3916 | - **Wiki**: User-specific setup examples moved to wiki as reference guides
3917 | - Windows-Hybrid-Backend-Setup-Example.md
3918 | - Windows-Setup-Summary-Example.md
3919 |
3920 | **Impact**: ✅ Streamlined HTTP server management, improved Natural Memory Triggers reliability, better cross-platform support
3921 |
3922 | ##### **Technical Details**
3923 | - **PR**: [#154](https://github.com/doobidoo/mcp-memory-service/pull/154) - HTTP server management tools
3924 | - **Files Added**: 4 new files
3925 | - Scripts: `check_http_server.py`, `start_http_server.sh`, `start_http_server.bat`
3926 | - Documentation: `http-server-management.md`
3927 | - **Gemini Reviews**: 3 rounds of code review and refinement
3928 | - Security: Removed hardcoded credentials (replaced with placeholders)
3929 | - Robustness: Improved exception handling, added polling loops
3930 | - CLI Usability: Simplified argument parsing (removed redundant `-v` flag)
3931 | - **Cross-platform**: Fully tested on Unix/macOS and Windows environments
3932 | - **Integration**: Works seamlessly with existing `run_http_server.py` script
3933 |
3934 | ## [8.3.0] - 2025-10-07
3935 |
3936 | ### 🧹 **Refactoring & Code Cleanup**
3937 |
3938 | #### **Complete ChromaDB Backend Removal**
3939 | - **Removed**: ~300-500 lines of ChromaDB dead code following v8.0.0 deprecation
3940 | - **Scope**: Complete cleanup across 18 files including configuration, CLI, server, storage, utilities, and web interface
3941 | - **Changes**:
3942 | - **Configuration** (`config.py`): Removed CHROMA_PATH, CHROMA_SETTINGS, COLLECTION_METADATA, CHROMADB_MAX_CONTENT_LENGTH
3943 | - **CLI** (`cli/main.py`, `cli/ingestion.py`): Removed `--chroma-path` option, removed 'chromadb' from storage backend choices
3944 | - **Server** (`server.py`): Removed ChromaDB initialization (~60 lines), stats fallback (~40 lines), backup handler, validation logic
3945 | - **Utilities** (`utils/db_utils.py`): Removed ChromaDB validation, stats, and repair functions (~140 lines)
3946 | - **Storage** (`storage/cloudflare.py`, `storage/sqlite_vec.py`): Updated docstrings to be backend-agnostic
3947 | - **Web** (`web/app.py`): Removed 'chromadb' from backend display name mapping
3948 | - **Documentation**: Updated all error messages to suggest Cloudflare instead of ChromaDB
3949 | - **Impact**: ✅ Cleaner codebase, reduced technical debt, no misleading ChromaDB references
3950 | - **SUPPORTED_BACKENDS**: Now correctly shows `['sqlite_vec', 'sqlite-vec', 'cloudflare', 'hybrid']`
3951 |
3952 | #### **CLI Backend Consistency Enhancement**
3953 | - **Added**: 'sqlite-vec' hyphenated alias to all CLI storage backend choices
3954 | - **Affected commands**: `server`, `status`, `ingest_document`, `ingest_directory`
3955 | - **Rationale**: Ensures CLI behavior matches SUPPORTED_BACKENDS configuration
3956 | - **Impact**: ✅ Improved user experience with consistent backend naming across CLI and configuration
3957 |
3958 | ### 🐛 **Bug Fixes**
3959 |
3960 | #### **Dashboard System Information Display (Issue #151)**
3961 | - **Fixed**: Dashboard showing "N/A" for embedding model, embedding dimensions, and database size on non-hybrid backends
3962 | - **Root cause**: JavaScript expected hybrid-backend-specific nested paths (`storage.primary_stats.*`)
3963 | - **Solution**: Added fallback paths in `app.js` SYSTEM_INFO_CONFIG:
3964 | - `settingsEmbeddingModel`: Falls back to `storage.embedding_model`
3965 | - `settingsEmbeddingDim`: Falls back to `storage.embedding_dimension`
3966 | - `settingsDbSize`: Falls back to `storage.database_size_mb`
3967 | - **Impact**: ✅ Dashboard now correctly displays system information for sqlite-vec, cloudflare, and hybrid backends
3968 |
3969 | ##### **Technical Details**
3970 | - **PR**: [#153](https://github.com/doobidoo/mcp-memory-service/pull/153) - ChromaDB dead code removal + Issue #151 fix
3971 | - **Files Modified**: 18 files
3972 | - Core cleanup: `config.py`, `server.py`, `mcp_server.py`, `utils/db_utils.py`
3973 | - CLI: `cli/main.py`, `cli/ingestion.py`, `cli/utils.py`
3974 | - Storage: `storage/factory.py`, `storage/cloudflare.py`, `storage/sqlite_vec.py`
3975 | - Web: `web/app.py`, `web/api/health.py`, `web/static/app.js`
3976 | - Utilities: `utils/debug.py`, `embeddings/onnx_embeddings.py`
3977 | - Package: `__init__.py`, `dependency_check.py`
3978 | - **Code Review**: Approved by Gemini Code Assist with high-quality feedback
3979 | - **Testing**: ✅ SQLite-vec backend initialization, ✅ SUPPORTED_BACKENDS verification, ✅ Service startup
3980 |
3981 | ## [8.2.4] - 2025-10-06
3982 |
3983 | ### 🐛 **Bug Fixes**
3984 |
3985 | #### **Critical: Memory Hooks JSON Parsing Failure**
3986 | - **Fixed**: Memory awareness hooks completely broken - unable to retrieve memories due to JSON parsing errors
3987 | - **Root cause**: Naive string replacement in HTTP client destroyed valid JSON
3988 | - `replace(/'/g, '"')` broke apostrophes in content (e.g., "it's" → "it"s")
3989 | - Replaced Python-style values (True/False/None) in already-valid JSON
3990 | - Used `/mcp` MCP-over-HTTP bridge instead of direct REST API
3991 | - **Solution**:
3992 | - Removed destructive string replacements
3993 | - Updated to use direct REST API endpoints (`/api/search`, `/api/search/by-time`)
3994 | - Parse JSON responses directly without conversion
3995 | - **Impact**: ✅ Memory hooks now successfully retrieve context-relevant memories at session start
3996 |
3997 | #### **HTTP Server Backend Configuration Override**
3998 | - **Fixed**: HTTP server ignored `.env` configuration, forcing `sqlite_vec` instead of configured `hybrid` backend
3999 | - **Root cause**: `run_http_server.py` used `os.environ.setdefault()` after `.env` loading, overriding user config
4000 | - **Solution**: Commented out the backend override line to respect `.env` settings
4001 | - **Impact**: ✅ Hybrid backend now works correctly via HTTP server
4002 |
4003 | ##### **Technical Details**
4004 | - **Files**:
4005 | - `C:\Users\heinrich.krupp\.claude\hooks\utilities\memory-client.js` - Fixed `queryMemoriesHTTP()` method
4006 | - `scripts/server/run_http_server.py` - Removed backend configuration override (line 148)
4007 | - **Affected**: All users using memory hooks with HTTP protocol (automatic session awareness)
4008 |
4009 | ## [8.2.3] - 2025-10-05
4010 |
4011 | ### ✨ **Enhancements**
4012 |
4013 | #### **Dashboard Footer Navigation**
4014 | - **Added**: Comprehensive footer to dashboard with three sections
4015 | - **Documentation**: Links to Wiki Home, Troubleshooting Guide, Backend Configuration Issues
4016 | - **Resources**: GitHub Repository (with icon), Portfolio (doobidoo.github.io), API Documentation
4017 | - **About**: Project description, Apache 2.0 license link, copyright notice
4018 | - **Features**: Security attributes (target="_blank", rel="noopener"), responsive design (mobile breakpoint 768px)
4019 | - **Impact**: ✅ Improved discoverability of documentation and resources from dashboard
4020 |
4021 | ### 🐛 **Bug Fixes**
4022 |
4023 | #### **Dark Mode Footer Styling**
4024 | - **Critical fix**: Footer appearing bright/light in dark mode instead of dark
4025 | - **Root cause**: Incorrect CSS variable usage - using wrong end of inverted color scale
4026 | - Background used `var(--neutral-900)` (#f9fafb - light) instead of `var(--neutral-100)` (#1f2937 - dark)
4027 | - Headings used `var(--neutral-100)` (dark text) instead of `var(--neutral-900)` (light text)
4028 | - **Solution**: Corrected CSS variables to match dashboard card pattern with !important flags
4029 | - **Impact**: ✅ Footer now properly displays with dark background and light text in dark mode
4030 |
4031 | ##### **Technical Details**
4032 | - **Files**:
4033 | - `src/mcp_memory_service/web/static/index.html` - Footer HTML structure (lines 463-517)
4034 | - `src/mcp_memory_service/web/static/style.css` - Footer styling and dark mode overrides (lines 1757-1893)
4035 |
4036 | ## [8.2.2] - 2025-10-05
4037 |
4038 | ### ✨ **Enhancements**
4039 |
4040 | #### **HTTP-MCP Bridge: recall_memory Tool Support**
4041 | - **Added**: `recall_memory` tool to MCP HTTP bridge API
4042 | - **Functionality**: Natural language time-based memory retrieval (e.g., "last week", "yesterday")
4043 | - **Integration**: Seamlessly maps to storage backend's `recall_memory` method
4044 | - **API**: Accepts `query` (natural language) and optional `n_results` parameter
4045 | - **Use Case**: Enables time-aware memory recall through HTTP/MCP bridge interface
4046 |
4047 | ##### **Technical Details**
4048 | - **File**: `src/mcp_memory_service/web/api/mcp.py`
4049 | - Added `recall_memory` tool definition to `MCP_TOOLS` array
4050 | - Implemented handler in `handle_tool_call()` function
4051 | - Returns standardized format: content, content_hash, tags, created_at
4052 |
4053 | ## [8.2.1] - 2025-10-05
4054 |
4055 | ### 🐛 **Bug Fixes**
4056 |
4057 | #### **Critical: Missing Core Dependencies**
4058 | - **Fixed**: `sentence-transformers` and `torch` moved from optional `[ml]` extras to base dependencies
4059 | - **Root cause**: v8.2.0 removed ChromaDB but accidentally made semantic search dependencies optional
4060 | - **Impact**: Service failed to start with `ImportError: sentence-transformers is not available`
4061 | - **Resolution**: These are core dependencies required for semantic memory functionality
4062 | - **Breaking**: Users upgrading from v8.2.0 must run `uv sync` to install corrected dependencies
4063 |
4064 | ##### **Technical Details**
4065 | - **File**: `pyproject.toml`
4066 | - Moved `sentence-transformers>=2.2.2` from `[ml]` to `dependencies`
4067 | - Moved `torch>=2.0.0` from `[ml]` to `dependencies`
4068 | - Semantic search is core functionality, not optional
4069 |
4070 | ## [8.2.0] - 2025-10-05
4071 |
4072 | ### ✨ **Dashboard UX Improvements**
4073 |
4074 | #### **Dark Mode Polish**
4075 | - **Fixed**: Connection status indicator now properly displays in dark mode
4076 | - **Implementation**: Added dark mode CSS override for `.connection-status` component
4077 | - **Impact**: ✅ All dashboard elements now fully support dark mode without visual glitches
4078 |
4079 | #### **Browse Tab User Experience**
4080 | - **Enhancement**: Automatic smooth scroll to results when clicking a tag
4081 | - **Implementation**: Added `scrollIntoView()` with smooth behavior to `filterByTag()` method
4082 | - **User Benefit**: No more manual scrolling needed - tag selection immediately shows filtered memories
4083 | - **Impact**: ✅ Significantly improved discoverability and flow in Browse by Tags view
4084 |
4085 | ##### **Technical Details**
4086 | - **File**: `src/mcp_memory_service/web/static/style.css`
4087 | - Added dark mode override for connection status background, border, and text colors
4088 | - Uses CSS variables for consistency with theme system
4089 | - **File**: `src/mcp_memory_service/web/static/app.js`
4090 | - Added smooth scroll animation when displaying tag-filtered results
4091 | - Scrolls results section into view with `block: 'start'` positioning
4092 |
4093 | ## [8.1.2] - 2025-10-05
4094 |
4095 | ### 🐛 **Bug Fixes**
4096 |
4097 | #### **Dashboard Statistics Display**
4098 | - **Critical fix**: Dashboard showing 0 for "This Week" and "Tags" statistics on Hybrid and Cloudflare backends
4099 | - **Root cause**: Statistics fields not exposed at top level of storage health response
4100 |
4101 | ##### **Hybrid Backend Fix** (`src/mcp_memory_service/storage/hybrid.py`)
4102 | - Extract `unique_tags` from `primary_stats` to top-level stats dictionary
4103 | - Extract `memories_this_week` from `primary_stats` to top-level stats dictionary
4104 | - Maintains consistency with SQLite-vec standalone backend behavior
4105 |
4106 | ##### **Cloudflare Backend Fix** (`src/mcp_memory_service/storage/cloudflare.py`)
4107 | - Added SQL subquery to calculate `unique_tags` from tags table
4108 | - Added SQL subquery to calculate `memories_this_week` (last 7 days)
4109 | - Now returns both statistics in `get_stats()` response
4110 |
4111 | ##### **Impact**
4112 | - ✅ Dashboard now correctly displays weekly memory count for all backends
4113 | - ✅ Dashboard now correctly displays unique tags count for all backends
4114 | - ✅ SQLite-vec standalone backend already had these fields (no change needed)
4115 | - ✅ Fixes issue where hybrid/cloudflare users saw "0" despite having memories and tags
4116 |
4117 | ## [8.1.1] - 2025-10-05
4118 |
4119 | ### 🐛 **Bug Fixes**
4120 |
4121 | #### **Dark Mode Text Contrast Regression**
4122 | - **Critical fix**: Memory card text barely visible in dark mode due to hardcoded white backgrounds
4123 | - **Root cause**: CSS variable redefinition made text colors too faint when applied to white backgrounds
4124 | - **Solution**: Override all major containers with dark backgrounds (`#1f2937`) and force bright text colors
4125 |
4126 | ##### **Fixed Components**
4127 | - Memory cards: Now use dark card backgrounds with bright white text (`#f9fafb`)
4128 | - Memory metadata: Labels bright white (`#f9fafb`), values light gray (`#d1d5db`)
4129 | - Action cards: Dark backgrounds for proper contrast
4130 | - All containers: App header, welcome card, search filters, modals now properly dark
4131 |
4132 | ##### **Technical Details**
4133 | - Added `!important` overrides for 11 container backgrounds
4134 | - Memory content text: `var(--neutral-900) !important` → `#f9fafb`
4135 | - Memory meta labels: `var(--neutral-900) !important` → `#f9fafb`
4136 | - Memory meta values: `var(--neutral-600) !important` → `#d1d5db`
4137 | - Cache-busting comments to force browser reload
4138 |
4139 | ##### **Impact**
4140 | - ✅ Dark mode now fully readable across all dashboard views
4141 | - ✅ Proper contrast ratios for accessibility
4142 | - ✅ No visual regression from v8.1.0 light mode
4143 |
4144 | ## [8.1.0] - 2025-10-04
4145 |
4146 | ### ✨ **Dashboard Dark Mode & UX Enhancements**
4147 |
4148 | Production-ready dashboard improvements with comprehensive dark mode support, settings management, and optimized CSS architecture.
4149 |
4150 | #### 🎨 **New Features**
4151 |
4152 | ##### **Dark Mode Toggle**
4153 | - **Clean theme switching** with sun/moon icon toggle in header
4154 | - **Persistent preference** via localStorage - theme survives page reloads
4155 | - **Smooth transitions** between light and dark themes
4156 | - **Full coverage** across all dashboard views (Dashboard, Search, Browse)
4157 | - **Performance**: Instant theme switching with CSS class toggle
4158 |
4159 | ##### **Settings Modal**
4160 | - **Centralized preferences** accessible via cogwheel button
4161 | - **User preferences**:
4162 | - Theme selection (Light/Dark)
4163 | - View density (Comfortable/Compact)
4164 | - Memory preview lines (1-10)
4165 | - **System information display**:
4166 | - Application version
4167 | - Storage backend configuration (Hybrid/SQLite/Cloudflare)
4168 | - Primary/secondary backend details
4169 | - Embedding model and dimensions
4170 | - Database size
4171 | - Total memories count
4172 | - Server uptime (human-readable format)
4173 | - **Robust data loading**: Promise.allSettled() for graceful error handling
4174 | - **User feedback**: Toast notifications for save failures
4175 |
4176 | #### 🏗️ **Architecture & Performance**
4177 |
4178 | ##### **CSS Optimization - Variable Redefinition Approach**
4179 | - **Massive code reduction**: 2116 → 1708 lines (**-408 lines, -19% smaller**)
4180 | - **Clean implementation**: Redefine CSS variables in `body.dark-mode` instead of 200+ hardcoded overrides
4181 | - **Maintainability**: Single source of truth for dark mode colors
4182 | - **Automatic theming**: All components using CSS variables get dark mode support
4183 | - **No !important abuse**: Eliminated all !important tags except `.hidden` utility class
4184 |
4185 | ##### **JavaScript Improvements**
4186 | - **Data-driven configuration**: System info fields defined in static config object
4187 | - **Static class properties**: Constants defined once per class, not per instance
4188 | - **Robust error handling**: Promise.allSettled() prevents partial failures
4189 | - **Zero value handling**: Proper `!= null` checks (displays 0 MB, 0 memories correctly)
4190 | - **Smart field updates**: Targeted element updates using config keys
4191 |
4192 | ##### **HTML Optimization**
4193 | - **SVG icon deduplication**: Info icon defined once in `<defs>`, reused via `<use>`
4194 | - **File size reduction**: 4 inline SVG instances → 1 reusable symbol
4195 | - **Accessibility**: Proper `aria-hidden` and semantic structure
4196 | - **No inline styles**: All styling moved to CSS for better separation of concerns
4197 |
4198 | #### 📊 **Performance Metrics**
4199 |
4200 | | Component | Target | Actual | Status |
4201 | |-----------|--------|--------|--------|
4202 | | Page Load | <2s | 25ms | ✅ EXCELLENT |
4203 | | Memory Operations | <1s | 26ms | ✅ EXCELLENT |
4204 | | Tag Search | <500ms | <100ms | ✅ EXCELLENT |
4205 | | Theme Toggle | Instant | <1ms | ✅ EXCELLENT |
4206 | | CSS File Size | Smaller | -19% | ✅ EXCELLENT |
4207 |
4208 | #### 🔍 **Code Quality**
4209 |
4210 | ##### **Gemini Code Assist Review**
4211 | - **8 review iterations** - All feedback addressed
4212 | - **Final verdict**: "Solid enhancement to the dashboard's user experience"
4213 | - **Key improvements**:
4214 | - Variable redefinition pattern for dark mode
4215 | - Removed redundant arrays (derive from Object.keys)
4216 | - SVG icon deduplication
4217 | - Better error messages for users
4218 | - Static method optimization
4219 |
4220 | ##### **Files Changed**
4221 | - `src/mcp_memory_service/web/static/style.css`: -408 lines (major refactoring)
4222 | - `src/mcp_memory_service/web/static/app.js`: +255 lines (settings, theme management)
4223 | - `src/mcp_memory_service/web/static/index.html`: +134 lines (modal, icons, SVG defs)
4224 | - **Net change**: -19 lines (improved functionality with less code)
4225 |
4226 | #### 🎯 **User Experience**
4227 |
4228 | - **Visual comfort**: Dark mode reduces eye strain for long sessions
4229 | - **Personalization**: User-controlled theme and display preferences
4230 | - **Transparency**: System information visible in settings modal
4231 | - **Feedback**: Error notifications for localStorage failures
4232 | - **Consistency**: Dark mode styling matches across all views
4233 | - **Accessibility**: High contrast, semantic HTML, keyboard navigation
4234 |
4235 | #### 📝 **Technical Details**
4236 |
4237 | - **Conservative approach**: Original light mode design preserved pixel-perfect
4238 | - **Additive CSS**: Dark mode styles never modify existing rules
4239 | - **Browser compatibility**: CSS variables, localStorage, SSE all widely supported
4240 | - **Mobile responsive**: Works on all screen sizes (tested 768px, 1024px breakpoints)
4241 | - **XSS protection**: All user inputs properly escaped via `escapeHtml()`
4242 |
4243 | **PR**: #150 (16 commits, 543 additions, 23 deletions)
4244 |
4245 | ---
4246 |
4247 | ## [8.0.0] - 2025-10-04
4248 |
4249 | ### 💥 **BREAKING CHANGE: ChromaDB Backend Removed**
4250 |
4251 | **This is a major breaking change release**. The ChromaDB backend has been completely removed from the codebase after being deprecated since v5.x.
4252 |
4253 | #### ❌ **Removed**
4254 |
4255 | ##### **ChromaDB Backend Complete Removal**
4256 | - **Deleted 2,841 lines** of ChromaDB-related code from the codebase
4257 | - **Core files removed**:
4258 | - `src/mcp_memory_service/storage/chroma.py` (1,501 lines)
4259 | - `src/mcp_memory_service/storage/chroma_enhanced.py` (176 lines)
4260 | - `tests/unit/test_chroma.py`
4261 | - `tests/chromadb/test_chromadb_types.py`
4262 | - **Dependencies removed**:
4263 | - `chromadb` optional dependency group from `pyproject.toml`
4264 | - ~2GB PyTorch + sentence-transformers dependency burden eliminated
4265 | - **Factory updates**:
4266 | - Removed ChromaDB backend case from storage factory
4267 | - Removed ChromaStorage initialization logic
4268 | - Added clear error messages directing to migration guide
4269 |
4270 | #### 📦 **Migration & Legacy Support**
4271 |
4272 | ##### **ChromaDB Legacy Branch**
4273 | - **Branch**: [`chromadb-legacy`](https://github.com/doobidoo/mcp-memory-service/tree/chromadb-legacy)
4274 | - **Tag**: `chromadb-legacy-final` - Final ChromaDB code snapshot before removal
4275 | - **Status**: Frozen/Archived - No active maintenance
4276 | - **Purpose**: Historical reference and migration support
4277 |
4278 | ##### **Migration Script Preserved**
4279 | - **Location**: `scripts/migration/legacy/migrate_chroma_to_sqlite.py`
4280 | - **Status**: Moved to legacy folder, still functional for migrations
4281 | - **Alternative**: Check chromadb-legacy branch for additional migration tools
4282 |
4283 | ##### **Migration Guide**
4284 | See **Issue #148** for comprehensive ChromaDB to Hybrid/SQLite-vec/Cloudflare migration instructions:
4285 | - Step-by-step migration procedures
4286 | - Data backup and validation steps
4287 | - Recommended migration path: **ChromaDB → Hybrid Backend**
4288 |
4289 | #### ✅ **Supported Storage Backends (v8.0.0+)**
4290 |
4291 | | Backend | Status | Use Case | Performance |
4292 | |---------|--------|----------|-------------|
4293 | | **Hybrid** | ⭐ RECOMMENDED | Production, multi-device | 5ms (SQLite) + cloud sync |
4294 | | **SQLite-vec** | ✅ Supported | Development, single-device | 5ms read/write |
4295 | | **Cloudflare** | ✅ Supported | Cloud-native, serverless | Network dependent |
4296 | | **HTTP Client** | ✅ Supported | Distributed, multi-client | Network dependent |
4297 | | **ChromaDB** | ❌ REMOVED | N/A - See legacy branch | N/A |
4298 |
4299 | #### 📊 **Impact & Rationale**
4300 |
4301 | **Why Remove ChromaDB?**
4302 | - **Performance**: ChromaDB 15ms vs SQLite-vec 5ms (3x slower)
4303 | - **Dependencies**: ~2GB PyTorch download eliminated
4304 | - **Maintenance**: 2,841 lines of code removed reduces complexity
4305 | - **Better Alternatives**: Hybrid backend provides superior performance with cloud sync
4306 |
4307 | **For Existing ChromaDB Users:**
4308 | - **No immediate action required** - Can continue using v7.x releases
4309 | - **Upgrade path available** - Migration guide in Issue #148
4310 | - **Legacy branch available** - Full code preserved for reference
4311 | - **Support timeline**: v7.x will remain available, but no new features
4312 |
4313 | #### 🔧 **Technical Changes**
4314 |
4315 | **Code Removed:**
4316 | - ChromaDB storage backend implementations
4317 | - ChromaDB-specific tests and fixtures
4318 | - ChromaDB configuration handling in factory
4319 | - ChromaDB deprecation warnings in server.py
4320 |
4321 | **Error Handling:**
4322 | - Attempting to use `MCP_MEMORY_STORAGE_BACKEND=chroma` now raises clear `ValueError`
4323 | - Error message includes link to migration guide and legacy branch
4324 | - Fallback logic removed - only valid backends accepted
4325 |
4326 | **Dependencies:**
4327 | - Removed `chromadb>=0.5.0` from optional dependencies
4328 | - Updated `full` dependency group to exclude chromadb
4329 | - No impact on core dependencies - only optional dependency cleanup
4330 |
4331 | #### 🚀 **Upgrade Instructions**
4332 |
4333 | **For ChromaDB Users (REQUIRED MIGRATION):**
4334 | 1. **Backup your data**:
4335 | ```bash
4336 | # Use legacy migration script
4337 | git checkout chromadb-legacy
4338 | python scripts/migration/migrate_chroma_to_sqlite.py
4339 | ```
4340 |
4341 | 2. **Switch backend**:
4342 | ```bash
4343 | # Recommended: Hybrid backend (best of both worlds)
4344 | export MCP_MEMORY_STORAGE_BACKEND=hybrid
4345 |
4346 | # Or: SQLite-vec (local-only)
4347 | export MCP_MEMORY_STORAGE_BACKEND=sqlite_vec
4348 |
4349 | # Or: Cloudflare (cloud-only)
4350 | export MCP_MEMORY_STORAGE_BACKEND=cloudflare
4351 | ```
4352 |
4353 | 3. **Update to v8.0.0**:
4354 | ```bash
4355 | git checkout main
4356 | git pull origin main
4357 | python install.py --storage-backend hybrid
4358 | ```
4359 |
4360 | 4. **Validate migration**:
4361 | ```bash
4362 | python scripts/validation/validate_configuration_complete.py
4363 | ```
4364 |
4365 | **For Non-ChromaDB Users (No Action Required):**
4366 | - Upgrade seamlessly - no breaking changes for SQLite-vec, Cloudflare, or Hybrid users
4367 | - Enjoy reduced dependency footprint and simplified codebase
4368 |
4369 | #### 📚 **Documentation Updates**
4370 | - Updated architecture diagrams to show ChromaDB as deprecated/removed
4371 | - Updated storage backend comparison tables
4372 | - Added migration guide in Issue #148
4373 | - Legacy branch README updated with archive notice
4374 |
4375 | #### 🔗 **References**
4376 | - **Issue**: #148 - Plan ChromaDB Backend Deprecation and Removal (→ v8.0.0)
4377 | - **Legacy Branch**: https://github.com/doobidoo/mcp-memory-service/tree/chromadb-legacy
4378 | - **Migration Guide**: See Issue #148 for detailed migration instructions
4379 |
4380 | ---
4381 |
4382 | ## Historic Releases
4383 |
4384 | For older releases (v7.21.0 and earlier), see [CHANGELOG-HISTORIC.md](./CHANGELOG-HISTORIC.md).
4385 |
4386 | **Historic Version Range**: v0.1.0 through v7.21.0 (2025-07-XX through 2025-10-03)
4387 | ## [7.6.0] - 2025-10-04
4388 |
4389 | ### ✨ **Enhanced Document Ingestion with Semtools Support**
4390 |
4391 | #### 🆕 **Core Features**
4392 | - **Semtools loader integration** - Optional Rust-based document parser with LlamaParse API for superior extraction quality
4393 | - **New format support** - DOCX, DOC, PPTX, XLSX (requires semtools installation)
4394 | - **Intelligent chunking** - Respects paragraph and sentence boundaries for better semantic coherence
4395 | - **Graceful fallback** - Auto-detects semtools availability, uses native parsers (PyPDF2/pdfplumber) if unavailable
4396 | - **Configuration options** - Environment variables for LLAMAPARSE_API_KEY, MCP_DOCUMENT_CHUNK_SIZE, MCP_DOCUMENT_CHUNK_OVERLAP
4397 | - **Zero breaking changes** - Fully backward compatible, existing document ingestion unchanged
4398 |
4399 | #### 📄 **Supported Document Formats**
4400 | | Format | Native Parser | With Semtools | Quality |
4401 | |--------|--------------|---------------|---------|
4402 | | PDF | PyPDF2/pdfplumber | ✅ LlamaParse | Excellent (OCR, tables) |
4403 | | DOCX/DOC | ❌ Not supported | ✅ LlamaParse | Excellent |
4404 | | PPTX | ❌ Not supported | ✅ LlamaParse | Excellent |
4405 | | XLSX | ❌ Not supported | ✅ LlamaParse | Excellent |
4406 | | TXT/MD | ✅ Built-in | N/A | Perfect |
4407 |
4408 | #### 🔧 **Technical Implementation**
4409 | - **New file**: `src/mcp_memory_service/ingestion/semtools_loader.py` (220 lines)
4410 | - SemtoolsLoader class implementing DocumentLoader interface
4411 | - Async subprocess execution with 5-minute timeout for large documents
4412 | - Automatic semtools availability detection via `shutil.which()`
4413 | - LlamaParse API key support via LLAMAPARSE_API_KEY environment variable
4414 | - Comprehensive error handling with detailed logging
4415 | - **Modified**: `src/mcp_memory_service/config.py` - Added document processing configuration section (lines 564-586)
4416 | - **Modified**: `src/mcp_memory_service/ingestion/registry.py` - Registered new formats (DOCX, PPTX, XLSX)
4417 | - **Modified**: `src/mcp_memory_service/ingestion/__init__.py` - Auto-registration of semtools loader
4418 | - **Modified**: `CLAUDE.md` - Added comprehensive "Document Ingestion (v7.6.0+)" section with usage examples
4419 | - **Tests**: `tests/unit/test_semtools_loader.py` - 12 comprehensive unit tests, all passing ✅
4420 |
4421 | #### 📦 **Installation & Configuration**
4422 | ```bash
4423 | # Optional - install semtools for enhanced parsing
4424 | npm i -g @llamaindex/semtools
4425 | # or
4426 | cargo install semtools
4427 |
4428 | # Optional - configure LlamaParse API for best quality
4429 | export LLAMAPARSE_API_KEY="llx-..."
4430 |
4431 | # Document chunking configuration
4432 | export MCP_DOCUMENT_CHUNK_SIZE=1000 # Characters per chunk (default: 1000)
4433 | export MCP_DOCUMENT_CHUNK_OVERLAP=200 # Overlap between chunks (default: 200)
4434 | ```
4435 |
4436 | #### 🎯 **Usage Example**
4437 | ```python
4438 | from pathlib import Path
4439 | from mcp_memory_service.ingestion import get_loader_for_file
4440 |
4441 | # Automatic format detection and loader selection
4442 | loader = get_loader_for_file(Path("document.pdf"))
4443 | async for chunk in loader.extract_chunks(Path("document.pdf")):
4444 | await store_memory(chunk.content, tags=["documentation"])
4445 | ```
4446 |
4447 | #### ✅ **Benefits**
4448 | - **Superior PDF parsing** - OCR capabilities and table extraction via LlamaParse
4449 | - **Microsoft Office support** - DOCX, PPTX formats now supported (previously unavailable)
4450 | - **Production-ready** - Comprehensive error handling, timeout protection, detailed logging
4451 | - **Flexible deployment** - Optional enhancement, works perfectly without semtools
4452 | - **Automatic detection** - No configuration needed, auto-selects best available parser
4453 | - **Minimal overhead** - Only ~5ms initialization cost when semtools not installed
4454 |
4455 | #### 🔗 **Related Issues**
4456 | - Closes #94 - Integrate Semtools for Enhanced Document Processing
4457 | - Future work tracked in #147 - CLI commands, batch processing, progress reporting, benchmarks
4458 |
4459 | #### 📊 **Test Coverage**
4460 | - 12/12 unit tests passing
4461 | - Tests cover: initialization, availability checking, file handling, successful extraction, API key usage, error scenarios, timeout handling, empty content, registry integration
4462 | - Comprehensive mocking of subprocess execution for reliable CI/CD
4463 |
4464 | ## [7.5.5] - 2025-10-04
4465 |
4466 | ### 🐛 **Bug Fixes - HybridMemoryStorage Critical Issues**
4467 |
4468 | #### Fixed - Health Check Support (PR #145)
4469 | - **HybridMemoryStorage recognition in health checks** - Resolved "Unknown storage type: HybridMemoryStorage" error
4470 | - **Dashboard statistics for hybrid backend** - Added comprehensive stats collection from SQLite-vec primary storage
4471 | - **Health validation for hybrid storage** - Implemented proper validation logic for hybrid backend
4472 | - **Cloudflare sync status visibility** - Display sync service status (not_configured/configured/syncing)
4473 |
4474 | #### Fixed - Missing recall() Method (PR #146)
4475 | - **AttributeError on time-based queries** - Added missing `recall()` method to HybridMemoryStorage
4476 | - **Server.py compatibility** - Resolves errors when server calls `storage.recall()` with time filtering
4477 | - **Consistent API** - Matches method signature of SqliteVecMemoryStorage and CloudflareStorage
4478 | - **Delegation to primary** - Properly delegates to SQLite-vec primary storage for recall operations
4479 |
4480 | #### Technical Details
4481 | - Added `HybridMemoryStorage` case to `dashboard_get_stats()` endpoint (server.py:2503)
4482 | - Added `HybridMemoryStorage` case to `check_database_health()` endpoint (server.py:3705)
4483 | - Added `recall()` method to HybridMemoryStorage (hybrid.py:916)
4484 | - Method signature: `async def recall(query: Optional[str] = None, n_results: int = 5, start_timestamp: Optional[float] = None, end_timestamp: Optional[float] = None) -> List[MemoryQueryResult]`
4485 | - Query primary storage (SQLite-vec) for memory counts, tags, database info
4486 | - Fixed code quality issues from Gemini Code Assist review (removed duplicate imports, refactored getattr usage)
4487 |
4488 | #### Impact
4489 | - ✅ HTTP dashboard now properly displays hybrid backend statistics
4490 | - ✅ MCP health check tool correctly validates hybrid storage
4491 | - ✅ Time-based recall queries now work correctly with hybrid backend
4492 | - ✅ No more "Unknown storage type" or AttributeError exceptions
4493 | - ✅ HybridMemoryStorage fully compatible with all server.py operations
4494 |
4495 | ## [7.5.4] - 2025-10-04
4496 |
4497 | ### ✨ **Configurable Hybrid Sync Break Conditions**
4498 |
4499 | #### 🔄 **Enhanced Synchronization Control**
4500 | - **Configurable early break conditions** - Made hybrid sync termination thresholds configurable via environment variables
4501 | - `MCP_HYBRID_MAX_EMPTY_BATCHES` - Stop after N consecutive batches without new syncs (default: 20, was hardcoded 5)
4502 | - `MCP_HYBRID_MIN_CHECK_COUNT` - Minimum memories to check before early stop (default: 1000, was hardcoded 200)
4503 | - **Increased default thresholds** - Quadrupled default values (5→20 batches, 200→1000 memories) to ensure complete synchronization
4504 | - **Enhanced logging** - Added detailed sync progress logging every 100 memories with consecutive empty batch tracking
4505 | - **Threshold visibility** - Break condition log messages now display threshold values for better diagnostics
4506 |
4507 | #### 🐛 **Bug Fix - Incomplete Synchronization**
4508 | - **Resolved incomplete sync issue** - Dashboard was showing only 1040 memories instead of 1200+ from Cloudflare
4509 | - **Root cause** - Hardcoded early break conditions triggered prematurely causing missing memories
4510 | - **Impact** - Missing memories distributed throughout Cloudflare dataset were never synced to local SQLite
4511 |
4512 | #### ⚙️ **Configuration**
4513 | ```bash
4514 | # Environment variables for tuning sync behavior
4515 | export MCP_HYBRID_MAX_EMPTY_BATCHES=20 # Stop after N empty batches (min: 1)
4516 | export MCP_HYBRID_MIN_CHECK_COUNT=1000 # Min memories to check before early stop (min: 1)
4517 | ```
4518 |
4519 | #### 🔧 **Code Quality Improvements**
4520 | - **Added input validation** - `min_value=1` constraint prevents zero values that would break sync
4521 | - **Fixed progress logging** - Prevents misleading initial log message at `processed_count=0`
4522 | - **Eliminated duplicate defaults** - Refactored to use `getattr` pattern for config imports
4523 | - **Improved maintainability** - Centralized default values in config.py
4524 |
4525 | #### ✅ **Benefits**
4526 | - Complete synchronization of all Cloudflare memories to SQLite
4527 | - Configurable per deployment needs without code changes
4528 | - Better diagnostics for troubleshooting sync issues
4529 | - Maintains protection against infinite loops (early break still active)
4530 | - Preserves Cloudflare API protection through configurable limits
4531 | - No behavior change for deployments with small datasets
4532 |
4533 | #### 🔗 **References**
4534 | - Closes issue: Incomplete hybrid sync (1040/1200+ memories)
4535 | - PR #142: Configurable hybrid sync break conditions
4536 | - All Gemini Code Assist feedback addressed
4537 |
4538 | ## [7.5.3] - 2025-10-04
4539 |
4540 | ### 🏗️ **Repository Organization**
4541 |
4542 | #### 📁 **Litestream Sync System Reorganization**
4543 | - **Consolidated Litestream scripts** → `scripts/sync/litestream/`
4544 | - Moved 9 shell scripts from `/sync/` directory (git-like staging workflow)
4545 | - Relocated 4 root-level setup scripts (`enhanced_memory_store.sh`, `setup_local_litestream.sh`, etc.)
4546 | - Moved macOS launchd service (`io.litestream.replication.plist`)
4547 | - Moved staging database schema (`staging_db_init.sql`)
4548 | - **Created comprehensive documentation** - `scripts/sync/litestream/README.md`
4549 | - Local network HTTP API sync architecture
4550 | - Git-like staging workflow guide
4551 | - Setup and configuration instructions
4552 | - Comparison with Cloudflare hybrid sync
4553 |
4554 | #### 📂 **Deployment Files Consolidation**
4555 | - **Moved systemd service** → `scripts/service/mcp-memory.service`
4556 | - **Archived unused configs** → `archive/deployment-configs/`
4557 | - `smithery.yaml`
4558 | - `empty_config.yml`
4559 | - **Removed empty `/deployment/` directory**
4560 |
4561 | #### 🛠️ **Debug/Investigation Files Organization**
4562 | - **Moved to `scripts/development/`**:
4563 | - `debug_server_initialization.py` - Cloudflare backend debugger
4564 | - `verify_hybrid_sync.py` - Hybrid storage verification
4565 | - **Archived documentation** → `archive/`
4566 | - `MACOS_HOOKS_INVESTIGATION.md` → `archive/investigations/`
4567 | - `release-notes-v7.1.4.md` → `archive/release-notes/`
4568 |
4569 | #### 📚 **Documentation Updates**
4570 | - **Enhanced `scripts/README.md`** with dual sync system documentation
4571 | - Cloudflare Hybrid Sync (cloud backend) section
4572 | - Litestream Sync (local network HTTP API) section
4573 | - Clear distinction between the two systems
4574 |
4575 | ### 🎯 **Key Clarifications**
4576 | - **Litestream sync**: Multi-device synchronization via central SQLite-vec HTTP API (local network)
4577 | - Use case: Privacy-focused, data stays on local network
4578 | - Architecture: Git-like staging workflow with conflict detection
4579 | - **Cloudflare sync**: Cloud-based hybrid backend (internet)
4580 | - Use case: Global access, automatic cloud backup
4581 | - Architecture: Direct sync queue with background operations
4582 |
4583 | ### 📦 **Files Affected**
4584 | - 27 files changed, 594 insertions(+), 3 deletions(-)
4585 | - 13 files renamed/relocated
4586 | - 3 new documentation files
4587 | - 3 new archive directories
4588 |
4589 | ### ⚠️ **Breaking Changes**
4590 | None - Purely organizational changes with no functional impact
4591 |
4592 | ### 🔄 **Migration Notes**
4593 | If using Litestream sync scripts:
4594 | - Update script paths: `/sync/memory_sync.sh` → `scripts/sync/litestream/memory_sync.sh`
4595 | - Launchd plist location: `/deployment/io.litestream.replication.plist` → `scripts/sync/litestream/io.litestream.replication.plist`
4596 | - All scripts remain functionally identical
4597 |
4598 | ## [7.5.2] - 2025-10-03
4599 |
4600 | ### 🐛 **Bug Fixes**
4601 |
4602 | #### 🔧 **MCP HTTP Endpoint Fixes**
4603 | - **Fixed JSON serialization** - Changed `str(result)` to `json.dumps(result)` for proper client parsing
4604 | - MCP endpoint was returning Python dict string representation (`{'key': 'value'}`) instead of valid JSON (`{"key": "value"}`)
4605 | - Caused hook clients to fail parsing responses with "Expected ',' or '}'" errors
4606 | - **Fixed similarity threshold** - Changed default from `0.7` to `0.0` to return all relevant memories
4607 | - 70% similarity threshold was too restrictive, filtering out memories with scores 0.2-0.5
4608 | - Now returns all results, allowing client-side scoring to determine relevance
4609 |
4610 | #### 🔌 **Memory Hooks HTTP/HTTPS Protocol Detection**
4611 | - **Fixed protocol detection** in `claude-hooks/utilities/memory-client.js`
4612 | - Added `http` module import alongside existing `https` module
4613 | - Implemented dynamic protocol selection: `const protocol = url.protocol === 'https:' ? https : http`
4614 | - Previously hardcoded `https.request()` failed for `http://` endpoints
4615 |
4616 | ### 🎯 **Impact**
4617 | - ✅ Session-start hooks now properly inject memory context on Claude Code startup
4618 | - ✅ HTTP memory server (port 8888) connectivity fully restored
4619 | - ✅ Relevant memories (score 0.2-0.5) no longer filtered out by overly restrictive threshold
4620 | - ✅ JSON parsing errors resolved for all memory retrieval operations
4621 |
4622 | ## [7.5.1] - 2025-10-03
4623 |
4624 | ### 🛠️ **Linux Enhancements**
4625 |
4626 | #### 🔄 **Manual Sync Utilities for Hybrid Storage**
4627 | - **`sync_now.py` script** - Manual on-demand synchronization for hybrid storage on Linux
4628 | - Type-safe data structures with `TypedDict` (SyncResult, SyncStatus)
4629 | - Comprehensive logging with configurable levels
4630 | - Verbose mode (`--verbose`) for detailed error tracebacks
4631 | - Robust status validation prevents misleading success reports
4632 | - Proper error handling with specific exception types
4633 | - **Systemd integration** - Automated hourly background synchronization
4634 | - `mcp-memory-sync.service` - Systemd service for executing sync operations
4635 | - `mcp-memory-sync.timer` - Systemd timer triggering hourly syncs (5min after boot, persistent across reboots)
4636 | - **Security improvement** - API key moved to separate environment file in systemd service template
4637 |
4638 | ### 🔧 **Code Quality**
4639 | - Enhanced error handling throughout sync utilities
4640 | - Improved type safety with typed dictionaries for API results
4641 | - Better logging practices using `logger.exception()` for verbose errors
4642 | - Modular import structure following Python best practices
4643 |
4644 | ## [7.5.0] - 2025-10-03
4645 |
4646 | ### ✨ **New Features**
4647 |
4648 | #### 🎯 **Backend-Specific Content Length Limits with Auto-Splitting**
4649 | - **Intelligent content length management** - Prevents embedding failures by enforcing backend-specific limits
4650 | - **Automatic content splitting** - Long content automatically splits into linked chunks with preserved context
4651 | - **Backend-aware limits**:
4652 | - Cloudflare: 800 characters (BGE-base-en-v1.5 model 512 token limit)
4653 | - ChromaDB: 1500 characters (all-MiniLM-L6-v2 model 384 token limit)
4654 | - SQLite-vec: Unlimited (local storage)
4655 | - Hybrid: 800 characters (constrained by Cloudflare secondary storage)
4656 | - **Smart boundary preservation** - Splits respect natural boundaries (paragraphs → sentences → words)
4657 | - **Context preservation** - 50-character overlap between chunks maintains semantic continuity
4658 | - **LLM-friendly tool descriptions** - MCP tool docstrings inform LLMs about limits upfront
4659 |
4660 | ### 🔧 **Infrastructure Enhancements**
4661 |
4662 | #### 📦 **New Content Splitter Utility**
4663 | - **`content_splitter.py` module** - Comprehensive content chunking with boundary-aware splitting
4664 | - **Priority-based split points**:
4665 | 1. Double newlines (paragraph breaks)
4666 | 2. Single newlines
4667 | 3. Sentence endings (. ! ? followed by space)
4668 | 4. Spaces (word boundaries)
4669 | 5. Character position (last resort)
4670 | - **Configurable overlap** - Default 50 chars, customizable via `MCP_CONTENT_SPLIT_OVERLAP`
4671 | - **Validation helpers** - `estimate_chunks_needed()`, `validate_chunk_lengths()` utilities
4672 |
4673 | #### 🏗️ **Storage Backend Updates**
4674 | - **Abstract base class properties** - Added `max_content_length` and `supports_chunking` to `MemoryStorage`
4675 | - **Backend implementations**:
4676 | - `CloudflareStorage`: 800 char limit, chunking supported
4677 | - `ChromaMemoryStorage`: 1500 char limit, chunking supported
4678 | - `SqliteVecMemoryStorage`: No limit (None), chunking supported
4679 | - `HybridMemoryStorage`: 800 char limit (follows Cloudflare), chunking supported
4680 |
4681 | #### ⚙️ **Configuration System**
4682 | - **New config constants** in `config.py`:
4683 | - `CLOUDFLARE_MAX_CONTENT_LENGTH` (default: 800)
4684 | - `CHROMADB_MAX_CONTENT_LENGTH` (default: 1500)
4685 | - `SQLITEVEC_MAX_CONTENT_LENGTH` (default: None/unlimited)
4686 | - `HYBRID_MAX_CONTENT_LENGTH` (default: 800)
4687 | - `ENABLE_AUTO_SPLIT` (default: True)
4688 | - `CONTENT_SPLIT_OVERLAP` (default: 50)
4689 | - `CONTENT_PRESERVE_BOUNDARIES` (default: True)
4690 | - **Environment variable support** - All limits configurable via environment variables
4691 | - **Validation and logging** - Safe parsing with min/max bounds and startup logging
4692 |
4693 | ### 🛠️ **MCP Server Tool Enhancements**
4694 |
4695 | #### 💾 **Enhanced `store_memory` Tool**
4696 | - **Automatic content splitting** - Transparently handles content exceeding backend limits
4697 | - **Chunk metadata tracking**:
4698 | - `is_chunk`: Boolean flag identifying chunked memories
4699 | - `chunk_index`: Current chunk number (1-based)
4700 | - `total_chunks`: Total number of chunks
4701 | - `original_length`: Original content length before splitting
4702 | - **Chunk tags** - Automatic `chunk:N/M` tags for easy retrieval
4703 | - **Enhanced return values**:
4704 | - Single memory: `content_hash`
4705 | - Split content: `chunks_created`, `chunk_hashes` array
4706 | - **Updated docstring** - Clear backend limits documentation visible to LLMs
4707 |
4708 | ### 🧪 **Testing & Validation**
4709 |
4710 | #### ✅ **Comprehensive Test Suite**
4711 | - **`test_content_splitting.py`** - 20+ test cases covering:
4712 | - Basic splitting functionality (short/long content, empty strings)
4713 | - Boundary preservation (paragraphs, sentences, words, code blocks)
4714 | - Overlap validation and chunk estimation
4715 | - Backend limit verification (all 4 backends)
4716 | - Configuration constant validation
4717 | - **Edge case coverage** - Empty content, exact lengths, overlaps
4718 | - **Integration testing** - Ready for all storage backends
4719 |
4720 | ### 📝 **Technical Implementation Details**
4721 |
4722 | #### 🔍 **Design Decisions**
4723 | - **Conservative limits** - Buffer below actual token limits to account for tokenization variance
4724 | - **Cloudflare priority** - Hybrid backend follows Cloudflare's stricter limit for sync compatibility
4725 | - **Opt-out capable** - Set `MCP_ENABLE_AUTO_SPLIT=false` to disable auto-splitting
4726 | - **Backward compatible** - No breaking changes to existing functionality
4727 |
4728 | #### ⚡ **Performance Considerations**
4729 | - **Minimal overhead** - Content length checks are O(1) property access
4730 | - **Efficient chunking** - Single-pass splitting with smart boundary detection
4731 | - **No unnecessary splitting** - Content within limits passes through unchanged
4732 | - **Batch operations** - All chunks stored in single transaction when possible
4733 |
4734 | ### 🔗 **References**
4735 | - Addresses issue: First memory store attempt (1,570 chars) exceeded Cloudflare's BGE model limit
4736 | - Solution: Backend-specific limits with automatic intelligent content splitting
4737 | - Feature branch: `feat/content-length-limits-with-splitting`
4738 |
4739 | ## [7.4.1] - 2025-10-03
4740 |
4741 | ### 🐛 **Bug Fixes**
4742 |
4743 | #### 🧪 **Claude Hooks Integration Tests**
4744 | - **Fixed dual-protocol config compatibility** - Tests now support both legacy (direct endpoint) and new (dual-protocol) configuration structures
4745 | - **Improved CI/CD compatibility** - Tests gracefully handle scenarios when memory service is not running
4746 | - **Enhanced error handling** - Better detection and handling of connection failures and missing dependencies
4747 | - **Achieved 100% test pass rate** - Improved from 78.6% to 100% success rate across all 14 integration tests
4748 |
4749 | ### 🔧 **Technical Improvements**
4750 | - Updated configuration loading test to detect both `config.memoryService.endpoint` and `config.memoryService.http.endpoint`
4751 | - Enhanced connectivity test to treat service unavailability as expected behavior in test environments
4752 | - Improved mock session start hook to handle `memoryClient` reference errors gracefully
4753 |
4754 | ## [7.4.0] - 2025-10-03
4755 |
4756 | ### ✨ **Enhanced Search Tab UX**
4757 |
4758 | #### 🔍 **Advanced Search Functionality**
4759 | - **Enhanced date filter options** - Added "Yesterday" and "This quarter" options to improve time-based search granularity
4760 | - **Live search mode with toggle** - Implemented intelligent live/manual search modes with debounced input (300ms) to prevent API overload
4761 | - **Independent semantic search** - Semantic search now works independently from tag filtering for more flexible query combinations
4762 | - **Improved filter behavior** - Fixed confusing filter interactions and enhanced user experience with clear mode indicators
4763 |
4764 | #### 🎨 **UI/UX Improvements**
4765 | - **Resolved toggle visibility issues** - Fixed Live Search toggle contrast and visibility problems on white backgrounds
4766 | - **Eliminated layout shifts** - Moved toggle to header to prevent dynamic position changes due to text length variations
4767 | - **Enhanced tooltips** - Increased tooltip widths (desktop: 300px, mobile: 250px) for better readability
4768 | - **Accessible design patterns** - Implemented standard toggle design with proper contrast ratios and always-visible controls
4769 |
4770 | #### ⚡ **Performance Optimization**
4771 | - **Debounced search input** - 300ms delay prevents overwhelming API with rapid keystrokes during tag searches
4772 | - **Smart search triggering** - Live search mode provides immediate results while manual mode offers user control
4773 | - **Efficient event handling** - Optimized DOM manipulation and event listener management
4774 |
4775 | ### 🔧 **Code Quality Enhancement**
4776 |
4777 | #### 📚 **DRY Principles Implementation**
4778 | - **Eliminated code duplication** - Refactored diagnostic script `test_cloudflare_token()` function following Gemini Code Assist feedback
4779 | - **Extracted reusable helper** - Created `_verify_token_endpoint()` function reducing ~60 lines of duplicated token verification logic
4780 | - **Enhanced consistency** - Both account-scoped and user endpoint tests now display identical token information fields
4781 | - **Improved maintainability** - Centralized error handling and output formatting for easier future extensions
4782 |
4783 | ### 🔗 **References**
4784 | - Addresses user feedback on search tab UX requiring "further attention" with comprehensive improvements
4785 | - Implements Gemini Code Assist code review recommendations from PR #139
4786 | - Enhances overall dashboard usability with systematic testing of filter combinations
4787 |
4788 | ## [7.3.2] - 2025-10-03
4789 |
4790 | ### 🐛 **Critical Bug Fixes**
4791 |
4792 | #### 🔧 **HybridMemoryStorage Import Missing**
4793 | - **Fixed critical import error** - Added missing `HybridMemoryStorage` import in `storage/__init__.py` after v7.3.0 update
4794 | - **Symptom resolved** - "Unknown storage type: HybridMemoryStorage" error no longer occurs
4795 | - **Health check restored** - HTTP dashboard now properly displays hybrid backend status
4796 | - **Backwards compatibility** - Import follows same conditional pattern as other storage backends
4797 |
4798 | #### 🛡️ **Enhanced Cloudflare Token Authentication**
4799 | - **Resolved token endpoint confusion** - Clear guidance on using account-scoped vs generic verification endpoints
4800 | - **Documentation improvements** - Comprehensive `.env.example` with correct curl examples and warnings
4801 | - **Enhanced diagnostics** - `diagnose_backend_config.py` now tests both token verification endpoints
4802 | - **Developer experience** - New troubleshooting guide prevents common authentication mistakes
4803 |
4804 | ### 📚 **Documentation Enhancements**
4805 |
4806 | #### 🔍 **Comprehensive Troubleshooting Guide**
4807 | - **New guide:** `docs/troubleshooting/cloudflare-authentication.md` with complete Cloudflare setup guidance
4808 | - **Token verification clarity** - Explains difference between account-scoped and generic API endpoints
4809 | - **Common errors documented** - Solutions for "Invalid API Token" and related authentication failures
4810 | - **Step-by-step checklist** - Systematic approach to diagnosing token and authentication issues
4811 |
4812 | #### ⚙️ **Enhanced Configuration Examples**
4813 | - **Improved .env.example** - Combines comprehensive v7.3.1 configuration with token verification guidance
4814 | - **Clear warnings** - Explicit guidance on which endpoints to use and avoid
4815 | - **Security best practices** - Token handling and verification recommendations
4816 |
4817 | ### 🔗 **References**
4818 | - Closes critical post-v7.3.0 hybrid storage import issue
4819 | - Addresses developer confusion around Cloudflare token verification endpoints
4820 | - PR #139: Fix HybridMemoryStorage import + Add comprehensive Cloudflare token verification guide
4821 |
4822 | ## [7.3.1] - 2025-10-03
4823 |
4824 | ### 🐛 **Bug Fixes**
4825 |
4826 | #### 🔧 **HTTP Dashboard Backend Selection**
4827 | - **Fixed HTTP dashboard backend selection** - Dashboard now properly respects `MCP_MEMORY_STORAGE_BACKEND` configuration
4828 | - **Universal backend support** - Web interface works with all backends: SQLite-vec, Cloudflare, ChromaDB, and Hybrid
4829 | - **Tags functionality restored** - Fixed broken browse by tags feature for all storage backends
4830 | - **Shared factory pattern** - Eliminated code duplication between MCP server and web interface initialization
4831 |
4832 | #### 🛠️ **Code Quality Improvements**
4833 | - **Extracted fallback logic** - Centralized SQLite-vec fallback handling for better maintainability
4834 | - **Enhanced type safety** - Improved type hints throughout web interface components
4835 | - **Gemini Code Assistant feedback** - Addressed all code review suggestions for better robustness
4836 |
4837 | ### 🔗 **References**
4838 | - Closes #136: HTTP Dashboard doesn't use Cloudflare backend despite configuration
4839 | - PR #138: Complete universal storage backend support for HTTP dashboard
4840 |
4841 | ## [7.3.0] - 2025-10-02
4842 |
4843 | ### 🎉 **API Documentation Restoration**
4844 |
4845 | **Successfully restored comprehensive API documentation with interactive dashboard integration following PR #121.**
4846 |
4847 | ### ✅ **Key Features**
4848 |
4849 | #### 🔍 **Dual Interface Solution**
4850 | - **Dedicated `/api-overview` route** - Standalone comprehensive API documentation page
4851 | - **API Documentation tab** - Integrated dashboard tab for seamless user experience
4852 | - **Unified navigation** - Consistent access to API information across both interfaces
4853 |
4854 | #### ⚡ **Dynamic Content Loading**
4855 | - **Real-time version display** - Dynamic version loading via `/api/health/detailed` endpoint
4856 | - **Backend status integration** - Live backend information display
4857 | - **Enhanced user awareness** - Always shows current system state
4858 |
4859 | #### 📱 **Enhanced User Experience**
4860 | - **Responsive design** - Organized endpoint sections with mobile compatibility
4861 | - **Performance optimized** - CSS transitions optimized for better performance
4862 | - **Consistent navigation** - Fixed naming conflicts for seamless tab switching
4863 |
4864 | ### 🛠️ **Technical Improvements**
4865 |
4866 | #### 🔧 **API Consistency**
4867 | - **Fixed endpoint path documentation** - Updated from `{hash}` to `{content_hash}` for accuracy
4868 | - **Comprehensive endpoint coverage** - All API endpoints properly documented
4869 | - **Organized by functionality** - Logical grouping of endpoints for easy navigation
4870 |
4871 | #### 🎨 **Performance Optimization**
4872 | - **CSS performance** - Replaced `transition: all` with specific `border-color` and `box-shadow` transitions
4873 | - **Load time maintained** - 25ms page load performance preserved
4874 | - **Memory operation speed** - 26ms operation performance maintained
4875 |
4876 | ### 📊 **Restored Functionality**
4877 |
4878 | | Feature | Status | Notes |
4879 | |---------|--------|-------|
4880 | | API Overview Page | ✅ RESTORED | `/api-overview` route with full documentation |
4881 | | Dashboard Integration | ✅ NEW | API docs tab in interactive dashboard |
4882 | | Dynamic Content | ✅ ENHANCED | Real-time version and backend display |
4883 | | Mobile Responsive | ✅ MAINTAINED | CSS breakpoints preserved |
4884 | | Performance | ✅ OPTIMIZED | Enhanced CSS transitions |
4885 |
4886 | ### 🔄 **Architecture**
4887 |
4888 | #### **Dual Interface Implementation**
4889 | - **FastAPI Integration** - `get_api_overview_html()` function with embedded JavaScript
4890 | - **Dashboard Enhancement** - Additional navigation tab with organized content sections
4891 | - **Unified Styling** - Consistent CSS styling across both interfaces
4892 | - **Protocol Independence** - Works with both HTTP and MCP protocols
4893 |
4894 | ### 🎯 **User Impact**
4895 |
4896 | **Addresses critical missing functionality:**
4897 | - Restores API documentation that was missing after v7.2.2 interactive dashboard
4898 | - Provides both standalone and integrated access to API information
4899 | - Maintains excellent performance benchmarks while adding functionality
4900 | - Enhances developer experience with comprehensive endpoint documentation
4901 |
4902 | **This release ensures users have complete access to API documentation through multiple interfaces while preserving the performance excellence of the interactive dashboard.**
4903 |
4904 | ## [7.2.2] - 2025-09-30
4905 |
4906 | ### 🎉 **Interactive Dashboard Validation Complete**
4907 |
4908 | **Successfully completed comprehensive testing and validation of the Interactive Dashboard (PR #125).**
4909 |
4910 | ### ✅ **Validation Results**
4911 | - **Performance Excellence**: Page load 25ms (target: <2s), Memory operations 26ms (target: <1s)
4912 | - **Search Functionality**: Semantic search, tag-based search, and time-based search all working perfectly
4913 | - **Real-time Updates**: Server-Sent Events (SSE) with heartbeat and connection management validated
4914 | - **Security**: XSS protection via escapeHtml function properly implemented throughout frontend
4915 | - **OAuth Compatibility**: Both enabled and disabled OAuth modes tested and working
4916 | - **Mobile Responsive**: CSS breakpoints for mobile (768px) and tablet (1024px) verified
4917 | - **Large Dataset Performance**: Excellent performance tested with 994+ memories
4918 | - **Claude Desktop Integration**: MCP protocol compatibility confirmed
4919 |
4920 | ### 🚀 **Production Ready**
4921 | The Interactive Dashboard is now **fully validated and ready for production use**, providing:
4922 | - Complete memory CRUD operations
4923 | - Advanced search and filtering capabilities
4924 | - Real-time updates via Server-Sent Events
4925 | - Mobile-responsive design
4926 | - Security best practices
4927 | - Excellent performance with large datasets
4928 |
4929 | ### 📊 **Testing Metrics**
4930 | | Component | Target | Actual | Status |
4931 | |-----------|--------|--------|--------|
4932 | | Page Load | <2s | 25ms | ✅ EXCELLENT |
4933 | | Memory Ops | <1s | 26ms | ✅ EXCELLENT |
4934 | | Tag Search | <500ms | <100ms | ✅ EXCELLENT |
4935 | | Large Dataset | 1000+ | 994+ tested | ✅ EXCELLENT |
4936 |
4937 | **Issue #123 closed as completed. Dashboard provides immediate user value and solid foundation for future features.**
4938 |
4939 | ## [7.2.0] - 2025-09-30
4940 |
4941 | ### 🚀 **Major Performance: ChromaDB Optional Docker Optimization**
4942 |
4943 | **⚠️ BREAKING CHANGE**: ChromaDB is no longer installed by default to dramatically improve Docker build performance and reduce image sizes.
4944 |
4945 | ### 🎯 **Key Benefits**
4946 | - **70-80% faster Docker build times** (from ~10-15 min to ~2-3 min)
4947 | - **1-2GB smaller Docker images** (~2.5GB → ~800MB standard, ~400MB slim)
4948 | - **Lower memory footprint** in production deployments
4949 | - **Maintained backward compatibility** with clear opt-in mechanism
4950 |
4951 | ### 🔧 **Installation Changes**
4952 | ```bash
4953 | # Default installation (lightweight, sqlite_vec only)
4954 | python scripts/installation/install.py
4955 |
4956 | # With ChromaDB support (heavy dependencies)
4957 | python scripts/installation/install.py --with-chromadb
4958 |
4959 | # Docker builds automatically use optimized sqlite_vec backend
4960 | docker build -f tools/docker/Dockerfile -t mcp-memory-service:latest .
4961 | ```
4962 |
4963 | ### 📋 **What Changed**
4964 | - **pyproject.toml**: Added `full` optional dependency group, moved ChromaDB to optional
4965 | - **server.py**: Added conditional ChromaDB imports with graceful error handling
4966 | - **mcp_server.py**: Enhanced ChromaDB import error messages and fallback logic
4967 | - **install.py**: Added `--with-chromadb` flag for opt-in ChromaDB installation
4968 | - **README.md**: Updated storage backend documentation with ChromaDB optional notes
4969 | - **NEW**: `docs/docker-optimized-build.md` - Comprehensive Docker optimization guide
4970 |
4971 | ### 🛡️ **Migration Guide**
4972 | **For users who need ChromaDB:**
4973 | 1. Run: `python scripts/installation/install.py --with-chromadb`
4974 | 2. Or install manually: `pip install mcp-memory-service[chromadb]`
4975 |
4976 | **For Docker users:**
4977 | - No action needed - automatically get performance improvements
4978 | - Docker builds now default to optimized sqlite_vec backend
4979 |
4980 | ### 🧪 **Error Handling**
4981 | - Clear error messages when ChromaDB backend selected but not installed
4982 | - Graceful fallback to sqlite_vec when ChromaDB unavailable
4983 | - Helpful guidance on how to install ChromaDB if needed
4984 |
4985 | ### 📊 **Performance Comparison**
4986 | | Metric | Before | After | Improvement |
4987 | |--------|--------|-------|-------------|
4988 | | Docker build | ~10-15 min | ~2-3 min | **80% faster** |
4989 | | Image size | ~2.5GB | ~800MB | **68% smaller** |
4990 | | Memory usage | High | Low | **Significantly reduced** |
4991 |
4992 | ## [7.1.5] - 2025-09-29
4993 |
4994 | ### 🔧 **Improvements**
4995 |
4996 | - **Enhanced timestamp consistency across memory retrieval methods** - All memory retrieval endpoints now display consistent timestamp information:
4997 | - `retrieve_memory` now shows timestamps in "YYYY-MM-DD HH:MM:SS" format matching `recall_memory`
4998 | - `search_by_tag` now shows timestamps in same consistent format
4999 | - Improved code quality using `getattr` pattern instead of `hasattr` checks
5000 | - Resolves timestamp metadata inconsistency reported in issue #126
5001 |
5002 | - **Enhanced CLI hybrid backend support** - CLI commands now fully support hybrid storage backend:
5003 | - Added 'hybrid' option to `--storage-backend` choices for both `server` and `status` commands
5004 | - Completes hybrid backend integration across all system components
5005 | - Enables seamless CLI usage with hybrid SQLite-vec + Cloudflare architecture
5006 |
5007 | - **Hybrid storage backend server integration** - Server.py now fully supports hybrid backend operations:
5008 | - Added `sanitized` method to hybrid storage for tag handling compatibility
5009 | - Enhanced initialization and health check support for hybrid backend
5010 | - Maintains performance optimization with Cloudflare synchronization
5011 |
5012 | ### 🛡️ **Security Fixes**
5013 |
5014 | - **Credential exposure prevention** - Enhanced security measures to prevent accidental credential exposure:
5015 | - Improved handling of environment variables in logging and error messages
5016 | - Additional safeguards against sensitive configuration leakage
5017 | - Follows security best practices for credential management
5018 |
5019 | - **Resource leak fixes** - Memory and resource management improvements:
5020 | - Enhanced connection cleanup in storage backends
5021 | - Improved async resource handling to prevent leaks
5022 | - Better error recovery and cleanup procedures
5023 |
5024 | ### 🎯 **Code Quality**
5025 |
5026 | - **Implemented Gemini Code Assistant improvements** - Enhanced code maintainability and safety:
5027 | - Replaced `hasattr` + direct attribute access with safer `getattr(obj, "attr", None)` pattern
5028 | - Cleaner, more readable code with consistent error handling
5029 | - Improved null safety and defensive programming practices
5030 |
5031 | ## [7.1.4] - 2025-09-28
5032 |
5033 | ### 🚀 **Major Feature: Unified Cross-Platform Hook Installer**
5034 |
5035 | - **NEW: Single Python installer replaces 4+ platform-specific scripts**
5036 | - Consolidated `install.sh`, `install-natural-triggers.sh`, `install_claude_hooks_windows.bat` into unified `install_hooks.py`
5037 | - Full cross-platform compatibility (Windows, macOS, Linux)
5038 | - Intelligent JSON configuration merging preserves existing Claude Code hooks
5039 | - Dynamic path resolution eliminates hardcoded developer paths
5040 | - Atomic installations with automatic rollback on failure
5041 |
5042 | - **Enhanced Safety & User Experience**
5043 | - Smart settings.json merging prevents configuration loss
5044 | - Comprehensive backup system with timestamped restore points
5045 | - Empty directory cleanup for proper uninstall process
5046 | - Dry-run support for safe testing before installation
5047 | - Enhanced error handling with detailed user feedback
5048 |
5049 | - **Natural Memory Triggers v7.1.3 Integration**
5050 | - Advanced trigger detection with 85%+ accuracy
5051 | - Multi-tier performance optimization (50ms/150ms/500ms)
5052 | - Mid-conversation memory injection
5053 | - CLI management tools for real-time configuration
5054 | - Git-aware context and repository integration
5055 |
5056 | ### 🔧 **Installation Commands Updated**
5057 | ```bash
5058 | # New unified installation (replaces all previous methods)
5059 | cd claude-hooks
5060 | python install_hooks.py --natural-triggers # Recommended
5061 | python install_hooks.py --basic # Basic hooks only
5062 | python install_hooks.py --all # Everything
5063 |
5064 | # Integrated with main installer
5065 | python scripts/installation/install.py --install-natural-triggers
5066 | ```
5067 |
5068 | ### 📋 **Migration & Documentation**
5069 | - Added comprehensive `claude-hooks/MIGRATION.md` with transition guide
5070 | - Updated README.md installation instructions
5071 | - Legacy shell scripts removed (eliminates security and compatibility issues)
5072 | - Clear upgrade path for existing users
5073 |
5074 | ### 🛠 **Technical Improvements**
5075 | - Addressed all Gemini Code Assist review feedback
5076 | - Enhanced cross-platform path handling with proper quoting
5077 | - Improved integration between main installer and hook installer
5078 | - Professional CLI interface with consistent options across platforms
5079 |
5080 | ### ⚠️ **Breaking Changes**
5081 | - Legacy shell installers (`install.sh`, `install-natural-triggers.sh`) removed
5082 | - Installation commands updated - see `claude-hooks/MIGRATION.md` for details
5083 | - Users must switch to unified Python installer for future installations
5084 |
5085 | ## [7.1.3] - 2025-09-28
5086 |
5087 | ### 🚨 **SECURITY FIX**
5088 |
5089 | - **CRITICAL: Removed sensitive configuration files from repository** - Immediate security remediation:
5090 | - **Removed `.claude/settings.local.json*` files from git tracking and complete history**
5091 | - **Used `git filter-branch` to purge all sensitive data from repository history**
5092 | - **Force-pushed rewritten history to remove exposed API tokens and secrets**
5093 | - Added comprehensive `.gitignore` patterns for future protection
5094 | - **BREAKING: Repository history rewritten - force pull required for existing clones**
5095 | - **ACTION REQUIRED: Rotate any exposed Cloudflare API tokens immediately**
5096 | - Addresses critical security vulnerability from issues #118 and personal config exposure
5097 |
5098 | ### ⚠️ **Post-Security Actions Required**
5099 | 1. **Immediately rotate any Cloudflare API tokens** that were in the exposed files
5100 | 2. **Force pull** or re-clone repository: `git fetch origin && git reset --hard origin/develop`
5101 | 3. **Review local `.claude/settings.local.json`** files for any other sensitive data
5102 | 4. **Verify no sensitive data** remains in your local configurations
5103 |
5104 | ## [7.1.2] - 2025-09-28
5105 |
5106 | ### 🔧 **Improvements**
5107 |
5108 | - **Stop tracking personal Claude settings to prevent merge conflicts** - Added `.claude/settings.local.json*` patterns to `.gitignore`:
5109 | - Prevents future tracking of personal configuration files
5110 | - Uses `--skip-worktree` to ignore local changes to existing tracked files
5111 | - Protects user privacy and eliminates merge conflicts
5112 | - Preserves existing user configurations while fixing repository hygiene (Fixes #118)
5113 |
5114 | ## [7.1.1] - 2025-09-28
5115 |
5116 | ### 🐛 **Bug Fixes**
5117 |
5118 | - **Fixed misleading error message in document ingestion** - The `ingest_document` tool now provides accurate error messages:
5119 | - Shows "File not found" with full resolved path when files don't exist
5120 | - Only shows "Unsupported file format" for truly unsupported formats
5121 | - Includes list of supported formats (.md, .txt, .pdf, .json, .csv) in format errors
5122 | - Resolves issue where Markdown files were incorrectly reported as unsupported (Fixes #122)
5123 |
5124 | ## [7.1.0] - 2025-09-27
5125 |
5126 | ### 🧠 **Natural Memory Triggers for Claude Code**
5127 |
5128 | This release introduces **Natural Memory Triggers v7.1.0** - an intelligent memory awareness system that automatically detects when Claude should retrieve relevant memories from your development history.
5129 |
5130 | #### ✨ **New Features**
5131 |
5132 | ##### 🎯 **Intelligent Trigger Detection**
5133 | - **✅ Semantic Analysis** - Advanced natural language processing to understand memory-seeking patterns
5134 | - **Pattern Recognition**: Detects phrases like "What did we decide...", "How did we implement..."
5135 | - **Question Classification**: Identifies when user is seeking information from past work
5136 | - **Context Understanding**: Analyzes conversation flow and topic shifts
5137 | - **✅ Git-Aware Context** - Repository integration for enhanced relevance
5138 | - **Commit Analysis**: Extracts development themes from recent commit history
5139 | - **Changelog Integration**: Parses project changelogs for version-specific context
5140 | - **Development Keywords**: Builds search queries from git history and file patterns
5141 |
5142 | ##### ⚡ **Performance-Optimized Architecture**
5143 | - **✅ Multi-Tier Processing** - Three-tier performance system
5144 | - **Instant Tier** (< 50ms): Pattern matching and cache checks
5145 | - **Fast Tier** (< 150ms): Lightweight semantic analysis
5146 | - **Intensive Tier** (< 500ms): Deep semantic understanding
5147 | - **✅ Adaptive Performance Profiles**
5148 | - **Speed Focused**: Minimal latency, basic memory awareness
5149 | - **Balanced**: Optimal speed/context balance (recommended)
5150 | - **Memory Aware**: Maximum context awareness
5151 | - **Adaptive**: Machine learning-based optimization
5152 |
5153 | ##### 🎮 **CLI Management System**
5154 | - **✅ Memory Mode Controller** - Comprehensive command-line interface
5155 | - **Profile Switching**: `node memory-mode-controller.js profile balanced`
5156 | - **Sensitivity Control**: `node memory-mode-controller.js sensitivity 0.7`
5157 | - **Status Monitoring**: Real-time performance metrics and configuration display
5158 | - **System Management**: Enable/disable triggers, reset to defaults
5159 |
5160 | #### 🔧 **Technical Implementation**
5161 |
5162 | ##### **Core Components**
5163 | - **`claude-hooks/core/mid-conversation.js`** - Main hook implementation with stateful management
5164 | - **`claude-hooks/utilities/tiered-conversation-monitor.js`** - Multi-tier semantic analysis engine
5165 | - **`claude-hooks/utilities/performance-manager.js`** - Performance monitoring and adaptive optimization
5166 | - **`claude-hooks/utilities/git-analyzer.js`** - Git repository context analysis
5167 | - **`claude-hooks/memory-mode-controller.js`** - CLI controller for system management
5168 |
5169 | ##### **Smart Memory Scoring**
5170 | - **✅ Multi-Factor Relevance** - Sophisticated scoring algorithm
5171 | - **Content Relevance** (15%): Semantic similarity to current context
5172 | - **Tag Relevance** (35%): Project and topic-specific weighting
5173 | - **Time Decay** (25%): Recent memories weighted higher
5174 | - **Content Quality** (25%): Filters out low-value memories
5175 | - **✅ Conversation Context** - Session-aware analysis
5176 | - **Topic Tracking**: Maintains context window for semantic analysis
5177 | - **Pattern Detection**: Learns user preferences and conversation patterns
5178 | - **Confidence Thresholds**: Only triggers when confidence meets user-defined threshold
5179 |
5180 | #### 🧪 **Quality Assurance**
5181 |
5182 | ##### **Comprehensive Testing**
5183 | - **✅ Test Suite** - 18 automated tests covering all functionality
5184 | - **Configuration Management**: Nested JSON handling and validation
5185 | - **Performance Profiling**: Latency measurement and optimization
5186 | - **Semantic Analysis**: Pattern detection and confidence scoring
5187 | - **CLI Integration**: Command processing and state management
5188 | - **✅ Gemini Code Assist Integration** - AI-powered code review
5189 | - **Static Analysis**: Identified and fixed 21 code quality issues
5190 | - **Performance Optimization**: Division-by-zero prevention, cache management
5191 | - **Configuration Validation**: Duplicate key detection and consolidation
5192 |
5193 | #### 🔄 **Installation & Compatibility**
5194 |
5195 | ##### **Seamless Integration**
5196 | - **✅ Zero-Restart Installation** - Dynamic hook loading during Claude Code sessions
5197 | - **✅ Backward Compatibility** - Works alongside existing memory service functionality
5198 | - **✅ Configuration Preservation** - Maintains existing settings while adding new features
5199 | - **✅ Platform Support** - macOS, Windows, and Linux compatibility
5200 |
5201 | #### 📊 **Performance Metrics**
5202 |
5203 | ##### **Benchmarks**
5204 | - **Instant Analysis**: < 50ms response time for pattern matching
5205 | - **Fast Analysis**: < 150ms for lightweight semantic processing
5206 | - **Cache Performance**: < 5ms for cached results with LRU management
5207 | - **Memory Efficiency**: Automatic cleanup prevents memory bloat
5208 | - **Trigger Accuracy**: 85%+ confidence for memory-seeking pattern detection
5209 |
5210 | #### 🎯 **Usage Examples**
5211 |
5212 | Natural Memory Triggers automatically activate for phrases like:
5213 | - "What approach did we use for authentication?"
5214 | - "How did we handle error handling in this project?"
5215 | - "What were the main architectural decisions we made?"
5216 | - "Similar to what we implemented before..."
5217 | - "Remember when we discussed..."
5218 |
5219 | #### 📚 **Documentation**
5220 |
5221 | - **✅ Complete User Guide** - Comprehensive documentation at `claude-hooks/README-NATURAL-TRIGGERS.md`
5222 | - **✅ CLI Reference** - Detailed command documentation and usage examples
5223 | - **✅ Configuration Guide** - Performance profile explanations and optimization tips
5224 | - **✅ Troubleshooting** - Common issues and resolution steps
5225 |
5226 | ---
5227 |
5228 | ## [7.0.0] - 2025-09-27
5229 |
5230 | ### 🎉 **Major Release - OAuth 2.1 Dynamic Client Registration**
5231 |
5232 | This major release introduces comprehensive **OAuth 2.1 Dynamic Client Registration**, enabling **Claude Code HTTP transport** and **enterprise-grade authentication** while maintaining full backward compatibility with existing API key workflows.
5233 |
5234 | #### ✨ **New Features**
5235 |
5236 | ##### 🔐 **OAuth 2.1 Implementation**
5237 | - **✅ Dynamic Client Registration** - Complete RFC 7591 compliant implementation
5238 | - **Auto-Discovery**: `.well-known/oauth-authorization-server/mcp` endpoint for client auto-configuration
5239 | - **Runtime Registration**: Clients can register dynamically without manual setup
5240 | - **Standards Compliance**: Full OAuth 2.1 and RFC 8414 authorization server metadata
5241 | - **Security Best Practices**: HTTPS enforcement, secure redirect URI validation
5242 |
5243 | - **✅ JWT Authentication** - Modern token-based authentication
5244 | - **RS256 Signing**: RSA key pairs for enhanced security (with HS256 fallback)
5245 | - **Scope-Based Authorization**: Granular permissions (`read`, `write`, `admin`)
5246 | - **Token Validation**: Comprehensive JWT verification with proper error handling
5247 | - **Configurable Expiration**: Customizable token and authorization code lifetimes
5248 |
5249 | ##### 🚀 **Claude Code Integration**
5250 | - **✅ HTTP Transport Support** - Direct integration with Claude Code
5251 | - **Automatic Setup**: Claude Code discovers and registers OAuth client automatically
5252 | - **Team Collaboration**: Enables Claude Code team features via HTTP transport
5253 | - **Seamless Authentication**: JWT tokens handled transparently by client
5254 |
5255 | ##### 🛡️ **Enhanced Security Architecture**
5256 | - **✅ Multi-Method Authentication** - Flexible authentication options
5257 | - **OAuth Bearer Tokens**: Primary authentication method for modern clients
5258 | - **API Key Fallback**: Existing API key authentication preserved for backward compatibility
5259 | - **Anonymous Access**: Optional anonymous access with explicit opt-in (`MCP_ALLOW_ANONYMOUS_ACCESS`)
5260 |
5261 | - **✅ Production Security Features**
5262 | - **Thread-Safe Operations**: Async/await with proper locking mechanisms
5263 | - **Background Token Cleanup**: Automatic expiration and cleanup of tokens/codes
5264 | - **Security Validation**: Comprehensive startup validation with production warnings
5265 | - **Configuration Hardening**: HTTP transport warnings, key strength validation
5266 |
5267 | #### 🔧 **Technical Implementation**
5268 |
5269 | ##### **New OAuth Endpoints**
5270 | - **`/.well-known/oauth-authorization-server/mcp`** - OAuth server metadata discovery
5271 | - **`/.well-known/openid-configuration/mcp`** - OpenID Connect compatibility endpoint
5272 | - **`/oauth/register`** - Dynamic client registration endpoint
5273 | - **`/oauth/authorize`** - Authorization code flow endpoint
5274 | - **`/oauth/token`** - Token exchange endpoint (supports both `authorization_code` and `client_credentials` flows)
5275 |
5276 | ##### **Authentication Middleware**
5277 | - **✅ Unified Auth Handling**: Single middleware protecting all API endpoints
5278 | - **✅ Scope Validation**: Automatic scope checking for protected resources
5279 | - **✅ Graceful Fallback**: OAuth → API key → Anonymous (if enabled)
5280 | - **✅ Enhanced Error Messages**: Context-aware authentication error responses
5281 |
5282 | ##### **Configuration System**
5283 | - **✅ Environment Variables**: Comprehensive OAuth configuration options
5284 | ```bash
5285 | MCP_OAUTH_ENABLED=true # Enable/disable OAuth (default: true)
5286 | MCP_OAUTH_SECRET_KEY=<secure-key> # JWT signing key (auto-generated if not set)
5287 | MCP_OAUTH_ISSUER=<issuer-url> # OAuth issuer URL (auto-detected)
5288 | MCP_OAUTH_ACCESS_TOKEN_EXPIRE_MINUTES=60 # Token expiration (default: 60 minutes)
5289 | MCP_ALLOW_ANONYMOUS_ACCESS=false # Anonymous access (default: false)
5290 | ```
5291 |
5292 | #### 🔄 **Backward Compatibility**
5293 | - **✅ Zero Breaking Changes**: All existing API key workflows continue to work unchanged
5294 | - **✅ Optional OAuth**: OAuth can be completely disabled with `MCP_OAUTH_ENABLED=false`
5295 | - **✅ Graceful Coexistence**: API key and OAuth authentication work side-by-side
5296 | - **✅ Migration Path**: Existing users can adopt OAuth gradually or continue with API keys
5297 |
5298 | #### 📊 **Development & Quality Metrics**
5299 | - **✅ 17 Comprehensive Review Cycles** with Gemini Code Assist feedback integration
5300 | - **✅ All Security Issues Resolved** (critical, high, medium severity vulnerabilities addressed)
5301 | - **✅ Extensive Testing Suite**: New integration tests for OAuth flows and security scenarios
5302 | - **✅ Production Readiness**: Comprehensive validation, monitoring, and health checks
5303 |
5304 | #### 🚀 **Impact & Benefits**
5305 |
5306 | ##### **For Existing Users**
5307 | - **No Changes Required**: Continue using API key authentication without modification
5308 | - **Enhanced Security**: Option to upgrade to industry-standard OAuth when ready
5309 | - **Future-Proof**: Foundation for additional enterprise features
5310 |
5311 | ##### **For Claude Code Users**
5312 | - **Team Collaboration**: HTTP transport enables Claude Code team features
5313 | - **Automatic Setup**: Zero-configuration OAuth setup and token management
5314 | - **Enterprise Ready**: Standards-compliant authentication for organizational use
5315 |
5316 | ##### **For Enterprise Environments**
5317 | - **Standards Compliance**: Full OAuth 2.1 and RFC compliance for security audits
5318 | - **Centralized Auth**: Foundation for integration with existing identity providers
5319 | - **Audit Trail**: Comprehensive logging and token lifecycle management
5320 |
5321 | #### 🔜 **Future Enhancements**
5322 | This release provides the foundation for additional OAuth features:
5323 | - **Persistent Storage**: Production-ready client and token storage backends
5324 | - **PKCE Support**: Enhanced security for public clients
5325 | - **Refresh Tokens**: Long-lived authentication sessions
5326 | - **User Consent UI**: Interactive authorization flows
5327 | - **Identity Provider Integration**: SAML, OIDC, and enterprise SSO support
5328 |
5329 | #### 📚 **Documentation**
5330 | - **✅ Complete Setup Guide**: Step-by-step OAuth configuration documentation (`docs/oauth-setup.md`)
5331 | - **✅ API Reference**: Comprehensive endpoint documentation with examples
5332 | - **✅ Security Guide**: Production deployment best practices and security considerations
5333 | - **✅ Migration Guide**: Smooth transition path for existing users
5334 |
5335 | ---
5336 |
5337 | **This major release transforms the MCP Memory Service from a simple memory tool into an enterprise-ready service with standards-compliant authentication, enabling new use cases while preserving the simplicity that makes it valuable.**
5338 |
5339 | ## [6.23.0] - 2025-09-27
5340 |
5341 | ### 🎉 **Major Feature Release - Memory Management Enhancement**
5342 |
5343 | This release combines three major improvements: comprehensive memory management tools, enhanced documentation, and dependency standardization. All changes have been reviewed and approved by Gemini Code Assist with very positive feedback.
5344 |
5345 | #### ✨ **New Features**
5346 | - **🛠️ New `list_memories` MCP Tool** - Added paginated memory browsing with filtering capabilities
5347 | - ✅ **Pagination Support**: Page-based navigation (1-based indexing) with configurable page sizes (1-100)
5348 | - ✅ **Database-Level Filtering**: Filter by memory type and tags using efficient SQL queries
5349 | - ✅ **Performance Optimized**: Direct database filtering instead of Python-level post-processing
5350 | - ✅ **Consistent API**: Available in both MCP server and HTTP/REST endpoints
5351 |
5352 | #### 🚀 **Performance Improvements**
5353 | - **⚡ Database-Level Filtering** - Replaced inefficient Python-level filtering with SQL WHERE clauses
5354 | - ❌ **Previous**: Fetch all records → filter in Python → paginate (slow, memory-intensive)
5355 | - ✅ **Now**: Filter + paginate in database → return results (5ms response time)
5356 | - ✅ **Benefits**: Dramatically reduced memory usage and improved response times for large datasets
5357 | - ✅ **Backends**: Implemented across SQLite-vec, ChromaDB, Cloudflare, and Hybrid storage
5358 |
5359 | - **🔧 Enhanced Storage Interface** - Extended `get_all_memories()` with tags parameter
5360 | - ✅ **Tag Filtering**: Support for OR-based tag matching at database level
5361 | - ✅ **Backward Compatible**: All existing code continues to work unchanged
5362 | - ✅ **Consistent**: Same interface across all storage backends
5363 |
5364 | #### 🛡️ **Security Enhancements**
5365 | - **🔒 Eliminated Security Vulnerabilities** - Removed dangerous runtime dependency installation
5366 | - ❌ **Removed**: Automatic `pip install` execution in Docker containers
5367 | - ✅ **Security**: Prevents potential code injection and supply chain attacks
5368 | - ✅ **Reliability**: Dependencies now properly managed through container build process
5369 |
5370 | - **🔑 Fixed Hardcoded Credentials** - Replaced hardcoded API keys with environment variables
5371 | - ❌ **Previous**: API keys stored in plain text in debug scripts
5372 | - ✅ **Fixed**: All credentials now sourced from secure environment variables
5373 | - ✅ **Security**: Follows security best practices for credential management
5374 |
5375 | #### 📚 **Documentation Improvements**
5376 | - **📖 Comprehensive Documentation Suite** - Added professional documentation in `docs/mastery/`
5377 | - ✅ **API Reference**: Complete API documentation with examples
5378 | - ✅ **Architecture Overview**: Detailed system architecture documentation
5379 | - ✅ **Configuration Guide**: Comprehensive configuration management guide
5380 | - ✅ **Setup Instructions**: Step-by-step local setup and run guide
5381 | - ✅ **Testing Guide**: Testing strategies and debugging instructions
5382 | - ✅ **Troubleshooting**: Common issues and solutions
5383 |
5384 | - **🔧 Enhanced Development Resources** - Added advanced search and refactoring documentation
5385 | - ✅ **Search Enhancement Guide**: Advanced search capabilities and examples
5386 | - ✅ **Refactoring Summary**: Complete analysis of architectural changes
5387 | - ✅ **Integration Examples**: Multi-client setup for various AI platforms
5388 |
5389 | #### 🔧 **Infrastructure Improvements**
5390 | - **🐳 Docker Optimization** - Enhanced Docker configuration for production deployments
5391 | - ✅ **Security Updates**: Updated base images and security patches
5392 | - ✅ **Performance**: Optimized container size and startup time
5393 | - ✅ **Flexibility**: Better support for different deployment scenarios
5394 |
5395 | - **📦 Dependency Management** - Standardized and improved dependency handling
5396 | - ✅ **ChromaDB Compatibility**: Restored ChromaDB as optional dependency for backward compatibility
5397 | - ✅ **Updated Dependencies**: Updated PyPDF2 → pypdf2 for better maintenance
5398 | - ✅ **Optional Dependencies**: Clean separation of core vs optional features
5399 |
5400 | #### 🪟 **Platform Support**
5401 | - **💻 Enhanced Windows Support** - Added comprehensive Windows debugging capabilities
5402 | - ✅ **Debug Script**: New `start_http_debug.bat` for Windows HTTP mode testing
5403 | - ✅ **103 Lines Added**: Comprehensive Windows debugging and troubleshooting support
5404 | - ✅ **Environment Variables**: Proper Windows environment variable handling
5405 |
5406 | #### 🧹 **Code Quality**
5407 | - **♻️ Major Refactoring** - Removed redundant functionality while maintaining compatibility
5408 | - ✅ **317 Lines Removed**: Eliminated duplicate `search_by_time` and `search_similar` tools
5409 | - ✅ **Functional Redundancy**: Removed tools that exactly duplicated existing functionality
5410 | - ✅ **API Consolidation**: Streamlined API surface while preserving all capabilities
5411 | - ✅ **Performance**: Reduced codebase complexity without losing features
5412 |
5413 | #### 🤖 **AI Code Review Integration**
5414 | - **✅ Gemini Code Assist Approved** - All changes reviewed and approved with very positive feedback
5415 | - ✅ **Architecture Review**: Praised database-level filtering implementation
5416 | - ✅ **Security Review**: Confirmed elimination of security vulnerabilities
5417 | - ✅ **Performance Review**: Validated performance optimization approach
5418 | - ✅ **Code Quality**: Approved refactoring and redundancy removal
5419 |
5420 | #### 📋 **Migration Notes**
5421 | - **🔄 Backward Compatibility**: All existing integrations continue to work unchanged
5422 | - **📦 Optional Dependencies**: ChromaDB users should install with `pip install mcp-memory-service[chromadb]`
5423 | - **🛠️ New Tools**: The `list_memories` tool is automatically available to all MCP clients
5424 | - **⚠️ Removed Tools**: `search_by_time` and `search_similar` tools have been removed (functionality available through existing tools)
5425 |
5426 | #### 💡 **Usage Examples**
5427 | ```python
5428 | # New list_memories tool with filtering
5429 | await list_memories(page=1, page_size=20, tag="important", memory_type="note")
5430 |
5431 | # Database-level tag filtering (improved performance)
5432 | memories = await storage.get_all_memories(limit=50, tags=["work", "project"])
5433 |
5434 | # Enhanced pagination with type filtering
5435 | memories = await storage.get_all_memories(
5436 | limit=10, offset=20, memory_type="decision", tags=["urgent"]
5437 | )
5438 | ```
5439 |
5440 | ---
5441 |
5442 | ## [6.22.1] - 2025-09-26
5443 |
5444 | ### 🔧 **Dashboard Statistics Fix**
5445 |
5446 | #### Bug Fixes
5447 | - **🎯 Backend-Agnostic Dashboard Stats** - Fixed `dashboard_get_stats` to use configured storage backend instead of hardcoded ChromaDB
5448 | - ❌ **Previous Issue**: Dashboard always showed ChromaDB stats (often 0 memories) regardless of actual backend
5449 | - ✅ **Fixed**: Now properly detects and uses SQLite-vec, Cloudflare, or ChromaDB based on configuration
5450 | - ✅ **Consistency**: Uses same pattern as `handle_check_database_health` for reliable backend detection
5451 | - ✅ **Accuracy**: Dashboard now shows correct memory counts and backend information
5452 |
5453 | #### Technical Improvements
5454 | - **Backend Detection**: Dynamic storage type detection via `storage.__class__.__name__`
5455 | - **Error Handling**: Proper async/await handling and graceful error reporting
5456 | - **Code Consistency**: Unified approach with existing health check functionality
5457 |
5458 | ---
5459 |
5460 | **Resolves**: GitHub Issue where dashboard stats were incorrectly hardcoded to ChromaDB
5461 | **Credit**: Thanks to @MichaelPaulukonis for identifying and fixing this backend detection issue
5462 |
5463 | ---
5464 |
5465 | ## [6.22.0] - 2024-09-25
5466 |
5467 | ### 🎯 **Chronological Ordering & Performance Improvements**
5468 |
5469 | #### Major API Enhancements
5470 | - **🌟 Chronological Memory Ordering** - `/api/memories` endpoint now returns memories in chronological order (newest first)
5471 | - ✅ **Improved User Experience**: More intuitive memory browsing with recent memories prioritized
5472 | - ✅ **Consistent Across All Backends**: SQLite-vec, ChromaDB, Cloudflare D1, and Hybrid
5473 | - ✅ **Proper Pagination Support**: Server-side sorting with efficient limit/offset handling
5474 | - ✅ **Backward Compatible**: Same API interface with enhanced ordering
5475 |
5476 | #### Critical Performance Fixes 🚀
5477 | - **⚡ Storage-Layer Memory Type Filtering** - Addressed critical performance bottleneck
5478 | - ❌ **Previous Issue**: API loaded ALL memories into application memory when filtering by `memory_type`
5479 | - ✅ **Fixed**: Efficient storage-layer filtering with SQL WHERE clauses
5480 | - ✅ **Performance Impact**: 16.5% improvement in filtering operations
5481 | - ✅ **Scalability**: Prevents service instability with large datasets (1000+ memories)
5482 | - **Enhanced Storage Interface**
5483 | - Added `memory_type` parameter to `get_all_memories()` and `count_all_memories()` methods
5484 | - Implemented across all backends: SQLite-vec, ChromaDB, Cloudflare D1, Hybrid
5485 | - Maintains chronological ordering while applying efficient filters
5486 |
5487 | #### Code Quality Improvements
5488 | - **🔧 ChromaDB Code Refactoring** - Eliminated code duplication
5489 | - Created `_create_memory_from_results()` helper method
5490 | - Consolidated 5 duplicate Memory object creation patterns
5491 | - Enhanced maintainability and consistency across ChromaDB operations
5492 | - **Comprehensive Test Suite**
5493 | - Added 10 new test cases specifically for chronological ordering
5494 | - Covers edge cases: empty storage, large offsets, mixed timestamps
5495 | - Validates API endpoint behavior and storage backend compatibility
5496 |
5497 | #### Backend-Specific Optimizations
5498 | - **SQLite-vec**: Efficient `ORDER BY created_at DESC` with parameterized WHERE clauses
5499 | - **ChromaDB**: Client-side sorting with performance warnings for large datasets (>1000 memories)
5500 | - **Cloudflare D1**: Server-side SQL sorting and filtering for optimal performance
5501 | - **Hybrid**: Delegates to primary storage (SQLite-vec) for consistent performance
5502 |
5503 | #### Developer Experience
5504 | - Enhanced error handling and logging for filtering operations
5505 | - Improved API response consistency across all storage backends
5506 | - Better performance monitoring and debugging capabilities
5507 |
5508 | ---
5509 |
5510 | **Resolves**: GitHub Issue #79 - Implement chronological ordering for /api/memories endpoint
5511 | **Addresses**: Gemini Code Assist performance and maintainability feedback
5512 |
5513 | ---
5514 |
5515 | ## [6.21.0] - 2024-09-25
5516 |
5517 | ### 🚀 **Hybrid Storage Backend - Performance Revolution**
5518 |
5519 | #### Major New Features
5520 | - **🌟 Revolutionary Hybrid Storage Backend** - Combines the best of both worlds:
5521 | - ✅ **SQLite-vec Performance**: ~5ms reads/writes (10-100x faster than Cloudflare-only)
5522 | - ✅ **Cloudflare Persistence**: Multi-device synchronization and cloud backup
5523 | - ✅ **Zero User-Facing Latency**: All operations hit SQLite-vec first, background sync to cloud
5524 | - ✅ **Intelligent Write-Through Cache**: Instant response with async cloud synchronization
5525 |
5526 | #### Enhanced Architecture & Performance
5527 | - **Background Synchronization Service**
5528 | - Async queue with intelligent retry logic and exponential backoff
5529 | - Concurrent sync operations with configurable batch processing
5530 | - Real-time health monitoring and capacity tracking
5531 | - Graceful degradation when cloud services are unavailable
5532 | - **Advanced Error Handling**
5533 | - Intelligent error categorization (temporary vs permanent vs limit errors)
5534 | - Automatic retry for network/temporary issues
5535 | - No-retry policy for hard limits (prevents infinite loops)
5536 | - Comprehensive logging with error classification
5537 |
5538 | #### Cloudflare Limit Protection & Monitoring 🛡️
5539 | - **Pre-Sync Validation**
5540 | - Metadata size validation (10KB limit per vector)
5541 | - Vector count monitoring (5M vector limit)
5542 | - Automatic capacity checks before sync operations
5543 | - **Real-Time Capacity Monitoring**
5544 | - Usage percentage tracking with warning thresholds
5545 | - Critical alerts at 95% capacity, warnings at 80%
5546 | - Proactive limit detection and graceful handling
5547 | - **Enhanced Limit Error Handling**
5548 | - Detection of 413, 507, and quota exceeded responses
5549 | - Automatic capacity status updates on limit errors
5550 | - Permanent failure classification for hard limits
5551 |
5552 | #### Configuration & Deployment
5553 | - **Simple Setup**: Just set `MCP_MEMORY_STORAGE_BACKEND=hybrid` + Cloudflare credentials
5554 | - **Advanced Tuning Options**:
5555 | - `MCP_HYBRID_SYNC_INTERVAL`: Background sync frequency (default: 300s)
5556 | - `MCP_HYBRID_BATCH_SIZE`: Sync batch size (default: 50)
5557 | - `MCP_HYBRID_MAX_QUEUE_SIZE`: Queue capacity (default: 1000)
5558 | - Health check intervals and retry configurations
5559 |
5560 | #### Benefits
5561 | - **For Users**:
5562 | - Instant memory operations (no more waiting for cloud responses)
5563 | - Reliable offline functionality with automatic sync when online
5564 | - Seamless multi-device access to memories
5565 | - **For Production**:
5566 | - Handles Cloudflare's strict limits intelligently
5567 | - Robust error recovery and monitoring
5568 | - Scales from single-user to enterprise deployments
5569 |
5570 | ### 🧪 **Comprehensive Testing & Validation**
5571 | - **347 lines of Cloudflare limit testing** (`tests/test_hybrid_cloudflare_limits.py`)
5572 | - **Performance characteristic validation**
5573 | - **Background sync verification scripts**
5574 | - **Live testing utilities for production validation**
5575 |
5576 | ### 📖 **Documentation & Setup**
5577 | - **CLAUDE.md**: Hybrid marked as **RECOMMENDED** default for new installations
5578 | - **Installation Script Updates**: Interactive hybrid backend selection
5579 | - **Configuration Validation**: Enhanced diagnostic tools for setup verification
5580 |
5581 | **🎯 Recommendation**: This should become the **default backend for all new installations** due to its superior performance and reliability characteristics.
5582 |
5583 | ## [6.20.1] - 2024-09-24
5584 |
5585 | ### 🐛 **Critical Bug Fixes**
5586 |
5587 | #### SQLite-vec Backend Regression Fix
5588 | - **Fixed MCP Server Initialization**: Corrected critical regression that prevented sqlite_vec backend from working
5589 | - ✅ Fixed class name mismatch: `SqliteVecStorage` → `SqliteVecMemoryStorage`
5590 | - ✅ Fixed constructor parameters: Updated to use correct `db_path` and `embedding_model` parameters
5591 | - ✅ Fixed database path: Use `SQLITE_VEC_PATH` instead of incorrect ChromaDB path
5592 | - ✅ Added missing imports: `SQLITE_VEC_PATH` and `EMBEDDING_MODEL_NAME` from config
5593 | - ✅ Code quality improvements: Added `_get_sqlite_vec_storage()` helper function to reduce duplication
5594 |
5595 | #### Impact
5596 | - **Restores Default Backend**: sqlite_vec backend (default) now works correctly with MCP server
5597 | - **Fixes Memory Operations**: Resolves "No embedding model available" errors during memory operations
5598 | - **Claude Desktop Integration**: Enables proper memory storage and retrieval functionality
5599 | - **Embedding Support**: Ensures embedding model loads and generates embeddings successfully
5600 |
5601 | Thanks to @ergut for identifying and fixing this critical regression!
5602 |
5603 | ## [6.20.0] - 2024-09-24
5604 |
5605 | ### 🚀 **Claude Code Dual Protocol Memory Hooks**
5606 |
5607 | #### Major New Features
5608 | - **Dual Protocol Memory Hook Support** - Revolutionary enhancement to Claude Code memory hooks
5609 | - ✅ **HTTP Protocol Support**: Full compatibility with web-based memory services at `https://localhost:8443`
5610 | - ✅ **MCP Protocol Support**: Direct integration with MCP server processes via `uv run memory server`
5611 | - ✅ **Smart Auto-Detection**: Automatically selects best available protocol (MCP preferred, HTTP fallback)
5612 | - ✅ **Graceful Fallback Chain**: MCP → HTTP → Environment-based storage detection
5613 | - ✅ **Protocol Flexibility**: Choose specific protocols (`http`, `mcp`) or auto-selection (`auto`)
5614 |
5615 | #### Enhanced Architecture
5616 | - **Unified MemoryClient Class** (`claude-hooks/utilities/memory-client.js`)
5617 | - Transparent protocol switching with single interface
5618 | - Connection pooling and error recovery
5619 | - Protocol-specific optimizations (MCP direct communication, HTTP REST API)
5620 | - Comprehensive error handling and timeout management
5621 | - **Enhanced Configuration System** (`claude-hooks/config.json`)
5622 | - Protocol-specific settings (HTTP endpoint/API keys, MCP server commands)
5623 | - Configurable fallback behavior and connection timeouts
5624 | - Backward compatibility with existing configurations
5625 |
5626 | #### Reliability Improvements
5627 | - **Multi-Protocol Resilience**: Hooks work across diverse deployment scenarios
5628 | - Local development (MCP direct), production servers (HTTP), hybrid setups
5629 | - Network connectivity issues gracefully handled
5630 | - Service unavailability doesn't break git analysis or project detection
5631 | - **Enhanced Error Handling**: Clear protocol-specific error messages and fallback reporting
5632 | - **Connection Management**: Proper cleanup and resource management for both protocols
5633 |
5634 | #### Developer Experience
5635 | - **Comprehensive Testing Suite** (`claude-hooks/test-dual-protocol-hook.js`)
5636 | - Tests all protocol combinations: auto-MCP-preferred, auto-HTTP-preferred, MCP-only, HTTP-only
5637 | - Validates protocol detection, fallback behavior, and error handling
5638 | - Demonstrates graceful degradation capabilities
5639 | - **Backward Compatibility**: Existing hook configurations continue working unchanged
5640 | - **Enhanced Debugging**: Protocol selection and connection status clearly reported
5641 |
5642 | #### Technical Implementation
5643 | - **Protocol Abstraction Layer**: Single interface for memory operations regardless of protocol
5644 | - **Smart Connection Logic**: Connection attempts with timeouts, fallback sequencing
5645 | - **Memory Query Unification**: Semantic search, time-based queries work identically across protocols
5646 | - **Storage Backend Detection**: Enhanced parsing for both HTTP JSON responses and MCP tool output
5647 |
5648 | #### Benefits for Different Use Cases
5649 | - **Claude Desktop Users**: Better reliability with HTTP fallback when MCP struggles
5650 | - **VS Code Extension Users**: Optimized for HTTP-based deployments
5651 | - **CI/CD Systems**: More robust memory operations in automated environments
5652 | - **Development Workflows**: Local MCP for speed, HTTP for production consistency
5653 |
5654 | ## [6.19.0] - 2024-09-24
5655 |
5656 | ### 🔧 **Configuration Validation Scripts Consolidation**
5657 |
5658 | #### Improvements
5659 | - **Consolidated validation scripts** - Merged `validate_config.py` and `validate_configuration.py` into comprehensive `validate_configuration_complete.py`
5660 | - ✅ Multi-platform support (Windows/macOS/Linux)
5661 | - ✅ All configuration sources validation (.env, Claude Desktop, Claude Code)
5662 | - ✅ Cross-configuration consistency checking
5663 | - ✅ Enhanced API token validation with known invalid token detection
5664 | - ✅ Improved error reporting and recommendations
5665 | - ✅ Windows console compatibility (no Unicode issues)
5666 |
5667 | #### Removed
5668 | - ❌ **Deprecated scripts**: `validate_config.py` and `validate_configuration.py` (redundant)
5669 |
5670 | #### Fixed
5671 | - **Cloudflare Backend Critical Issue**: Implemented missing `recall` method in CloudflareStorage class
5672 | - ✅ Dual search strategy (semantic + time-based)
5673 | - ✅ Graceful fallback mechanism
5674 | - ✅ Comprehensive error handling
5675 | - ✅ Time filtering support
5676 |
5677 | #### Documentation Updates
5678 | - **Updated all documentation references** to use new consolidated validation script
5679 | - **Created comprehensive API token setup guide** (`docs/troubleshooting/cloudflare-api-token-setup.md`)
5680 |
5681 | ## [6.18.0] - 2025-09-23
5682 |
5683 | ### 🚀 **Cloudflare Dual-Environment Configuration Suite**
5684 |
5685 | #### New Diagnostic Tools
5686 | - **Added comprehensive backend configuration diagnostic script** (`scripts/validation/diagnose_backend_config.py`)
5687 | - Environment file validation with masked sensitive data display
5688 | - Environment variable loading verification with dotenv support
5689 | - Configuration module import testing with clear error reporting
5690 | - Storage backend creation testing with full traceback on failures
5691 | - Status indicators with clear success/warning/error messaging
5692 | - **Enhanced troubleshooting workflow** with step-by-step validation process
5693 |
5694 | #### Documentation Improvements
5695 | - **Created streamlined 5-minute setup guide** (`docs/quick-setup-cloudflare-dual-environment.md`)
5696 | - Comprehensive dual-environment configuration for Claude Desktop + Claude Code
5697 | - Configuration templates with explicit environment variable examples
5698 | - Validation commands with expected health check results
5699 | - Troubleshooting section for common configuration issues
5700 | - Migration guide from SQLite-vec to Cloudflare backend
5701 | - **Fixed incorrect CLAUDE.md documentation** that suggested SQLite-vec as "expected behavior"
5702 | - **Added configuration management best practices** with environment variable precedence
5703 | - **Enhanced troubleshooting sections** with specific solutions for environment variable loading issues
5704 |
5705 | #### Configuration Enhancements
5706 | - **Improved environment variable loading reliability** with explicit MCP server configuration
5707 | - **Added execution context guidance** for different environments (Claude Desktop vs Claude Code)
5708 | - **Enhanced working directory awareness** for proper .env file loading
5709 | - **Better configuration validation** with clear error messages for missing required variables
5710 |
5711 | #### Technical Improvements
5712 | - **Unified diagnostic approach** for both Cloudflare and SQLite-vec backends
5713 | - **Enhanced error reporting** with masked sensitive data for security
5714 | - **Improved configuration precedence handling** between global and project settings
5715 | - **Better cross-platform path handling** for Windows environments
5716 |
5717 | #### Benefits for Users
5718 | - **Eliminates configuration confusion** between different execution environments
5719 | - **Provides clear validation tools** to quickly identify and resolve setup issues
5720 | - **Ensures consistent backend usage** across Claude Desktop and Claude Code
5721 | - **Streamlines Cloudflare backend adoption** with comprehensive setup guidance
5722 | - **Reduces setup time** from complex debugging to 5-minute guided process
5723 |
5724 | ## [6.17.2] - 2025-09-23
5725 |
5726 | ### 🔧 **Development Environment Stability Fix**
5727 |
5728 | #### Module Isolation Improvements
5729 | - **Enhanced script module loading** in `scripts/server/run_memory_server.py` to prevent version conflicts
5730 | - **Added module cache clearing** to remove conflicting cached imports before loading local development code
5731 | - **Improved path prioritization** to ensure local `src/` directory takes precedence over installed packages
5732 | - **Better logging** shows exactly which modules are being cleared and paths being added for debugging
5733 |
5734 | #### Technical Improvements
5735 | - **Prevents import conflicts** between development code and installed package versions
5736 | - **Ensures consistent behavior** when switching between development and production environments
5737 | - **Fixes version mismatch issues** that could cause `ImportError` for missing attributes like `INCLUDE_HOSTNAME`
5738 | - **More robust script execution** with conditional path management based on environment
5739 |
5740 | #### Benefits for Developers
5741 | - **Reliable development environment** - Local changes always take precedence
5742 | - **Easier debugging** - Clear logging of module loading process
5743 | - **Consistent Cloudflare backend** - No more fallback to ChromaDB due to version conflicts
5744 | - **Zero breaking changes** - Maintains compatibility with all existing configurations
5745 |
5746 | ## [6.17.1] - 2025-09-23
5747 |
5748 | ### 🔧 **Script Reorganization Compatibility Hotfix**
5749 |
5750 | #### Backward Compatibility Added
5751 | - **Added compatibility stub** at `scripts/run_memory_server.py` that redirects to new location with helpful migration notices
5752 | - **Updated configuration templates** to use Python module approach as primary method for maximum stability
5753 | - **Added comprehensive migration documentation** for users updating from pre-v6.17.0 versions
5754 | - **Zero disruption approach**: Existing configurations continue working immediately
5755 |
5756 | #### Recommended Launch Methods (in order of stability)
5757 | 1. **`python -m mcp_memory_service.server`** - Most stable, no path dependencies, works across all reorganizations
5758 | 2. **`uv run memory server`** - Integrated with UV tooling, already documented as preferred
5759 | 3. **`scripts/server/run_memory_server.py`** - Direct script execution at new location
5760 | 4. **`scripts/run_memory_server.py`** - Legacy location with backward compatibility (shows migration notice)
5761 |
5762 | #### Documentation Improvements
5763 | - **Enhanced README**: Clear migration notice with multiple working options
5764 | - **Updated examples**: Python module approach as primary recommendation
5765 | - **Migration guide**: Created comprehensive GitHub issue ([#108](https://github.com/doobidoo/mcp-memory-service/issues/108)) with all approaches
5766 | - **Template updates**: Configuration templates now show most stable approaches first
5767 |
5768 | #### Why This Approach
5769 | - **Immediate relief**: No users are blocked during v6.17.0 update
5770 | - **Multiple pathways**: Users can choose the approach that fits their setup
5771 | - **Future-proof**: Python module approach survives any future directory changes
5772 | - **Clear migration path**: Informational notices guide users to better practices without forcing changes
5773 |
5774 | ## [6.17.0] - 2025-09-22
5775 |
5776 | ### 🚀 **Enhanced Installer with Cloudflare Backend Support**
5777 |
5778 | #### Major Installer Improvements
5779 | - **Added Cloudflare backend to installer**: Full support for cloud-first installation workflow
5780 | - **Interactive credential setup**: Guided collection of API token, Account ID, D1 database, and Vectorize index
5781 | - **Automatic .env generation**: Securely saves credentials to project environment file
5782 | - **Connection testing**: Validates Cloudflare API during installation process
5783 | - **Graceful fallbacks**: Falls back to local backends if cloud setup fails
5784 | - **Enhanced backend selection logic**: Usage-based recommendations for optimal backend choice
5785 | - **Production scenarios**: Cloudflare for shared access and cloud storage
5786 | - **Development scenarios**: SQLite-vec for single-user, lightweight setup
5787 | - **Team scenarios**: ChromaDB for multi-client local collaboration
5788 | - **Improved CLI options**: Updated `--storage-backend` with clear use case descriptions
5789 | - **New choices**: `cloudflare` (production), `sqlite_vec` (development), `chromadb` (team), `auto_detect`
5790 | - **Better help text**: Explains when to use each backend option
5791 |
5792 | #### User Experience Enhancements
5793 | - **Interactive backend selection**: Guided setup with compatibility analysis and recommendations
5794 | - **Clear usage guidance**: Backend selection now includes use case scenarios and performance characteristics
5795 | - **Enhanced auto-detection**: Prioritizes most reliable backends for the detected system
5796 | - **Comprehensive documentation**: Updated installation commands and backend comparison table
5797 |
5798 | #### Technical Improvements
5799 | - **Robust error handling**: Comprehensive fallback mechanisms for failed setups
5800 | - **Modular design**: Separate functions for credential collection, validation, and environment setup
5801 | - **Connection validation**: Real-time API testing during Cloudflare backend configuration
5802 | - **Environment file management**: Smart .env file handling that preserves existing settings
5803 |
5804 | #### Benefits for Users
5805 | - **Seamless production setup**: Single command path from installation to Cloudflare backend
5806 | - **Reduced configuration errors**: Automated credential setup eliminates manual .env file creation
5807 | - **Better backend choice**: Clear guidance helps users select optimal storage for their use case
5808 | - **Improved reliability**: Fallback mechanisms ensure installation succeeds even with setup issues
5809 |
5810 | ## [6.16.1] - 2025-09-22
5811 |
5812 | ### 🔧 **Docker Build Hotfix**
5813 |
5814 | #### Infrastructure Fix
5815 | - **Fixed Docker build failure**: Updated Dockerfile script path after v6.15.0 scripts reorganization
5816 | - **Issue**: Docker build failing due to `scripts/install_uv.py` not found
5817 | - **Solution**: Updated path to `scripts/installation/install_uv.py`
5818 | - **Impact**: Restores automated Docker publishing workflows
5819 | - **No functional changes**: Pure infrastructure fix for CI/CD
5820 |
5821 | ## [6.16.0] - 2025-09-22
5822 |
5823 | ### 🔧 **Configuration Management & Backend Selection Fixes**
5824 |
5825 | #### Critical Configuration Issues Resolved
5826 | - **Fixed Cloudflare backend fallback issue**: Resolved service falling back to SQLite-vec despite correct Cloudflare configuration
5827 | - **Root cause**: Configuration module wasn't loading `.env` file automatically
5828 | - **CLI override issue**: CLI default parameter was overriding environment variables
5829 | - **Solution**: Added automatic `.env` loading and fixed CLI parameter precedence
5830 | - **Enhanced environment loading**: Added `load_dotenv()` to configuration initialization
5831 | - **Automatic detection**: Config module now automatically loads `.env` file when present
5832 | - **Backward compatibility**: Graceful fallback if python-dotenv not available
5833 | - **Logging**: Added confirmation logging when environment file is loaded
5834 | - **Fixed CLI parameter precedence**: Changed CLI defaults to respect environment configuration
5835 | - **Server command**: Changed `--storage-backend` default from `'sqlite_vec'` to `None`
5836 | - **Environment priority**: Environment variables now take precedence over CLI defaults
5837 | - **Explicit overrides**: CLI parameters only override when explicitly provided
5838 |
5839 | #### Content Size Management Improvements
5840 | - **Added Cloudflare content limits to context provider**: Enhanced memory management guidance
5841 | - **Content size warnings**: Added ~1500 character limit documentation
5842 | - **Embedding model constraints**: Documented `@cf/baai/bge-base-en-v1.5` strict input limits
5843 | - **Best practices**: Guidance for chunking large content and using document ingestion
5844 | - **Error recognition**: Help identifying "Failed to store vector" errors from size issues
5845 | - **Enhanced troubleshooting**: Better error messages and debugging capabilities for configuration issues
5846 |
5847 | #### Technical Improvements
5848 | - **Configuration validation**: Improved environment variable loading and validation
5849 | - **Error handling**: Better error messages when storage backend initialization fails
5850 | - **Documentation**: Updated context provider with Cloudflare-specific constraints and best practices
5851 |
5852 | #### Benefits for Users
5853 | - **Seamless backend switching**: Cloudflare configuration now works reliably out of the box
5854 | - **Fewer configuration errors**: Automatic environment loading reduces setup friction
5855 | - **Better error diagnosis**: Clear guidance on content size limits and chunking strategies
5856 | - **Improved reliability**: Configuration precedence issues eliminated
5857 |
5858 |
5859 | ---
5860 |
5861 | ## Historic Releases
5862 |
5863 | For older releases (v6.15.1 and earlier), see [CHANGELOG-HISTORIC.md](./CHANGELOG-HISTORIC.md).
5864 |
5865 | **Historic Version Range**: v0.1.0 through v6.15.1 (2025-07-XX through 2025-09-22)
5866 | ## [6.15.1] - 2025-09-22
5867 |
5868 | ### 🔧 **Enhanced Cloudflare Backend Initialization & Diagnostics**
5869 |
5870 | #### Cloudflare Backend Issue Resolution
5871 | - **Fixed silent fallback issue**: Resolved Cloudflare backend falling back to SQLite-vec during MCP startup
5872 | - **Root cause identified**: Silent failures in eager initialization phase were not properly logged
5873 | - **Enhanced error reporting**: Added comprehensive logging with visual indicators for all initialization phases
5874 | - **Improved timeout handling**: Better error messages when Cloudflare initialization times out
5875 | - **Enhanced initialization logging**: Added detailed logging for both eager and lazy initialization paths
5876 | - **Phase indicators**: 🚀 SERVER INIT, ☁️ Cloudflare-specific, ✅ Success markers, ❌ Error indicators
5877 | - **Configuration validation**: Logs all Cloudflare environment variables for troubleshooting
5878 | - **Storage type verification**: Confirms final storage backend type after initialization
5879 | - **Diagnostic improvements**: Created comprehensive diagnostic tools for Cloudflare backend issues
5880 | - **Enhanced diagnostic script**: `debug_server_initialization.py` for testing initialization flows
5881 | - **MCP environment testing**: `tests/integration/test_mcp_environment.py` for testing Claude Desktop integration
5882 | - **Fixed test syntax errors**: Corrected f-string and async function issues in test files
5883 |
5884 | #### Technical Improvements
5885 | - **Fixed `db_utils.py` async issue**: Changed `get_database_stats()` to async function to support Cloudflare storage
5886 | - **Enhanced error tracebacks**: Full exception details now logged for initialization failures
5887 | - **Better fallback documentation**: Clear distinction between eager vs lazy initialization behaviors
5888 |
5889 | #### Troubleshooting Benefits
5890 | - **Faster issue diagnosis**: Clear visual indicators help identify where initialization fails
5891 | - **Better error messages**: Specific error details for common Cloudflare setup issues
5892 | - **Proactive debugging**: Enhanced logging appears in Claude Desktop MCP logs for easier troubleshooting
5893 |
5894 | ## [6.15.0] - 2025-09-22
5895 |
5896 | ### 🗂️ **Scripts Directory Reorganization & Professional Tooling**
5897 |
5898 | #### Major Reorganization
5899 | - **Complete Scripts Restructuring**:
5900 | - ✅ **Organized 62 loose scripts** into 12 logical categories for professional navigation
5901 | - ✅ **Created systematic directory structure** with clear functional grouping
5902 | - ✅ **Zero loose scripts remaining** in root directory - all properly categorized
5903 | - ✅ **Maintained full backward compatibility** - all scripts work exactly as before
5904 | - ✅ **Updated all documentation references** to reflect new paths
5905 |
5906 | #### New Directory Structure
5907 | - **🔄 `sync/`** (4 scripts) - Backend synchronization utilities
5908 | - **🛠️ `service/`** (5 scripts) - Service management and deployment
5909 | - **✅ `validation/`** (7 scripts) - Configuration and system validation
5910 | - **🗄️ `database/`** (4 scripts) - Database analysis and health monitoring
5911 | - **🧹 `maintenance/`** (7 scripts) - Database cleanup and repair operations
5912 | - **💾 `backup/`** (4 scripts) - Backup and restore operations
5913 | - **🔄 `migration/`** (11 scripts) - Data migration and schema updates
5914 | - **🏠 `installation/`** (8 scripts) - Setup and installation scripts
5915 | - **🖥️ `server/`** (5 scripts) - Server runtime and operational scripts
5916 | - **🧪 `testing/`** (15 scripts) - Test scripts and validation
5917 | - **🔧 `utils/`** (7 scripts) - General utility scripts and wrappers
5918 | - **🛠️ `development/`** (6 scripts) - Development tools and debugging utilities
5919 |
5920 | #### Enhanced Documentation
5921 | - **✅ Complete README.md rewrite** with comprehensive script index and usage examples
5922 | - **✅ Quick reference guide** for essential daily operations
5923 | - **✅ Detailed directory explanations** with purpose and key features
5924 | - **✅ Safety guidelines** and execution best practices
5925 | - **✅ Common use case workflows** for setup, operations, troubleshooting, and migration
5926 | - **✅ Integration documentation** linking to project wiki and guides
5927 |
5928 | #### User Experience Improvements
5929 | - **🎯 Faster script discovery** - find tools by logical function instead of hunting through 62 files
5930 | - **📚 Professional documentation** with tables, examples, and clear categorization
5931 | - **🚀 Quick-start examples** for common operations and troubleshooting
5932 | - **🛡️ Safety-first approach** with dry-run recommendations and backup guidelines
5933 | - **🔗 Seamless integration** with existing CLAUDE.md, AGENTS.md, and documentation
5934 |
5935 | #### Maintainability Enhancements
5936 | - **🏗️ Logical organization** makes adding new scripts intuitive
5937 | - **📝 Clear naming conventions** and directory purposes
5938 | - **🔄 Future-proof structure** that scales with project growth
5939 | - **✅ Consistent documentation patterns** across all categories
5940 | - **🧪 Verified functionality** - all critical scripts tested post-reorganization
5941 |
5942 | #### Files Updated (4):
5943 | - **`scripts/README.md`** - COMPLETE REWRITE: Professional documentation with comprehensive index
5944 | - **`CLAUDE.md`** - UPDATED: All script paths updated to new locations
5945 | - **`AGENTS.md`** - UPDATED: Development workflow script references
5946 | - **`CHANGELOG.md`** - UPDATED: Historical script references to new paths
5947 |
5948 | #### Impact
5949 | - 🎯 **Transforms user experience** from cluttered file hunting to professional navigation
5950 | - 🚀 **Enables faster development** with logical script organization
5951 | - 💻 **Simplifies maintenance** with clear categorization and documentation
5952 | - ✅ **Professional appearance** suitable for enterprise deployments
5953 | - 🔄 **Supports scalable growth** with extensible directory structure
5954 | - 🛡️ **Improves safety** with comprehensive usage guidelines and best practices
5955 |
5956 | This release transforms the scripts directory from a disorganized collection into a professional, enterprise-ready toolkit that significantly improves developer and user experience while maintaining full functionality.
5957 |
5958 | ## [6.14.0] - 2025-09-22
5959 |
5960 | ### 🛠️ **Operational Utilities & Backend Synchronization**
5961 |
5962 | #### New Backend Synchronization Capabilities
5963 | - **Bidirectional Sync Engine**:
5964 | - ✅ `sync_memory_backends.py` - Core sync logic with intelligent deduplication
5965 | - ✅ `claude_sync_commands.py` - User-friendly CLI wrapper for sync operations
5966 | - ✅ Supports Cloudflare ↔ SQLite-vec synchronization with dry-run mode
5967 | - ✅ Content-based hashing prevents duplicates across backends
5968 | - ✅ Comprehensive status reporting and error handling
5969 | - **Service Management**:
5970 | - ✅ `memory_service_manager.sh` - Linux service management for dual-backend deployments
5971 | - ✅ State-based backend detection using `/tmp/memory-service-backend.state`
5972 | - ✅ Environment file management for Cloudflare and SQLite configurations
5973 | - ✅ Integrated sync operations and health monitoring
5974 | - **Configuration Validation**:
5975 | - ✅ `validate_config.py` - Comprehensive configuration validator
5976 | - ✅ Validates Claude Code global configuration (~/.claude.json)
5977 | - ✅ Checks Cloudflare credentials and environment setup
5978 | - ✅ Detects configuration conflicts and provides solutions
5979 | - **Documentation & Guides**:
5980 | - ✅ Updated `scripts/README.md` with comprehensive utility documentation
5981 | - ✅ Added backend sync references to main `README.md` and `CLAUDE.md`
5982 | - ✅ Created `Backend-Synchronization-Guide.md` wiki page with complete setup guide
5983 |
5984 | #### Code Quality Improvements (Gemini Code Assist Feedback)
5985 | - **Eliminated Code Duplication**:
5986 | - ✅ Refactored `sync_memory_backends.py` to use shared `_sync_between_backends()` method
5987 | - ✅ Reduced ~80 lines of duplicate code, improved maintainability
5988 | - **Cross-Platform Compatibility**:
5989 | - ✅ Replaced hardcoded `/home/hkr/` paths with `$HOME` variable
5990 | - ✅ Added missing final newlines to all utility scripts
5991 | - **Enhanced Validation & Robustness**:
5992 | - ✅ Improved configuration validation with regex patterns instead of string matching
5993 | - ✅ Added UTF-8 encoding to all file operations in `validate_config.py`
5994 | - ✅ Fixed `.env.sqlite` conflict detection logic
5995 | - **Better Code Organization**:
5996 | - ✅ Refactored command handling to dictionary-based dispatch pattern
5997 | - ✅ Improved scalability for future command additions
5998 |
5999 | #### Production Deployment Features
6000 | - **Hybrid Cloud/Local Deployments**: Enable Cloudflare primary with SQLite backup
6001 | - **Disaster Recovery**: Automated backup and restore capabilities
6002 | - **Multi-Machine Sync**: Consistent memory sharing across devices
6003 | - **Development/Production Workflows**: Seamless sync between environments
6004 | - **Troubleshooting Tools**: Configuration validation and service management
6005 |
6006 | #### Impact
6007 | - 🎯 **Fills critical operational gaps** for production deployments
6008 | - 🚀 **Enables advanced deployment strategies** (hybrid cloud/local)
6009 | - 💻 **Simplifies troubleshooting** with validation and management tools
6010 | - ✅ **Professional code quality** meeting all review standards
6011 | - 🔄 **Supports complex workflows** for distributed teams
6012 |
6013 | #### Files Added/Modified (8):
6014 | - `scripts/sync/sync_memory_backends.py` - NEW: Bidirectional sync engine
6015 | - `scripts/sync/claude_sync_commands.py` - NEW: CLI wrapper for sync operations
6016 | - `scripts/service/memory_service_manager.sh` - NEW: Linux service manager
6017 | - `scripts/validation/validate_config.py` - NEW: Configuration validator
6018 | - `scripts/README.md` - UPDATED: Comprehensive utility documentation
6019 | - `README.md` - UPDATED: Added troubleshooting references
6020 | - `CLAUDE.md` - UPDATED: Added sync and validation commands
6021 | - Wiki: `Backend-Synchronization-Guide.md` - NEW: Complete sync setup guide
6022 |
6023 | ## [6.13.8] - 2025-09-21
6024 |
6025 | ### 🔧 **Integration Completion**
6026 |
6027 | #### Cloudflare Storage Backend Full Integration
6028 | - **Fixed critical integration gaps**: Cloudflare backend now has complete feature parity with sqlite_vec and chroma
6029 | - **Health Check Recognition**:
6030 | - ✅ **Resolved "Unknown storage type: CloudflareStorage" errors**
6031 | - ✅ Health check now properly validates Cloudflare storage and returns "healthy" status
6032 | - ✅ Added Cloudflare support to `server.py` health validation (lines 3410-3450)
6033 | - ✅ Added Cloudflare support to `db_utils.py` validation, stats, and repair functions
6034 | - **Complete CLI Integration**:
6035 | - ✅ Added 'cloudflare' option to all CLI storage backend choices
6036 | - ✅ Updated `cli/main.py`, `cli/ingestion.py` with cloudflare backend support
6037 | - ✅ Added CloudflareStorage initialization logic to `cli/utils.py`
6038 | - ✅ Updated configuration documentation to include cloudflare option
6039 | - **Documentation & Startup Guidance**:
6040 | - ✅ **Critical**: Added warning about inappropriate use of `memory_offline.py` with Cloudflare backend
6041 | - ✅ Cloudflare uses Workers AI for embeddings - offline mode breaks this functionality
6042 | - ✅ Added proper startup script recommendations in `docs/cloudflare-setup.md`
6043 | - ✅ Recommended: `uv run memory server`, `python scripts/run_memory_server.py`
6044 | - **Enhanced Test Coverage**:
6045 | - ✅ Added comprehensive tests for tag sanitization method
6046 | - ✅ Verified existing extensive test suite covers all major functionality
6047 | - **Impact**:
6048 | - 🎯 **Cloudflare backend is now a first-class citizen** alongside sqlite_vec and chroma
6049 | - 🚀 **Complete health check integration** - no more "Unknown storage type" errors
6050 | - 💻 **Full CLI support** for cloudflare backend selection
6051 | - 📚 **Clear startup guidance** prevents Workers AI compatibility issues
6052 | - ✅ **Production ready** for distributed teams and cloud-native deployments
6053 |
6054 | #### Files Modified (11):
6055 | - `src/mcp_memory_service/server.py` - Added Cloudflare health check case
6056 | - `src/mcp_memory_service/utils/db_utils.py` - Added validation, stats, repair support
6057 | - `src/mcp_memory_service/cli/main.py` - Added cloudflare CLI option
6058 | - `src/mcp_memory_service/cli/ingestion.py` - Added cloudflare CLI option
6059 | - `src/mcp_memory_service/cli/utils.py` - Added CloudflareStorage initialization
6060 | - `src/mcp_memory_service/config.py` - Updated backend documentation
6061 | - `docs/cloudflare-setup.md` - Added startup script guidance and warnings
6062 | - `tests/unit/test_cloudflare_storage.py` - Enhanced test coverage
6063 | - `src/mcp_memory_service/__init__.py` - Version bump to 6.13.8
6064 | - `pyproject.toml` - Version bump to 6.13.8
6065 |
6066 | ## [6.13.7] - 2025-09-20
6067 |
6068 | ### 🐛 **Critical Bug Fixes**
6069 |
6070 | #### Cloudflare Vectorize ID Length Issue Fixed
6071 | - **Fixed critical bug**: Resolved Cloudflare Vectorize vector ID length limit error
6072 | - **Root Cause**: CloudflareStorage was using `"mem_" + content_hash` format for vector IDs (68 characters)
6073 | - **Cloudflare Limit**: Vectorize has a 64-byte maximum ID length restriction
6074 | - **Solution**: Removed "mem_" prefix, now using `content_hash` directly (64 characters)
6075 | - **Impact**: **Enables proper bidirectional sync** between multiple machines using Cloudflare backend
6076 | - **Error Fixed**: `"id too long; max is 64 bytes, got 68 bytes"` when storing memories
6077 | - **Affects**: All users using Cloudflare backend for memory storage
6078 | - **Backward Compatibility**: ⚠️ **Breaking change** - existing Cloudflare vector IDs will have different format
6079 | - **Migration**: Users with existing Cloudflare deployments may need to re-import memories
6080 | - **Benefits**:
6081 | - ✅ Cloudflare backend now works reliably for memory storage
6082 | - ✅ Multi-machine sync scenarios (e.g., replacing failed servers) now supported
6083 | - ✅ Consistent vector ID format aligns with Cloudflare specifications
6084 | - **Files Modified**: `src/mcp_memory_service/storage/cloudflare.py:295`
6085 |
6086 | #### Multi-Machine Sync Capability
6087 | - **New capability**: Cloudflare can now serve as central memory hub for multiple machines
6088 | - **Use case**: Replacement for failed centralized servers (e.g., narrowbox failures)
6089 | - **Implementation**: Dual storage strategy with Cloudflare primary + local sqlite_vec backup
6090 | - **Tested**: Bidirectional sync verified between macOS machines using Cloudflare D1 + Vectorize
6091 |
6092 | ## [6.13.6] - 2025-09-16
6093 |
6094 | ### 📚 **Documentation**
6095 |
6096 | #### Added AGENTS.md for AI Coding Agents
6097 | - **New standard format**: Added `AGENTS.md` following the industry-standard [agents.md](https://agents.md/) specification
6098 | - **Purpose**: Provides AI coding agents with project-specific instructions and context
6099 | - **Compatibility**: Works with GitHub Copilot, Cursor, VS Code, Continue, and other AI tools
6100 | - **Complements CLAUDE.md**: Generic instructions for all AI agents vs Claude-specific in CLAUDE.md
6101 | - **Content includes**:
6102 | - Setup commands and testing procedures
6103 | - Project structure and key files overview
6104 | - Code style guidelines and conventions
6105 | - Common development tasks and patterns
6106 | - Security guidelines and debugging tips
6107 | - **Benefits**:
6108 | - Standardized location for AI agent instructions (becoming industry standard)
6109 | - Improved developer experience when using AI coding assistants
6110 | - Better onboarding for contributors using AI tools
6111 | - **Files Added**: `AGENTS.md`
6112 |
6113 | #### Added CONTRIBUTING.md for Contributor Guidelines
6114 | - **Fixed dead link**: Resolved broken reference in README.md line 195
6115 | - **Comprehensive guidelines**: Added detailed contribution instructions including:
6116 | - Development environment setup with platform-specific notes
6117 | - Code style and Python conventions following PEP 8
6118 | - Testing requirements with pytest examples
6119 | - Semantic commit message format
6120 | - Pull request process and review guidelines
6121 | - **Code of Conduct**: Included basic behavioral guidelines for inclusive community
6122 | - **Multiple contribution paths**: Documented various ways to contribute (code, docs, testing, support)
6123 | - **Integration**: Links to existing documentation (AGENTS.md, CLAUDE.md, Wiki)
6124 | - **Files Added**: `CONTRIBUTING.md`
6125 |
6126 | ## [6.13.5] - 2025-09-15
6127 |
6128 | ### 🐛 **Bug Fixes**
6129 |
6130 | #### macOS Service Installation Script Fix (PR #101)
6131 | - **Fixed NameError**: Resolved `NameError: name 'paths' is not defined` in `install_macos_service.py` at line 238
6132 | - **Root Cause**: Variable `paths` was referenced in `platform_info` dictionary without being initialized
6133 | - **Solution**: Added `paths = get_service_paths()` call before usage, following existing code patterns
6134 | - **Impact**: macOS service installation now works reliably without runtime errors
6135 | - **Credit**: Thanks to @hex for identifying and fixing this issue
6136 | - **Files Modified**: `scripts/install_macos_service.py`
6137 |
6138 | ## [6.13.4] - 2025-09-14
6139 |
6140 | ### 🐛 **Critical Bug Fixes**
6141 |
6142 | #### Memory Search Timezone Inconsistency (Fixes Issue #99)
6143 | - **Fixed timezone handling bug**: Resolved critical inconsistency in timestamp validation between hook-generated and manual memories
6144 | - **Root Cause**: Memory model was incorrectly interpreting ISO timestamps without 'Z' suffix as local time instead of UTC
6145 | - **Solution**: Enhanced `iso_to_float()` function with explicit UTC handling using `calendar.timegm()`
6146 | - **Impact**: Time-based memory searches (e.g., "yesterday", "last week") now consistently find all memories regardless of storage method
6147 | - **Improved timestamp validation**: Enhanced `_sync_timestamps()` method with better timezone mismatch detection
6148 | - Added logic to detect timezone offset discrepancies between float and ISO timestamps
6149 | - Automatic correction when timezone issues detected (prefers float timestamp as authoritative)
6150 | - Better logging for timezone validation issues during memory creation
6151 | - **Comprehensive test coverage**: Added extensive test suite validating fix effectiveness
6152 | - `test_hook_vs_manual_storage.py`: Validates consistency between hook and manual memory storage
6153 | - `test_issue99_final_validation.py`: Confirms timezone fix resolves the original issue
6154 | - `test_search_retrieval_inconsistency.py`: Root cause analysis and validation tests
6155 | - `test_data_serialization_consistency.py`: Memory serialization consistency validation
6156 |
6157 | ### 🔧 **Technical Improvements**
6158 | - **Memory Model Enhancement**: Strengthened timestamp handling throughout the memory lifecycle
6159 | - More robust ISO string parsing with fallback mechanisms
6160 | - Better error handling for edge cases in timestamp conversion
6161 | - Consistent UTC interpretation across all timestamp operations
6162 |
6163 | ### 📚 **Documentation Updates**
6164 | - **Issue Resolution**: GitHub Issue #99 documented and resolved with comprehensive technical analysis
6165 | - **Test Documentation**: Added detailed test suite documentation for memory storage consistency
6166 |
6167 | ## [6.13.3] - 2025-09-03
6168 |
6169 | ### 🐛 **Critical Bug Fixes**
6170 |
6171 | #### macOS SQLite Extension Support (Fixes Issue #97)
6172 | - **Fixed AttributeError**: Resolved `'sqlite3.Connection' object has no attribute 'enable_load_extension'` error on macOS
6173 | - Added comprehensive extension support detection before attempting to load sqlite-vec
6174 | - Graceful error handling with clear, actionable error messages
6175 | - Platform-specific guidance for macOS users (Homebrew Python, pyenv with extension support)
6176 | - Interactive prompt to switch to ChromaDB backend when extensions unavailable
6177 | - **Enhanced sqlite_vec.py**: Added `_check_extension_support()` method with robust error handling
6178 | - **Improved install.py**: Added SQLite extension support detection and warnings during installation
6179 |
6180 | ### 📚 **Documentation Updates**
6181 |
6182 | #### macOS Extension Loading Documentation
6183 | - **README Updates**: Added dedicated macOS SQLite extension support section with solutions
6184 | - **First-Time Setup Guide**: Comprehensive macOS extension issues section with verification commands
6185 | - **Troubleshooting Guide**: Detailed troubleshooting for `enable_load_extension` AttributeError
6186 | - **Clear Solutions**: Step-by-step instructions for Homebrew Python and pyenv with extension support
6187 |
6188 | ### 🔧 **Installation Improvements**
6189 | - **Proactive Detection**: Installer now checks SQLite extension support before attempting sqlite-vec installation
6190 | - **Interactive Fallback**: Option to automatically switch to ChromaDB when sqlite-vec cannot work
6191 | - **Better Error Messages**: Platform-specific solutions instead of cryptic errors
6192 | - **System Information**: Enhanced system info display includes SQLite extension support status
6193 |
6194 | ### 🏥 **Error Handling**
6195 | - **Runtime Protection**: sqlite-vec backend now fails gracefully with helpful error messages
6196 | - **Clear Guidance**: Detailed error messages explain why the error occurs and provide multiple solutions
6197 | - **Automatic Detection**: System automatically detects extension support capabilities
6198 |
6199 | ## [6.13.2] - 2025-09-03
6200 |
6201 | ### 🐛 **Bug Fixes**
6202 |
6203 | #### Python 3.13 Compatibility (Fixes Issue #96)
6204 | - **Enhanced sqlite-vec Installation**: Added intelligent fallback strategies for Python 3.13 where pre-built wheels are not yet available
6205 | - Automatic retry with multiple installation methods (uv pip, standard pip, source build, GitHub install)
6206 | - Clear guidance for alternative solutions (Python 3.12, ChromaDB backend)
6207 | - Interactive prompt to switch backends if sqlite-vec installation fails
6208 | - **Improved Error Messages**: Better error reporting with actionable manual installation options
6209 | - **uv Package Manager Support**: Prioritizes uv pip when available for better dependency resolution
6210 |
6211 | ### 📚 **Documentation Updates**
6212 |
6213 | #### Python 3.13 Support Documentation
6214 | - **README Updates**: Added Python 3.13 compatibility note with recommended solutions
6215 | - **First-Time Setup Guide**: New section on Python 3.13 known issues and workarounds
6216 | - **Troubleshooting Guide**: Comprehensive sqlite-vec installation troubleshooting for Python 3.13
6217 | - **Clear Migration Path**: Step-by-step instructions for using Python 3.12 or switching to ChromaDB
6218 |
6219 | ### 🔧 **Installation Improvements**
6220 | - **Multi-Strategy Installation**: Installer now tries 5 different methods before failing
6221 | - **Source Build Fallback**: Attempts to build from source when wheels are unavailable
6222 | - **GitHub Direct Install**: Falls back to installing directly from sqlite-vec repository
6223 | - **Backend Switching**: Option to automatically switch to ChromaDB if sqlite-vec fails
6224 |
6225 | ## [6.13.1] - 2025-09-03
6226 |
6227 | ### 📚 **Documentation & User Experience**
6228 |
6229 | #### First-Time Setup Documentation (Addresses Issue #95)
6230 | - **Added First-Time Setup Section**: New prominent section in README.md explaining expected warnings on initial run
6231 | - **Created Comprehensive Guide**: New `docs/first-time-setup.md` with detailed explanations of:
6232 | - Normal warnings vs actual errors
6233 | - Model download process (~25MB, 1-2 minutes)
6234 | - Success indicators and verification steps
6235 | - Ubuntu 24-specific installation instructions
6236 | - **Enhanced Troubleshooting**: Updated `docs/troubleshooting/general.md` with first-time warnings section
6237 | - **Improved Installer Messages**: Enhanced `install.py` with clear first-time setup expectations and progress indicators
6238 |
6239 | ### 🐛 **Bug Fixes**
6240 |
6241 | #### User Experience Improvements
6242 | - **Fixed Issue #95**: Clarified that "No snapshots directory" warning is normal on first run
6243 | - **Addressed Confusion**: Distinguished between expected initialization warnings and actual errors
6244 | - **Ubuntu 24 Support**: Added specific documentation for Ubuntu 24 installation issues
6245 |
6246 | ### 📝 **Changes**
6247 | - Added clear messaging that warnings disappear after first successful run
6248 | - Included estimated download times and model sizes in documentation
6249 | - Improved installer output to set proper expectations for first-time users
6250 |
6251 | ## [6.13.0] - 2025-08-25
6252 |
6253 | ### ⚡ **Major Features**
6254 |
6255 | #### Enhanced Storage Backend Visibility & Health Integration
6256 | - **Health Check Integration**: Claude Code hooks now use `/api/health/detailed` endpoint for **authoritative storage information**
6257 | - **Real-time Backend Detection**: Queries live health data instead of environment variables
6258 | - **Rich Storage Information**: Displays memory count, database size, connection status, and embedding model
6259 | - **Comprehensive Database Stats**: Shows unique tags, file paths, platform info, and uptime
6260 | - **Fallback Strategy**: Health check → Environment variables → Configuration inference
6261 |
6262 | - **Enhanced Console Output**:
6263 | - **Brief Mode**: `💾 Storage → 🪶 sqlite-vec (Connected) • 990 memories • 5.21MB`
6264 | - **Detailed Mode**: Separate lines for storage type, location, and database statistics
6265 | - **Icon-Only Mode**: Minimal display with backend type and memory count
6266 | - **Path Display**: Shows actual database file locations from health data
6267 |
6268 | - **Context Message Enhancement**:
6269 | - **Storage Section**: Includes backend type, connection status, memory count, and database size
6270 | - **Location Info**: Real file paths from health endpoint rather than configuration guesses
6271 | - **Model Information**: Displays active embedding model (e.g., all-MiniLM-L6-v2)
6272 | - **Health Metadata**: Platform info and database accessibility status
6273 |
6274 | ### 🔧 **Configuration Enhancements**
6275 |
6276 | #### New Health Check Settings
6277 | - **`memoryService.healthCheckEnabled`**: Enable/disable health endpoint queries (default: true)
6278 | - **`memoryService.healthCheckTimeout`**: Timeout for health requests in milliseconds (default: 3000)
6279 | - **`memoryService.useDetailedHealthCheck`**: Use `/api/health/detailed` vs `/api/health` (default: true)
6280 | - **Enhanced Display Modes**: `sourceDisplayMode` supports "brief", "detailed", "icon-only"
6281 |
6282 | ### 🐛 **Critical Bug Fixes**
6283 |
6284 | #### Windows Path Resolution Issues
6285 | - **Git Analyzer**: Fixed Windows path handling in `execSync` calls using `path.resolve()`
6286 | - **Project Detector**: Resolved Windows path issues in git command execution
6287 | - **Path Normalization**: All working directory paths properly normalized for cross-platform compatibility
6288 |
6289 | #### Memory Context Display Improvements
6290 | - **Content Length Limits**: Increased from 300→500 characters to prevent truncation
6291 | - **CLI Formatting**: Enhanced from 180→400 chars for better context visibility
6292 | - **Categorized Display**: Improved from 160→350 chars for categorized memories
6293 | - **Deduplication Logging**: Fixed misleading "8 → 2" messages, now shows actual selection counts
6294 |
6295 | #### Output Cleaning & Visual Improvements
6296 | - **Session Hook Tags**: Added cleaning logic to remove `<session-start-hook>` wrapper tags
6297 | - **Memory Categories**: Enhanced category titles (e.g., "Recent Work (Last 7 days)", "Bug Fixes & Issues")
6298 | - **Better Hierarchy**: Improved visual organization and color coding
6299 | - **Configurable Limits**: All content length limits now configurable via config.json
6300 |
6301 | ### 💡 **Smart Detection Improvements**
6302 |
6303 | #### Backend Detection Hierarchy
6304 | 1. **Health Endpoint** (Primary): Authoritative data from running service
6305 | 2. **Environment Variables** (Secondary): MCP_MEMORY_STORAGE_BACKEND detection
6306 | 3. **Configuration Inference** (Fallback): Endpoint-based local/remote classification
6307 |
6308 | #### Supported Backend Types
6309 | - **SQLite-vec**: 🪶 Local database with file path and size information
6310 | - **ChromaDB**: 📦 Local or 🌐 Remote with endpoint details
6311 | - **Cloudflare**: ☁️ Cloud service with account information
6312 | - **Generic Services**: 💾 Local or 🌐 Remote MCP services
6313 |
6314 | ### 🎯 **Performance & Reliability**
6315 |
6316 | #### Health Check Implementation
6317 | - **Non-blocking**: Async health queries don't slow session start
6318 | - **Timeout Protection**: 3-second default timeout prevents hanging
6319 | - **Error Handling**: Graceful fallback to configuration-based detection
6320 | - **Caching**: Health info cached during session to avoid repeated calls
6321 |
6322 | ## [6.12.0] - 2025-08-25
6323 |
6324 | ### ⚡ **Major Features**
6325 |
6326 | #### Git-Aware Memory Retrieval System
6327 | - **Repository Context Analysis**: Session hooks now analyze git commit history and changelog entries
6328 | - **Git Context Analyzer**: New utility (`git-analyzer.js`) extracts development keywords from recent commits
6329 | - **Commit Mining**: Analyzes last 14 days of commits to understand development patterns
6330 | - **Changelog Integration**: Parses CHANGELOG.md to identify recent development themes
6331 | - **Smart Query Generation**: Creates git-informed semantic queries for memory retrieval
6332 |
6333 | - **Multi-Phase Memory Retrieval Enhancement**:
6334 | - **Phase 0 (NEW)**: Git-aware memory search using repository context (highest priority)
6335 | - **Phase 1**: Recent memories enhanced with git development keywords
6336 | - **Phase 2**: Important tagged memories with framework/language context
6337 | - **Phase 3**: Fallback general context with extended time windows
6338 |
6339 | - **Enhanced Context Categorization**:
6340 | - **"Current Development" Category**: New category for git-context derived memories
6341 | - **Repository-Aware Scoring**: Memories aligned with recent commits get higher relevance scores
6342 | - **Development Timeline Integration**: Memory selection based on actual coding activity
6343 |
6344 | ### 🔧 **Configuration Enhancements**
6345 |
6346 | #### New Git Analysis Settings
6347 | - **`gitAnalysis.enabled`**: Enable/disable git context analysis (default: true)
6348 | - **`gitAnalysis.commitLookback`**: Days of commit history to analyze (default: 14)
6349 | - **`gitAnalysis.maxCommits`**: Maximum commits to process (default: 20)
6350 | - **`gitAnalysis.includeChangelog`**: Parse changelog for context (default: true)
6351 | - **`gitAnalysis.maxGitMemories`**: Memory slots reserved for git context (default: 3)
6352 | - **`gitAnalysis.gitContextWeight`**: Relevance multiplier for git-derived memories (default: 1.2)
6353 |
6354 | #### Enhanced Output Control
6355 | - **`output.showGitAnalysis`**: Display git analysis information (default: true)
6356 | - **`output.showPhaseDetails`**: Show detailed phase execution info (default: true)
6357 | - **Improved Memory Ratio Configuration**: `recentMemoryRatio`, `recentTimeWindow`, `fallbackTimeWindow`
6358 |
6359 | ### 💡 **Smart Query Improvements**
6360 |
6361 | #### Development-Aware Semantic Queries
6362 | - **Commit Message Context**: Latest commit messages influence memory search
6363 | - **File Pattern Recognition**: Recently changed files inform query building
6364 | - **Technical Keyword Extraction**: Action words (feat, fix, refactor) enhance search relevance
6365 | - **Branch-Aware Queries**: Git branch context integrated into semantic search
6366 |
6367 | ### 🎯 **Memory Relevance Enhancements**
6368 |
6369 | #### Repository Activity Integration
6370 | - **Development Intensity Scoring**: High commit activity increases recent memory priority
6371 | - **File-Based Context**: Memories related to recently changed files get boosted relevance
6372 | - **Changelog Correlation**: Memory selection aligned with documented changes
6373 | - **Temporal Context Weighting**: Recent development activity influences memory scoring
6374 |
6375 | ### 🚀 **Performance & Reliability**
6376 |
6377 | #### Git Integration Optimizations
6378 | - **Lazy Git Analysis**: Only processes git context when repository detected
6379 | - **Performance Limits**: Configurable commit analysis limits to prevent slowdowns
6380 | - **Graceful Degradation**: Falls back to standard retrieval if git analysis fails
6381 | - **Async Processing**: Non-blocking git analysis for faster session startup
6382 |
6383 | ### 📊 **Enhanced Debugging & Monitoring**
6384 |
6385 | #### Git Analysis Visibility
6386 | - **Git Context Reporting**: Shows analyzed commits, changelog entries, and extracted keywords
6387 | - **Phase Execution Details**: Clear indication of which phase found which memories
6388 | - **Query Source Tracking**: Memories tagged with their retrieval source (git-commits, git-files, etc.)
6389 | - **Development Keywords Display**: Shows extracted technical terms from recent activity
6390 |
6391 | ### 🔄 **Backward Compatibility**
6392 |
6393 | #### Seamless Integration
6394 | - **Legacy Mode Support**: `recentFirstMode: false` preserves original behavior
6395 | - **Configuration Migration**: All existing configurations continue to work
6396 | - **Optional Git Features**: Git analysis can be completely disabled if needed
6397 | - **Incremental Adoption**: Features can be enabled progressively
6398 |
6399 | ---
6400 |
6401 | ## [6.11.1] - 2025-08-25
6402 |
6403 | ### 🐛 **Bug Fixes**
6404 |
6405 | #### Windows Path Configuration Issues
6406 | - **Claude Code Hooks Installation**: Fixed Windows-specific path configuration issues
6407 | - **Legacy Path Cleanup**: Removed outdated `.claude-code` references from installation scripts
6408 | - **Windows Batch File**: Updated help text to use correct `.claude\hooks` directory structure
6409 | - **PowerShell Script**: Cleaned up legacy path alternatives for better reliability
6410 | - **Impact**: Windows users no longer encounter `.claude-code` vs `.claude` directory confusion
6411 |
6412 | #### Enhanced Documentation
6413 | - **Windows Installation Guide**: Added comprehensive Windows-specific installation and troubleshooting section
6414 | - **Path Format Guidance**: Clear instructions for JSON path formatting (forward slashes vs backslashes)
6415 | - **Common Issues**: Solutions for `session-start-wrapper.bat` errors and legacy directory migration
6416 | - **Settings Examples**: Proper Windows configuration examples with correct Node.js script paths
6417 | - **Impact**: Windows users have clear guidance for resolving path configuration issues
6418 |
6419 | #### Path Validation Utilities
6420 | - **Automated Detection**: Added path validation functions to detect and warn about configuration issues
6421 | - **Legacy Path Detection**: Automatically identifies old `.claude-code` directories and provides migration steps
6422 | - **Settings Validation**: Validates JSON settings files for Windows path issues and missing files
6423 | - **Path Normalization**: Utility to convert Windows backslash paths to JSON-compatible format
6424 | - **Validation Command**: New `python scripts/claude_commands_utils.py --validate` command for configuration checking
6425 | - **Impact**: Proactive detection and resolution of Windows path issues during installation
6426 |
6427 | ## [6.10.1] - 2025-08-25
6428 |
6429 | ### 🐛 **Bug Fixes**
6430 |
6431 | #### Fixed Claude Code Memory Commands
6432 | - **API Key Update**: Updated all Claude Code memory commands with current production API key
6433 | - Fixed `/memory-context`, `/memory-store`, `/memory-recall`, `/memory-search`, `/memory-health` commands
6434 | - Replaced outdated `test-key-123` with current production API key
6435 | - **Impact**: All memory commands now work correctly with remote memory service
6436 |
6437 | #### Enhanced `/memory-context` Command
6438 | - **Dynamic Session Capture**: Removed hardcoded session content, now captures real-time context
6439 | - **Real-time Info**: Includes current timestamp, working directory, git branch, and recent commits
6440 | - **Dynamic Tags**: Automatically includes current project name as tag
6441 | - **User Context**: Properly captures user-provided session description via `$ARGUMENTS`
6442 | - **Impact**: `/memory-context` now stores actual session context instead of static placeholder text
6443 |
6444 | ## [6.10.0] - 2025-08-25
6445 |
6446 | ### ✨ **New Features**
6447 |
6448 | #### Markdown-to-ANSI Conversion for Clean CLI Output
6449 | - **Automatic Markdown Processing**: Memory content with markdown formatting is now automatically converted to ANSI colors
6450 | - **Headers**: `## Header` → Bold Cyan, `### Subheader` → Bold for visual hierarchy
6451 | - **Emphasis**: `**bold**` → Bold, `*italic*` → Dim for text emphasis
6452 | - **Code**: `` `inline code` `` → Gray, code blocks properly formatted with gray text
6453 | - **Lists**: Markdown bullets (`-`, `*`) → Cyan bullet points (`•`), numbered lists → Cyan arrows (`›`)
6454 | - **Links**: `[text](url)` → Cyan text without URL clutter
6455 | - **Blockquotes**: `> quote` → Dimmed with visual indicator (`│`)
6456 | - **Impact**: Raw markdown syntax no longer appears in CLI output, providing clean and professional display
6457 |
6458 | #### Smart Content Processing
6459 | - **Environment-Aware**: Automatically detects CLI environment and applies appropriate formatting
6460 | - **Configuration Option**: Can be disabled via `CLAUDE_MARKDOWN_TO_ANSI=false` environment variable
6461 | - **Strip-Only Mode**: Option to remove markdown without adding ANSI colors for plain text output
6462 | - **Performance**: Minimal overhead (<5ms) with single-pass regex transformation
6463 |
6464 | ## [6.9.0] - 2025-08-25
6465 |
6466 | ### ✨ **New Features**
6467 |
6468 | #### Enhanced Claude Code Hook Visual Output
6469 | - **Professional CLI Formatting**: Completely redesigned hook output with ANSI color coding and clean typography
6470 | - **ANSI Color Support**: Full color coding with cyan, green, blue, yellow, gray, and red for different components
6471 | - **Clean Typography**: Removed all markdown syntax (`**`, `#`, `##`) and HTML-like tags from CLI output
6472 | - **Consistent Visual Pattern**: Standardized `icon component → description` format throughout all hook messages
6473 | - **Unicode Box Drawing**: Enhanced use of `┌─`, `├─`, `└─`, and `│` characters for better visual structure
6474 | - **Impact**: Hook output now looks professional and readable in Claude Code terminal sessions
6475 |
6476 | #### Color-Coded Memory Content
6477 | - **Type-Based Coloring**: Different colors for memory types (decisions=yellow, insights=magenta, bugs=green, features=blue)
6478 | - **Visual Hierarchy**: Important information highlighted with bright colors, metadata dimmed with gray
6479 | - **Date Formatting**: Consistent gray coloring for dates and timestamps
6480 | - **Category Icons**: Enhanced category display with colored section headers
6481 |
6482 | #### Improved Console Logging
6483 | - **Structured Messages**: All console output now follows consistent visual patterns
6484 | - **Progress Indicators**: Clear visual feedback for memory search, scoring, and processing steps
6485 | - **Error Handling**: Enhanced error messages with proper color coding and clear descriptions
6486 | - **Success Confirmation**: Prominent success indicators with checkmarks and summary information
6487 |
6488 | #### Enhanced Project Detection
6489 | - **Confidence Visualization**: Color-coded confidence scores (green >80%, yellow >60%, gray <60%)
6490 | - **Clean Project Info**: Streamlined project detection output with proper visual hierarchy
6491 | - **Technology Stack Display**: Clear formatting for detected languages, frameworks, and tools
6492 |
6493 | ## [6.8.0] - 2025-08-25
6494 |
6495 | ### ✨ **New Features**
6496 |
6497 | #### Enhanced Claude Code CLI Formatting
6498 | - **Beautiful CLI Output**: Claude Code hooks now feature enhanced visual formatting with Unicode box-drawing characters
6499 | - **Visual Hierarchy**: Clean tree structure using `├─`, `└─`, and `│` characters for better readability
6500 | - **Contextual Icons**: Memory context (🧠), project info (📂, 📝), and category-specific icons (🏗️, 🐛, ✨)
6501 | - **Smart Environment Detection**: Automatically switches between Markdown (web) and enhanced CLI formatting
6502 | - **Improved Categorization**: Visual grouping of memories by type with proper indentation and spacing
6503 | - **Impact**: Dramatically improved readability of hook output in Claude Code terminal sessions
6504 |
6505 | #### CLI Environment Detection
6506 | - **Automatic Detection**: Uses multiple detection methods including `CLAUDE_CODE_CLI` environment variable
6507 | - **Terminal Compatibility**: Enhanced formatting works seamlessly across different terminal emulators
6508 | - **Fallback Support**: Graceful degradation to standard formatting when enhanced features unavailable
6509 |
6510 | #### Visual Design Improvements
6511 | - **Category Icons**: 🏗️ Architecture & Design, 🐛 Bug Fixes & Issues, ✨ Features & Implementation, 📝 Additional Context
6512 | - **Project Status Display**: Git branch (📂) and commit info (📝) with clean formatting
6513 | - **Memory Count Indicators**: Clear display of loaded memory count with 📚 icon
6514 | - **Empty State Handling**: Elegant display when no memories available
6515 |
6516 | ## [6.7.2] - 2025-08-25
6517 |
6518 | ### 🔧 **Enhancement**
6519 |
6520 | #### Deduplication Script Configuration-Aware Refactoring
6521 | - **Enhanced API Integration**: Deduplication script now reads Claude Code hooks configuration for seamless integration
6522 | - **Configuration Auto-Detection**: Automatically reads `~/.claude/hooks/config.json` for memory service endpoint and API key
6523 | - **API-Based Analysis**: Supports remote memory service analysis via HTTPS API with self-signed certificate support
6524 | - **Intelligent Pagination**: Handles large memory collections (972+ memories) with automatic page-by-page retrieval
6525 | - **Backward Compatibility**: Maintains support for direct database access with `--db-path` parameter
6526 | - **Impact**: Users can now run deduplication on remote memory services without manual configuration
6527 |
6528 | #### New Command-Line Options
6529 | - **`--use-api`**: Force API-based analysis using configuration endpoint
6530 | - **Smart Fallback**: Automatically detects available options and suggests alternatives when paths missing
6531 | - **Enhanced Error Messages**: Clear guidance on configuration requirements and troubleshooting steps
6532 |
6533 | #### Technical Improvements
6534 | - **SSL Context Configuration**: Proper handling of self-signed certificates for secure remote connections
6535 | - **Memory Format Normalization**: Converts API response format to internal analysis format seamlessly
6536 | - **Progress Reporting**: Real-time feedback during multi-page memory retrieval operations
6537 |
6538 | #### Validation Results
6539 | - **✅ 972 Memories Analyzed**: Successfully processed complete memory collection via API
6540 | - **✅ No Duplicates Detected**: Confirms v6.7.0 content quality filters are preventing duplicate creation
6541 | - **✅ Configuration Integration**: Seamless integration with existing Claude Code hooks setup
6542 | - **✅ Performance Maintained**: Efficient pagination and processing of large memory collections
6543 |
6544 | > **Usage**: Run `python scripts/find_duplicates.py --use-api` to analyze memories using your configured remote memory service
6545 |
6546 | ## [6.7.1] - 2025-08-25
6547 |
6548 | ### 🔧 **Critical Bug Fix**
6549 |
6550 | #### Claude Code Hooks Installation Script Fix
6551 | - **Fixed Missing v6.7.0 Files in Installation**: Resolved critical installation script bug that prevented complete v6.7.0 setup
6552 | - **Added Missing Core Hook**: `memory-retrieval.js` now properly copied during installation
6553 | - **Added Missing Utility**: `context-shift-detector.js` now properly copied during installation
6554 | - **Updated Install Messages**: Installation logs now accurately reflect all installed files
6555 | - **Impact**: Eliminates "Cannot find module" errors on fresh v6.7.0 installations
6556 |
6557 | #### Problem Resolved
6558 | - **Issue**: Installation script (`install.sh`) used hardcoded file list that was missing new v6.7.0 files
6559 | - **Symptoms**: Users experienced module import errors and incomplete feature sets after installation
6560 | - **Root Cause**: Script copied only `session-start.js`, `session-end.js` but missed `memory-retrieval.js` and `context-shift-detector.js`
6561 | - **Solution**: Added missing file copy commands and updated installation messaging
6562 |
6563 | #### Validation
6564 | - **✅ Complete Installation**: All v6.7.0 files now properly installed
6565 | - **✅ Integration Tests**: 14/14 tests pass immediately after fresh installation
6566 | - **✅ No Module Errors**: All dependencies resolved correctly
6567 | - **✅ Full Feature Set**: On-demand memory retrieval and smart timing work out-of-the-box
6568 |
6569 | > **Note**: This is a critical patch for v6.7.0 users. If you installed v6.7.0 and experienced module errors, please reinstall using v6.7.1.
6570 |
6571 | ## [6.7.0] - 2025-08-25
6572 |
6573 | ### 🧠 **Claude Code Memory Awareness - Major Enhancement**
6574 |
6575 | #### Smart Memory Context Presentation ([#Memory-Presentation-Fix](https://github.com/doobidoo/mcp-memory-service/issues/memory-presentation))
6576 | - **Eliminated Generic Content Fluff**: Complete overhaul of session-start hook memory presentation
6577 | - **Smart Content Extraction**: Extracts meaningful content from session summaries (decisions, insights, code changes) instead of truncating at 200 chars
6578 | - **Section-Aware Parsing**: Prioritizes showing actual decisions/insights over generic headers like "Topics Discussed - implementation..."
6579 | - **Deduplication Logic**: Automatically filters out repetitive session summaries with 80% similarity threshold
6580 | - **Impact**: Users now see actionable memory content instead of truncated generic summaries
6581 |
6582 | #### Enhanced Memory Quality Scoring
6583 | - **Content Quality Factor**: New scoring dimension that heavily penalizes generic/empty content
6584 | - **Meaningful Indicators**: Detects substantial content using decision words (decided, implemented, fixed, learned)
6585 | - **Information Density**: Analyzes word diversity and content richness
6586 | - **Generic Pattern Detection**: Automatically identifies and demotes "implementation..." session summaries
6587 | - **Impact**: Quality memories now outrank recent-but-empty summaries
6588 |
6589 | #### Smart Context Management
6590 | - **Post-Compacting Control**: Added `injectAfterCompacting: false` configuration option
6591 | - **Problem Solved**: Stops disruptive mid-session memory injection after compacting events
6592 | - **User-Controlled**: Can be enabled via `config.json` for users who prefer the old behavior
6593 | - **Context Shift Detection**: Intelligent timing for when to refresh memory context
6594 | - **Project Change Detection**: Auto-refreshes when switching between projects/directories
6595 | - **Topic Shift Analysis**: Detects significant conversation topic changes
6596 | - **User Request Recognition**: Responds to explicit memory requests ("remind me", "what did we decide")
6597 | - **Impact**: Memory context appears only when contextually appropriate, not disruptively
6598 |
6599 | #### New Features
6600 | - **On-Demand Memory Retrieval**: New `memory-retrieval.js` hook for manual context requests
6601 | - **User-Triggered**: Allows manual memory refresh when needed
6602 | - **Query-Based**: Supports semantic search with user-provided queries
6603 | - **Relevance Scoring**: Shows confidence scores for manual retrieval
6604 | - **Streamlined Presentation**: Cleaner formatting with reduced metadata clutter
6605 | - **Smart Categorization**: Only groups memories when there's meaningful diverse content
6606 | - **Relevant Tags Only**: Filters out machine-generated and generic tags
6607 | - **Concise Dating**: More compact date formatting (Aug 25 vs full timestamps)
6608 |
6609 | #### Technical Improvements
6610 | - **Enhanced Memory Scoring Weights**:
6611 | ```json
6612 | {
6613 | "timeDecay": 0.25, // Reduced from 0.30
6614 | "tagRelevance": 0.35, // Maintained
6615 | "contentRelevance": 0.15, // Reduced from 0.20
6616 | "contentQuality": 0.25, // NEW quality factor
6617 | "conversationRelevance": 0.25 // Maintained
6618 | }
6619 | ```
6620 | - **New Utility Files**:
6621 | - `context-shift-detector.js`: Intelligent context change detection
6622 | - Enhanced `context-formatter.js` with smart content extraction
6623 | - Quality-aware scoring in `memory-scorer.js`
6624 |
6625 | #### Breaking Changes
6626 | - **Session-Start Hook**: Upgraded to v2.0.0 with smart timing and quality filtering
6627 | - **Configuration Schema**: Added new options for memory quality control and compacting behavior
6628 | - **Memory Filtering**: Generic session summaries are now automatically filtered out
6629 |
6630 | #### Migration Guide
6631 | - **Automatic**: No user action required - existing configurations work with sensible defaults
6632 | - **Optional**: Users can enable `injectAfterCompacting: true` in config.json if they prefer old behavior
6633 | - **Benefit**: Immediate improvement in memory context quality and relevance
6634 |
6635 | ## [6.6.4] - 2025-08-25
6636 |
6637 | ### 🔧 **Installation Experience Improvements**
6638 |
6639 | #### Universal Installer Bug Fixes ([#92](https://github.com/doobidoo/mcp-memory-service/issues/92))
6640 | - **Fixed "Installer Gets Stuck" Issues**: Resolved multiple causes of installation appearing frozen
6641 | - Added prominent visual separators (`⚠️ USER INPUT REQUIRED`) around all input prompts
6642 | - Extended system detection timeouts from 10 to 30 seconds (macOS `system_profiler`, Homebrew checks)
6643 | - Added progress indicators for long-running operations (package installations, hardware detection)
6644 | - **Impact**: Users now clearly understand when installer needs input vs. processing in background
6645 |
6646 | #### New Non-Interactive Installation Mode
6647 | - **Added `--non-interactive` Flag**: Enables fully automated installations using sensible defaults
6648 | - Automatically selects SQLite-vec backend (recommended)
6649 | - Skips optional components (Claude Code commands, multi-client setup)
6650 | - Perfect for CI/CD, Docker builds, and scripted deployments
6651 | - **Usage**: `python install.py --non-interactive`
6652 |
6653 | #### Enhanced User Experience
6654 | - **Better Progress Feedback**: Clear messaging during system detection and package installation phases
6655 | - **Improved Timeout Handling**: More resilient system detection with graceful fallbacks
6656 | - **Log File Visibility**: Prominently displays location of `installation.log` for troubleshooting
6657 |
6658 | ## [6.6.3] - 2025-08-24
6659 |
6660 | ### 🔧 **CI/CD Infrastructure Improvements**
6661 |
6662 | #### GitHub Actions Workflow Fixes
6663 | - **Fixed npm dependency management**: Created proper `package.json` files for test directories
6664 | - **Simplified YAML structure**: Replaced complex multi-line scripts with focused single-step commands
6665 | - **Improved error reporting**: Split validation steps for clearer failure identification
6666 | - **Fixed false positives**: Updated status code validation to avoid flagging legitimate 200/201 handling
6667 | - **Enhanced reliability**: Used `working-directory` instead of embedded `cd` commands
6668 | - **Impact**: GitHub Actions CI/CD now properly installs dependencies and validates bridge fixes
6669 |
6670 | #### Test Infrastructure Enhancements
6671 | - **Added dedicated test packages**: Separate `package.json` for bridge and integration tests
6672 | - **Improved module resolution**: Confirmed correct relative path handling in test files
6673 | - **Better validation coverage**: Enhanced API contract and smoke test verification
6674 |
6675 | ## [6.6.2] - 2025-08-24
6676 |
6677 | ### 🐛 **Critical Bug Fixes**
6678 |
6679 | #### HTTP-MCP Bridge Complete Repair
6680 | - **Fixed Status Code Handling**: Corrected bridge expectation from HTTP 201 to HTTP 200 with success field check
6681 | - Server returns HTTP 200 for both successful storage and duplicates
6682 | - Bridge now properly checks `response.data.success` field to determine actual result
6683 | - Supports both HTTP 200 and 201 for backward compatibility
6684 | - **Impact**: Memory storage operations now work correctly instead of always failing
6685 |
6686 | - **Fixed URL Construction Bug**: Resolved critical path construction issue in `makeRequestInternal`
6687 | - `new URL(path, baseUrl)` was incorrectly replacing `/api` base path
6688 | - Now properly concatenates base URL with API paths: `baseUrl + fullPath`
6689 | - **Impact**: All API operations now reach correct endpoints instead of returning 404
6690 |
6691 | #### Root Cause Analysis
6692 | - **Memory Storage**: Bridge expected HTTP 201 but server returns 200 → always interpreted as failure
6693 | - **All API Calls**: URL construction bug caused `/api` path to be lost → all requests returned 404
6694 | - **Combined Effect**: Made entire bridge non-functional despite server working correctly
6695 |
6696 | ### 🧪 **Major Enhancement: Comprehensive Test Infrastructure**
6697 |
6698 | #### Test Suite Addition
6699 | - **Bridge Unit Tests** (`tests/bridge/test_http_mcp_bridge.js`): 20+ test cases covering:
6700 | - URL construction with various base path scenarios
6701 | - Status code handling for success, duplicates, and errors
6702 | - MCP protocol compliance and error conditions
6703 | - Authentication and retry logic
6704 |
6705 | - **Integration Tests** (`tests/integration/test_bridge_integration.js`): End-to-end testing with:
6706 | - Real server connectivity simulation
6707 | - Complete MCP protocol flow validation
6708 | - Authentication and error recovery testing
6709 | - Critical bug scenario reproduction
6710 |
6711 | - **Mock Response System** (`tests/bridge/mock_responses.js`): Accurate server behavior simulation
6712 | - Matches actual API responses (HTTP 200 with success field)
6713 | - Covers all edge cases and error conditions
6714 | - Prevents future assumption-based bugs
6715 |
6716 | #### CI/CD Pipeline Enhancement
6717 | - **Dedicated Bridge Testing** (`.github/workflows/bridge-tests.yml`):
6718 | - Automated testing on every bridge-related change
6719 | - Multiple Node.js version compatibility testing
6720 | - Contract validation against API specification
6721 | - Blocks merges if bridge tests fail
6722 |
6723 | #### Documentation & Contracts
6724 | - **API Contract Specification** (`tests/contracts/api-specification.yml`):
6725 | - Documents ACTUAL server behavior vs assumptions
6726 | - Critical notes about HTTP 200 status codes and success fields
6727 | - URL path requirements and authentication details
6728 |
6729 | - **Release Process** (`RELEASE_CHECKLIST.md`):
6730 | - 50+ item checklist preventing critical bugs
6731 | - Manual and automated testing requirements
6732 | - Post-release monitoring procedures
6733 |
6734 | ### 🔧 **Technical Details**
6735 |
6736 | **Files Modified:**
6737 | - `examples/http-mcp-bridge.js` - Status code and URL construction fixes
6738 | - `src/mcp_memory_service/__init__.py` - Version bump
6739 | - `pyproject.toml` - Version bump
6740 |
6741 | **Files Added:**
6742 | - Complete test infrastructure (6 new files)
6743 | - CI/CD pipeline configuration
6744 | - API contract documentation
6745 | - Release process documentation
6746 |
6747 | **Backward Compatibility**:
6748 | - All existing configurations continue working
6749 | - Bridge now accepts both HTTP 200 and 201 responses
6750 | - No breaking changes to client interfaces
6751 |
6752 | ### 🎯 **Impact**
6753 |
6754 | **Before v6.6.2:**
6755 | - ❌ Health check: "unhealthy" → Fixed in v6.6.1
6756 | - ❌ Memory storage: "Not Found" errors
6757 | - ❌ Memory retrieval: 404 failures
6758 | - ❌ All bridge operations non-functional
6759 |
6760 | **After v6.6.2:**
6761 | - ✅ Health check: Returns "healthy" status
6762 | - ✅ Memory storage: Works correctly with proper success/duplicate handling
6763 | - ✅ Memory retrieval: Functions normally with semantic search
6764 | - ✅ All bridge operations fully functional
6765 |
6766 | **Future Prevention:**
6767 | - ✅ Comprehensive test coverage prevents regression
6768 | - ✅ API contract validation catches assumption mismatches
6769 | - ✅ Automated CI/CD testing on every change
6770 | - ✅ Detailed release checklist ensures quality
6771 |
6772 | This release completes the HTTP-MCP bridge repair, making it fully functional while establishing comprehensive testing infrastructure to prevent similar critical bugs in the future.
6773 |
6774 | ## [6.6.1] - 2025-08-24
6775 |
6776 | ### 🐛 **Bug Fixes**
6777 |
6778 | #### HTTP-MCP Bridge Health Check Endpoint
6779 | - **Fixed Health Check URLs**: Corrected incorrect endpoint paths in `examples/http-mcp-bridge.js`
6780 | - `testEndpoint()` method: Fixed `/health` → `/api/health` path (line 241)
6781 | - `checkHealth()` method: Fixed `/health` → `/api/health` path (line 501)
6782 | - **Impact**: Health checks now return "healthy" status instead of 404 errors
6783 | - **Root Cause**: Bridge was requesting wrong endpoint causing false "unhealthy" status
6784 | - **Verification**: Remote memory service connectivity confirmed working correctly
6785 |
6786 | #### Technical Details
6787 | - Fixed endpoint inconsistencies that caused health checks to fail
6788 | - Remote memory service functionality was working correctly - issue was purely endpoint path mismatch
6789 | - All memory operations (store/retrieve) continue to work without changes
6790 | - Health check now properly reports service status to MCP clients
6791 |
6792 | **Files Modified**: `examples/http-mcp-bridge.js`
6793 |
6794 | ## [6.6.0] - 2025-08-23
6795 |
6796 | ### 🔧 **Memory Awareness Hooks: Fully Functional Installation**
6797 |
6798 | #### Major Improvements
6799 | - **Installation Scripts Fixed** - Memory Awareness Hooks now install and work end-to-end without manual intervention
6800 | - **Claude Code Integration** - Automatic `~/.claude/settings.json` configuration for seamless hook detection
6801 | - **JSON Parsing Fixed** - Resolved Python dict conversion errors that caused runtime failures
6802 | - **Enhanced Testing** - Added 4 new integration tests (total: 14 tests, 100% pass rate)
6803 |
6804 | #### Added
6805 | - **Automated Claude Code Settings Integration** - Installation script now configures `~/.claude/settings.json` automatically
6806 | - **Comprehensive Troubleshooting Guide** - Complete wiki documentation with diagnosis commands and solutions
6807 | - **Installation Verification** - Post-install connectivity tests and hook detection validation
6808 | - **GitHub Wiki Documentation** - Detailed 500+ line guide for advanced users and developers
6809 |
6810 | #### Fixed
6811 | - **Installation Directory** - Changed from `~/.claude-code/hooks/` to correct `~/.claude/hooks/` location
6812 | - **JSON Parsing Errors** - Added Python dict to JSON conversion (single quotes, True/False/None handling)
6813 | - **Hook Detection** - Claude Code now properly detects installed hooks via settings configuration
6814 | - **Memory Service Connectivity** - Enhanced error handling and connection testing
6815 |
6816 | #### Enhanced
6817 | - **Integration Tests** - Expanded test suite from 10 to 14 tests (40% increase):
6818 | - Claude Code settings validation
6819 | - Hook files location verification
6820 | - Claude Code CLI availability check
6821 | - Memory service connectivity testing
6822 | - **Documentation Structure** - README streamlined (47% size reduction), detailed content moved to wiki
6823 | - **Error Messages** - Improved debugging output and user-friendly error reporting
6824 |
6825 | #### Developer Experience
6826 | - **Quick Start** - Single command installation: `./install.sh`
6827 | - **Verification Commands** - Easy testing with `claude --debug hooks`
6828 | - **Troubleshooting** - Comprehensive guide covers all common issues
6829 | - **Custom Development** - Examples for extending hooks and memory integration
6830 |
6831 | **Impact**: Memory Awareness Hooks are now publicly usable without the manual debugging sessions that were previously required. Users can run `./install.sh` and get fully functional automatic memory awareness in Claude Code.
6832 |
6833 | ## [6.5.0] - 2025-08-23
6834 |
6835 | ### 🗂️ **Repository Structure: Root Directory Cleanup**
6836 |
6837 | #### Added
6838 | - **`deployment/` Directory** - Centralized location for service and configuration files
6839 | - **`sync/` Directory** - Organized synchronization scripts in dedicated folder
6840 | - **Dependency-Safe Reorganization** - All file references properly updated
6841 |
6842 | #### Changed
6843 | - **Root Directory Cleanup** - Reduced clutter from 80+ files to ~65 files (19% reduction)
6844 | - **File Organization** - Moved deployment configs and sync scripts to logical subdirectories
6845 | - **Path References Updated** - All scripts and configurations point to new file locations
6846 | - **Claude Code Settings** - Updated paths in `.claude/settings.local.json` for moved scripts
6847 |
6848 | #### Moved Files
6849 | **To `deployment/`:**
6850 | - `mcp-memory.service` - Systemd service configuration
6851 | - `smithery.yaml` - Smithery package configuration
6852 | - `io.litestream.replication.plist` - macOS LaunchDaemon configuration
6853 | - `staging_db_init.sql` - Database initialization schema
6854 | - `empty_config.yml` - Template configuration file
6855 |
6856 | **To `sync/`:**
6857 | - `manual_sync.sh`, `memory_sync.sh` - Core synchronization scripts
6858 | - `pull_remote_changes.sh`, `push_to_remote.sh` - Remote sync operations
6859 | - `sync_from_remote.sh`, `sync_from_remote_noconfig.sh` - Remote pull variants
6860 | - `apply_local_changes.sh`, `stash_local_changes.sh`, `resolve_conflicts.sh` - Local sync operations
6861 |
6862 | #### Fixed
6863 | - **Broken References** - Updated all hardcoded paths in scripts and configurations
6864 | - **Claude Code Integration** - Fixed manual_sync.sh path reference
6865 | - **Installation Scripts** - Updated service file and SQL schema paths
6866 | - **Litestream Setup** - Fixed LaunchDaemon plist file reference
6867 |
6868 | #### Repository Impact
6869 | This release significantly improves repository navigation and organization while maintaining full backward compatibility through proper reference updates. Users benefit from cleaner root directory structure, while developers gain logical file organization that reflects functional groupings.
6870 |
6871 | ## [6.4.0] - 2025-08-23
6872 |
6873 | ### 📚 **Documentation Revolution: Major UX Transformation**
6874 |
6875 | #### Added
6876 | - **Comprehensive Installation Guide** in wiki consolidating 6+ previous scattered guides
6877 | - **Platform-Specific Setup Guide** with optimizations for Windows, macOS, and Linux
6878 | - **Complete Integration Guide** covering Claude Desktop, Claude Code, VS Code, and 13+ tools
6879 | - **Streamlined README.md** with clear quick start and wiki navigation (56KB → 8KB)
6880 | - **Safe Documentation Archive** preserving all removed files for reference
6881 |
6882 | #### Changed
6883 | - **Major Documentation Restructuring** for improved user experience and maintainability
6884 | - **Single Source of Truth** established for installation, platform setup, and integrations
6885 | - **Wiki Home Page** updated with organized navigation to consolidated guides
6886 | - **User Onboarding Journey** simplified from overwhelming choice to clear path
6887 |
6888 | #### Removed
6889 | - **26+ Redundant Documentation Files** safely archived while preserving git history
6890 | - **Choice Paralysis** from 6 installation guides, 5 integration guides, 4 platform guides
6891 | - **Maintenance Burden** of updating multiple files for single concept changes
6892 | - **Inconsistent Information** across overlapping documentation
6893 |
6894 | #### Fixed
6895 | - **User Confusion** from overwhelming documentation choices and unclear paths
6896 | - **Maintenance Complexity** requiring updates to 6+ files for installation changes
6897 | - **Professional Image** with organized structure reflecting code quality
6898 | - **Information Discovery** through logical wiki organization vs scattered files
6899 |
6900 | #### Documentation Impact
6901 | This release transforms MCP Memory Service from having overwhelming documentation chaos to organized, professional, maintainable structure. Users now have clear paths from discovery to success (README → Quick Start → Wiki → Success), while maintainers benefit from single-source-of-truth updates. **90% reduction in repository documentation files** while **improving comprehensiveness** through organized wiki structure.
6902 |
6903 | **Key Achievements:**
6904 | - Installation guides: 6 → 1 comprehensive wiki page
6905 | - Integration guides: 5 → 1 complete reference
6906 | - Platform guides: 4 → 1 optimized guide
6907 | - User experience: Confusion → Clarity
6908 | - Maintenance: 6+ places → 1 place per topic
6909 |
6910 | ## [6.3.3] - 2025-08-22
6911 |
6912 | ### 🔧 **Enhancement: Version Synchronization**
6913 |
6914 | #### Fixed
6915 | - **API Documentation Version**: Fixed API docs dashboard showing outdated version `1.0.0` instead of current version
6916 | - **Version Inconsistencies**: Synchronized hardcoded versions across FastAPI app, web module, and server configuration
6917 | - **Maintenance Overhead**: Established single source of truth for version management
6918 |
6919 | #### Enhanced
6920 | - **Dynamic Version Management**: All version references now import from main `__version__` variable
6921 | - **Future-Proofing**: Version updates now only require changes in 2 files (pyproject.toml + __init__.py)
6922 | - **Developer Experience**: Consistent version display across all interfaces and documentation
6923 |
6924 | #### Technical Details
6925 | - **FastAPI App**: Changed from hardcoded `version="1.0.0"` to dynamic `version=__version__`
6926 | - **Web Module**: Removed separate version `0.2.0`, now imports from parent package
6927 | - **Server Config**: Updated `SERVER_VERSION` from `0.2.2` to use main version import
6928 | - **Impact**: All dashboards, API docs, and mDNS advertisements now show consistent version
6929 |
6930 | ## [6.3.2] - 2025-08-22
6931 |
6932 | ### 🚨 **Critical Fix: Claude Desktop Compatibility Regression**
6933 |
6934 | #### Fixed
6935 | - **Claude Desktop Integration**: Restored backward compatibility for `uv run memory` command
6936 | - **MCP Protocol Errors**: Fixed JSON parsing errors when Claude Desktop tried to parse CLI help text as MCP messages
6937 | - **Regression from v6.3.1**: CLI consolidation accidentally broke existing Claude Desktop configurations
6938 |
6939 | #### Technical Details
6940 | - **Root Cause**: CLI consolidation removed ability to start MCP server with `uv run memory` (without `server` subcommand)
6941 | - **Impact**: Claude Desktop configurations calling `uv run memory` received help text instead of MCP server
6942 | - **Solution**: Added backward compatibility logic to default to `server` command when no subcommand provided
6943 |
6944 | #### Added
6945 | - **Backward Compatibility**: `uv run memory` now starts MCP server automatically for existing integrations
6946 | - **Deprecation Warning**: Informative warning guides users to explicit `memory server` syntax
6947 | - **Integration Test**: New test case verifies backward compatibility warning functionality
6948 | - **MCP Protocol Validation**: Confirmed proper JSON-RPC responses instead of help text parsing errors
6949 |
6950 | #### For Users
6951 | - **Claude Desktop works again**: Existing configurations continue working without changes
6952 | - **Migration Encouraged**: Warning message guides users toward preferred `memory server` syntax
6953 | - **No Breaking Changes**: All existing usage patterns maintained while encouraging modern syntax
6954 |
6955 | ## [6.3.1] - 2025-08-22
6956 |
6957 | ### 🔧 **Major Enhancement: CLI Architecture Consolidation**
6958 |
6959 | #### Fixed
6960 | - **CLI Conflicts Eliminated**: Resolved installation conflicts between argparse and Click CLI implementations
6961 | - **Command Consistency**: Established `uv run memory server` as the single, reliable server start pattern
6962 | - **Installation Issues**: Fixed stale entry point problems that caused "command not found" errors
6963 |
6964 | #### Enhanced
6965 | - **Unified CLI Interface**: All server commands now route through Click-based CLI for consistency
6966 | - **Deprecation Warnings**: Added graceful migration path with informative deprecation warnings for `memory-server`
6967 | - **Error Handling**: Improved error messages and graceful failure handling across all CLI commands
6968 | - **Documentation**: Added comprehensive CLI Migration Guide with clear upgrade paths
6969 |
6970 | #### Added
6971 | - **CLI Integration Tests**: 16 comprehensive test cases covering all CLI interfaces and edge cases
6972 | - **Performance Testing**: CLI startup time validation and version command performance monitoring
6973 | - **Backward Compatibility**: `memory-server` command maintained with deprecation warnings
6974 | - **Migration Guide**: Complete documentation for transitioning from legacy commands
6975 |
6976 | #### Technical Improvements
6977 | - **Environment Variable Integration**: Seamless config passing via MCP_MEMORY_CHROMA_PATH
6978 | - **Code Cleanup**: Removed duplicate argparse implementation from server.py
6979 | - **Entry Point Simplification**: Streamlined from 3 conflicting implementations to 1 clear interface
6980 | - **Robustness Testing**: Added error handling, argument parity, and isolation testing
6981 |
6982 | #### Benefits for Users
6983 | - **Eliminates MCP startup failures** that were caused by CLI conflicts
6984 | - **Clear command interface**: `uv run memory server` works reliably every time
6985 | - **Better error messages** when something goes wrong
6986 | - **Smooth migration path** from legacy patterns
6987 | - **Full Claude Code compatibility** confirmed and tested
6988 |
6989 | ## [6.3.0] - 2025-08-22
6990 |
6991 | ### 🚀 **Major Feature: Distributed Memory Synchronization**
6992 |
6993 | #### Added
6994 | - **Git-like Sync Workflow**: Complete distributed synchronization system with offline capabilities
6995 | - `memory_sync.sh` - Main orchestrator for sync operations with colored output and status reporting
6996 | - **Stash → Pull → Apply → Push** workflow similar to Git's distributed version control
6997 | - Intelligent conflict detection and resolution with user control
6998 | - Remote-first architecture with automatic fallback to local staging
6999 |
7000 | - **Enhanced Memory Store**: `enhanced_memory_store.sh` with hybrid remote-first approach
7001 | - **Primary**: Direct storage to remote API (`https://narrowbox.local:8443/api/memories`)
7002 | - **Fallback**: Automatic local staging when remote is unavailable
7003 | - Smart context detection (project, git branch, hostname, tags)
7004 | - Seamless offline-to-online transition with automatic sync
7005 |
7006 | - **Real-time Database Replication**: Litestream-based synchronization infrastructure
7007 | - **Master/Replica Setup**: Remote server as master with HTTP-served replica data
7008 | - **Automatic Replication**: 10-second sync intervals for near real-time updates
7009 | - **Lightweight HTTP Server**: Python built-in server for serving replica files
7010 | - **Cross-platform Compatibility**: macOS LaunchDaemon and Linux systemd services
7011 |
7012 | - **Staging Database System**: SQLite-based local change tracking
7013 | - `staging_db_init.sql` - Complete schema with triggers and status tracking
7014 | - **Conflict Detection**: Content hash-based duplicate detection
7015 | - **Operation Tracking**: INSERT/UPDATE/DELETE operation logging
7016 | - **Source Attribution**: Machine hostname and timestamp tracking
7017 |
7018 | - **Comprehensive Sync Scripts**: Complete workflow automation
7019 | - `stash_local_changes.sh` - Capture local changes before remote sync
7020 | - `pull_remote_changes.sh` - Download remote changes with conflict awareness
7021 | - `apply_local_changes.sh` - Intelligent merge of staged changes
7022 | - `push_to_remote.sh` - Upload changes via HTTPS API with retry logic
7023 | - `resolve_conflicts.sh` - Interactive conflict resolution helper
7024 |
7025 | - **Litestream Integration**: Production-ready replication setup
7026 | - **Automated Setup Scripts**: `setup_remote_litestream.sh` and `setup_local_litestream.sh`
7027 | - **Service Configurations**: systemd and LaunchDaemon service files
7028 | - **Master/Replica Configs**: Complete Litestream YAML configurations
7029 | - **Comprehensive Documentation**: `LITESTREAM_SETUP_GUIDE.md` with troubleshooting
7030 |
7031 | #### Enhanced
7032 | - **Claude Commands**: Updated `memory-store.md` to document remote-first approach
7033 | - **Hybrid Strategy**: Remote API primary, local staging fallback
7034 | - **Sync Status**: Integration with `./sync/memory_sync.sh status` for pending changes
7035 | - **Automatic Context**: Git branch, project, and hostname detection
7036 |
7037 | #### Architecture
7038 | - **Remote-first Design**: Single source of truth on remote server with local caching
7039 | - **Conflict Resolution**: Last-write-wins with comprehensive logging and user notification
7040 | - **Network Resilience**: Graceful degradation from online → staging → read-only local
7041 | - **Git-like Workflow**: Familiar distributed workflow for developers
7042 |
7043 | #### Technical Details
7044 | - **Database Schema**: New staging database with triggers for change counting
7045 | - **HTTP Integration**: Secure HTTPS API communication with bearer token auth
7046 | - **Platform Support**: Cross-platform service management (systemd/LaunchDaemon)
7047 | - **Performance**: Lz4 compression for efficient snapshot transfers
7048 | - **Security**: Content hash verification and source machine tracking
7049 |
7050 | This release transforms MCP Memory Service from a local-only system into a fully distributed memory platform, enabling seamless synchronization across multiple devices while maintaining robust offline capabilities.
7051 |
7052 | ## [6.2.5] - 2025-08-21
7053 |
7054 | ### 🐛 **Bug Fix: SQLite-Vec Backend Debug Utilities**
7055 |
7056 | This release fixes a critical AttributeError in debug utilities when using the SQLite-Vec storage backend.
7057 |
7058 | #### Fixed
7059 | - **Debug Utilities Compatibility** ([#89](https://github.com/doobidoo/mcp-memory-service/issues/89)): Fixed `'SqliteVecMemoryStorage' object has no attribute 'model'` error
7060 | - Added compatibility helper `_get_embedding_model()` to handle different attribute names between storage backends
7061 | - ChromaDB backend uses `storage.model` while SQLite-Vec uses `storage.embedding_model`
7062 | - Updated all debug functions (`get_raw_embedding`, `check_embedding_model`, `debug_retrieve_memory`) to use the compatibility helper
7063 |
7064 | #### Technical Details
7065 | - **Affected Functions**:
7066 | - `get_raw_embedding()` - Now works with both backends
7067 | - `check_embedding_model()` - Properly detects model regardless of backend
7068 | - `debug_retrieve_memory()` - Semantic search debugging works for SQLite-Vec users
7069 |
7070 | #### Impact
7071 | - Users with SQLite-Vec backend can now use all MCP debug operations
7072 | - Semantic search and embedding inspection features work correctly
7073 | - No breaking changes for ChromaDB backend users
7074 |
7075 | ## [6.2.4] - 2025-08-21
7076 |
7077 | ### 🐛 **CRITICAL BUG FIXES: Claude Code Hooks Compatibility**
7078 |
7079 | This release fixes critical compatibility issues with Claude Code hooks that prevented automatic memory injection at session start.
7080 |
7081 | #### Fixed
7082 | - **Claude Code Hooks API Parameters**: Fixed incorrect API parameters in `claude-hooks/core/session-start.js`
7083 | - Replaced invalid `tags`, `limit`, `time_filter` parameters with correct `n_results` for `retrieve_memory` API
7084 | - Hooks now work correctly with MCP Memory Service API without parameter errors
7085 |
7086 | - **Python Dict Response Parsing**: Fixed critical parsing bug where hooks couldn't process MCP service responses
7087 | - Added proper Python dictionary format to JavaScript object conversion
7088 | - Implemented fallback parsing for different response formats
7089 | - Hooks now successfully parse memory service responses and inject context
7090 |
7091 | - **Memory Export Security**: Enhanced security for memory export files
7092 | - Added `local_export*.json` to .gitignore to prevent accidental commits of sensitive data
7093 | - Created safe template files in `examples/` directory for documentation and testing
7094 |
7095 | #### Added
7096 | - **Memory Export Templates**: New example files showing export format structure
7097 | - `examples/memory_export_template.json`: Basic example with 3 sample memories
7098 | - Clean, sanitized examples safe for sharing and documentation
7099 |
7100 | #### Technical Details
7101 | - **Response Format Handling**: Hooks now handle Python dict format responses with proper conversion to JavaScript objects
7102 | - **Error Handling**: Added multiple fallback mechanisms for response parsing
7103 | - **API Compatibility**: Updated to use correct MCP protocol parameters for memory retrieval
7104 |
7105 | #### Impact
7106 | - Claude Code hooks will now work out-of-the-box without manual fixes
7107 | - Memory context injection at session start now functions correctly
7108 | - Users can install hooks directly from repository without encountering parsing errors
7109 | - Enhanced security prevents accidental exposure of sensitive data in exports
7110 |
7111 | ## [6.2.3] - 2025-08-20
7112 |
7113 | ### 🛠️ **Cross-Platform Path Detection & Claude Code Integration**
7114 |
7115 | This release provides comprehensive cross-platform fixes for path detection issues and complete Claude Code hooks integration across Linux, macOS, and Windows.
7116 |
7117 | #### Fixed
7118 | - **Linux Path Detection**: Enhanced `scripts/remote_ingest.sh` to auto-detect mcp-memory-service repository location anywhere in user's home directory
7119 | - Resolves path case sensitivity issues (Repositories vs repositories)
7120 | - Works regardless of where users clone the repository
7121 | - Validates found directory contains pyproject.toml to ensure correct repository
7122 |
7123 | - **Windows Path Detection**: Added comprehensive Windows support with PowerShell and batch scripts
7124 | - New: `claude-hooks/install_claude_hooks_windows.ps1` - Full-featured PowerShell installation
7125 | - New: `claude-hooks/install_claude_hooks_windows.bat` - Batch wrapper for easy execution
7126 | - Dynamic repository location detection using PSScriptRoot resolution
7127 | - Comprehensive Claude Code hooks directory detection with fallbacks
7128 | - Improved error handling and validation for source/target directories
7129 | - Resolves hardcoded Unix path issues (`\home\hkr\...`) on Windows systems
7130 | - Tested with 100% success rate across Windows environments
7131 |
7132 | - **Claude Code Commands Documentation**: Fixed and enhanced memory commands documentation
7133 | - Updated command usage from `/memory-store` to `claude /memory-store`
7134 | - Added comprehensive troubleshooting section for command installation issues
7135 | - Documented both Claude Code commands and direct API alternatives
7136 | - Added installation instructions and quick fixes for common problems
7137 |
7138 | #### Technical Improvements
7139 | - Repository detection now works on any platform and directory structure
7140 | - Claude Code hooks installation handles Windows-specific path formats
7141 | - Improved error messages and debug output across all platforms
7142 | - Consistent behavior across Windows, Linux, and macOS platforms
7143 |
7144 | ## [6.2.2] - 2025-08-20
7145 |
7146 | ### 🔧 Fixed
7147 | - **Remote Ingestion Script Path Detection**: Enhanced `scripts/remote_ingest.sh` to auto-detect mcp-memory-service repository location anywhere in user's home directory instead of hardcoded path assumptions
7148 | - Resolves path case sensitivity issues (Repositories vs repositories)
7149 | - Works regardless of where users clone the repository
7150 | - Validates found directory contains pyproject.toml to ensure correct repository
7151 |
7152 | ## [6.2.1] - 2025-08-20
7153 |
7154 | ### 🐛 **CRITICAL BUG FIXES: Memory Listing and Search Index**
7155 |
7156 | This patch release resolves critical issues with memory pagination and search functionality that were preventing users from accessing the full dataset.
7157 |
7158 | #### Fixed
7159 | - **Memory API Pagination**: Fixed `/api/memories` endpoint returning only 82 of 904 total memories
7160 | - **Root Cause**: API was using semantic search fallback instead of proper chronological listing
7161 | - **Solution**: Implemented dedicated `get_all_memories()` method with SQL-based LIMIT/OFFSET pagination
7162 | - **Impact**: Web dashboard and API clients now see accurate memory counts and can access complete dataset
7163 |
7164 | - **Missing Storage Backend Methods**: Added missing pagination methods in SqliteVecMemoryStorage
7165 | - `get_all_memories(limit, offset)` - Chronological memory listing with pagination support
7166 | - `get_recent_memories(n)` - Get n most recent memories efficiently
7167 | - `count_all_memories()` - Accurate total count for pagination calculations
7168 | - `_row_to_memory(row)` - Proper database row to Memory object conversion with JSON parsing
7169 |
7170 | - **Search Index Issues**: Resolved problems with recently stored memories not appearing in searches
7171 | - **Tag Search**: Newly stored memories now immediately appear in tag-based filtering
7172 | - **Semantic Search**: MCP protocol semantic search verified working with similarity scoring
7173 | - **Memory Context**: `/memory-context` command functionality confirmed end-to-end
7174 |
7175 | #### Technical Details
7176 | - **Files Modified**:
7177 | - `src/mcp_memory_service/storage/sqlite_vec.py` - Added 75+ lines of pagination methods
7178 | - `src/mcp_memory_service/web/api/memories.py` - Fixed pagination logic to use proper SQL queries
7179 | - **Database Access**: Replaced unreliable semantic search with direct SQL `ORDER BY created_at DESC`
7180 | - **Error Handling**: Added comprehensive JSON parsing for tags and metadata with graceful fallbacks
7181 | - **Verification**: All 904 memories now accessible via REST API with proper page navigation
7182 |
7183 | #### Verification Results
7184 | - ✅ **API Pagination**: Returns accurate 904 total count (was showing 82)
7185 | - ✅ **Search Functionality**: Tag searches work immediately after storage
7186 | - ✅ **Memory Context**: Session storage and retrieval verified end-to-end
7187 | - ✅ **Semantic Search**: MCP protocol search confirmed functional with similarity scoring
7188 | - ✅ **Performance**: No performance degradation despite handling full dataset
7189 |
7190 | This release ensures reliable access to the complete memory dataset with proper pagination and search capabilities.
7191 |
7192 | ---
7193 |
7194 | ## [6.2.0] - 2025-08-20
7195 |
7196 | ### 🚀 **MAJOR FEATURE: Native Cloudflare Backend Integration**
7197 |
7198 | This major release introduces native Cloudflare integration as a third storage backend option alongside SQLite-vec and ChromaDB, providing global distribution, automatic scaling, and enterprise-grade infrastructure, integrated with the existing Memory Awareness system.
7199 |
7200 | #### Added
7201 | - **Native Cloudflare Backend Support**: Complete implementation using Cloudflare's edge computing platform
7202 | - **Vectorize**: 768-dimensional vector storage with cosine similarity for semantic search
7203 | - **D1 Database**: SQLite-compatible database for metadata storage
7204 | - **Workers AI**: Embedding generation using @cf/baai/bge-base-en-v1.5 model
7205 | - **R2 Storage** (optional): Object storage for large content exceeding 1MB threshold
7206 |
7207 | - **Implementation Files**:
7208 | - `src/mcp_memory_service/storage/cloudflare.py` - Complete CloudflareStorage implementation (740 lines)
7209 | - `scripts/migrate_to_cloudflare.py` - Migration tool for existing SQLite-vec and ChromaDB users
7210 | - `scripts/test_cloudflare_backend.py` - Comprehensive test suite with automated validation
7211 | - `scripts/setup_cloudflare_resources.py` - Automated Cloudflare resource provisioning
7212 | - `docs/cloudflare-setup.md` - Complete setup, configuration, and troubleshooting guide
7213 | - `tests/unit/test_cloudflare_storage.py` - 15 unit tests for CloudflareStorage class
7214 |
7215 | - **Features**:
7216 | - Automatic retry logic with exponential backoff for API rate limiting
7217 | - Connection pooling for optimal HTTP performance
7218 | - NDJSON format support for Vectorize v2 API endpoints
7219 | - LRU caching (1000 entries) for embedding deduplication
7220 | - Batch operations support for efficient data processing
7221 | - Global distribution with <100ms latency from most locations
7222 | - Pay-per-use pricing model with no upfront costs
7223 |
7224 | #### Changed
7225 | - Updated `config.py` to include 'cloudflare' in SUPPORTED_BACKENDS
7226 | - Enhanced server initialization in `mcp_server.py` to support Cloudflare backend
7227 | - Updated storage factory in `storage/__init__.py` to create CloudflareStorage instances
7228 | - Consolidated documentation, removing redundant setup files
7229 |
7230 | #### Technical Details
7231 | - **Environment Variables**:
7232 | - `MCP_MEMORY_STORAGE_BACKEND=cloudflare` - Activate Cloudflare backend
7233 | - `CLOUDFLARE_API_TOKEN` - API token with Vectorize, D1, Workers AI permissions
7234 | - `CLOUDFLARE_ACCOUNT_ID` - Cloudflare account identifier
7235 | - `CLOUDFLARE_VECTORIZE_INDEX` - Name of Vectorize index (768 dimensions)
7236 | - `CLOUDFLARE_D1_DATABASE_ID` - D1 database UUID
7237 | - `CLOUDFLARE_R2_BUCKET` (optional) - R2 bucket for large content
7238 |
7239 | - **Performance Characteristics**:
7240 | - Storage: ~200ms per memory (including embedding generation)
7241 | - Search: ~100ms for semantic search (5 results)
7242 | - Batch operations: ~50ms per memory in batches of 100
7243 | - Global latency: <100ms from most global locations
7244 |
7245 | #### Migration Path
7246 | Users can migrate from existing backends using provided scripts:
7247 | ```bash
7248 | # From SQLite-vec
7249 | python scripts/migrate_to_cloudflare.py --source sqlite
7250 |
7251 | # From ChromaDB
7252 | python scripts/migrate_to_cloudflare.py --source chroma
7253 | ```
7254 |
7255 | #### Memory Awareness Integration
7256 | - **Full Compatibility**: Cloudflare backend works seamlessly with Phase 1 and Phase 2 Memory Awareness
7257 | - **Cross-Session Intelligence**: Session tracking and conversation threading supported
7258 | - **Dynamic Context Updates**: Real-time memory loading during conversations
7259 | - **Global Performance**: Enhances Memory Awareness with <100ms global response times
7260 |
7261 | #### Compatibility
7262 | - Fully backward compatible with existing SQLite-vec and ChromaDB backends
7263 | - No breaking changes to existing APIs or configurations
7264 | - Supports all existing MCP operations and features
7265 | - Compatible with all existing Memory Awareness hooks and functionality
7266 |
7267 | ## [6.1.1] - 2025-08-20
7268 |
7269 | ### 🐛 **CRITICAL BUG FIX: Memory Retrieval by Hash**
7270 |
7271 | #### Fixed
7272 | - **Memory Retrieval 404 Issue**: Fixed HTTP API returning 404 errors for valid memory hashes
7273 | - **Direct Hash Lookup**: Added `get_by_hash()` method to `SqliteVecMemoryStorage` for proper content hash retrieval
7274 | - **API Endpoint Correction**: Updated `/api/memories/{content_hash}` to use direct hash lookup instead of semantic search
7275 | - **Production Deployment**: Successfully deployed fix to production servers and verified functionality
7276 |
7277 | #### Technical Details
7278 | - **Root Cause**: HTTP API was incorrectly using `storage.retrieve()` (semantic search) instead of direct hash-based lookup
7279 | - **Solution**: Implemented dedicated hash lookup method that queries database directly using content hash as primary key
7280 | - **Impact**: Web dashboard memory retrieval by hash now works correctly without SSL certificate issues or false 404 responses
7281 | - **Testing**: Verified with multiple memory hashes including previously failing hash `812d361cbfd1b79a49737e6ea34e24459b4d064908e222d98af6a504aa09ff19`
7282 |
7283 | #### Deployment
7284 | - Version 6.1.1 deployed to production server `10.0.1.30:8443`
7285 | - Service restart completed successfully
7286 | - Health check confirmed: Version 6.1.1 running with full functionality
7287 |
7288 | ## [6.1.0] - 2025-08-20
7289 |
7290 | ### 🚀 **MAJOR FEATURE: Intelligent Context Updates (Phase 2)**
7291 |
7292 | #### Conversation-Aware Dynamic Memory Loading
7293 | This release introduces **Phase 2 of Claude Code Memory Awareness** - transforming the system from static memory injection to intelligent, real-time conversation analysis with dynamic context updates during active coding sessions.
7294 |
7295 | #### Added
7296 |
7297 | ##### 🧠 **Dynamic Memory Loading System**
7298 | - **Real-time Topic Detection**: Analyzes conversation flow to detect significant topic shifts
7299 | - **Automatic Context Updates**: Injects relevant memories as conversations evolve naturally
7300 | - **Smart Deduplication**: Prevents re-injection of already loaded memories
7301 | - **Intelligent Rate Limiting**: 30-second cooldown and session limits prevent context overload
7302 | - **Cross-Session Intelligence**: Links related conversations across different sessions
7303 |
7304 | ##### 🔍 **Advanced Conversation Analysis Engine**
7305 | - **Natural Language Processing**: Extracts topics, entities, intent, and code context from conversations
7306 | - **15+ Technical Topic Categories**: database, debugging, architecture, testing, deployment, etc.
7307 | - **Entity Recognition**: Technologies, frameworks, languages, tools (JavaScript, Python, React, etc.)
7308 | - **Intent Classification**: learning, problem-solving, development, optimization, review, planning
7309 | - **Code Context Detection**: Identifies code blocks, file paths, error messages, commands
7310 |
7311 | ##### 📊 **Enhanced Memory Scoring with Conversation Context**
7312 | - **Multi-Factor Relevance Algorithm**: 5-factor scoring system including conversation context (25% weight)
7313 | - **Dynamic Weight Adjustment**: Adapts scoring based on conversation analysis
7314 | - **Topic Alignment Matching**: Prioritizes memories matching current conversation topics
7315 | - **Intent-Based Scoring**: Aligns memory relevance with conversation purpose
7316 | - **Semantic Content Analysis**: Advanced content matching with conversation context
7317 |
7318 | ##### 🔗 **Cross-Session Intelligence & Conversation Threading**
7319 | - **Session Tracking**: Links related sessions across time with unique thread IDs
7320 | - **Conversation Continuity**: Builds conversation threads over multiple sessions
7321 | - **Progress Context**: Connects outcomes from previous sessions to current work
7322 | - **Pattern Recognition**: Identifies recurring topics and workflow patterns
7323 | - **Historical Context**: Includes insights from recent related sessions (up to 3 sessions, 7 days back)
7324 |
7325 | ##### ⚡ **Performance & Reliability**
7326 | - **Efficient Processing**: <500ms response time for topic detection and memory queries
7327 | - **Scalable Architecture**: Handles 100+ active memories per session
7328 | - **Smart Debouncing**: 5-second debounce prevents rapid-fire updates
7329 | - **Resource Optimization**: Intelligent memory management and context deduplication
7330 | - **Comprehensive Testing**: 100% test pass rate (15/15 tests) with full integration coverage
7331 |
7332 | #### Technical Implementation
7333 |
7334 | ##### Core Phase 2 Components
7335 | - **conversation-analyzer.js**: NLP engine for topic/entity/intent detection
7336 | - **topic-change.js**: Monitors conversation flow and triggers dynamic updates
7337 | - **memory-scorer.js**: Enhanced scoring with conversation context awareness
7338 | - **session-tracker.js**: Cross-session intelligence and conversation threading
7339 | - **dynamic-context-updater.js**: Orchestrates all Phase 2 components with rate limiting
7340 |
7341 | ##### Configuration Enhancements
7342 | - **Phase 2 Settings**: New configuration sections for conversation analysis, dynamic updates, session tracking
7343 | - **Flexible Thresholds**: Configurable significance scores, update limits, and confidence levels
7344 | - **Feature Toggles**: Independent enable/disable for each Phase 2 capability
7345 |
7346 | #### User Experience Improvements
7347 | - **Zero Cognitive Load**: Context updates happen automatically during conversations
7348 | - **Perfect Timing**: Memories appear exactly when relevant to current discussion
7349 | - **Seamless Integration**: Works transparently during normal coding sessions
7350 | - **Progressive Learning**: Each conversation builds upon previous knowledge intelligently
7351 |
7352 | #### Migration from Phase 1
7353 | - **Backward Compatible**: Phase 1 features remain fully functional
7354 | - **Additive Enhancement**: Phase 2 builds upon Phase 1 session-start memory injection
7355 | - **Unified Configuration**: Single config.json manages both Phase 1 and Phase 2 settings
7356 |
7357 | ## [6.0.0] - 2025-08-19
7358 |
7359 | ### 🧠 **MAJOR FEATURE: Claude Code Memory Awareness (Phase 1)**
7360 |
7361 | #### Revolutionary Memory-Aware Development Experience
7362 | This major release introduces **automatic memory awareness for Claude Code** - a sophisticated hook system that transforms how developers interact with their project knowledge and conversation history.
7363 |
7364 | #### Added
7365 |
7366 | ##### 🔄 **Session Lifecycle Hooks**
7367 | - **Session-Start Hook**: Automatically injects relevant memories when starting Claude Code sessions
7368 | - Intelligent project detection supporting JavaScript, Python, Rust, Go, Java, C++, and more
7369 | - Multi-factor memory relevance scoring with time decay, tag matching, and content analysis
7370 | - Context-aware memory selection (up to 8 most relevant memories per session)
7371 | - Beautiful markdown formatting for seamless context integration
7372 |
7373 | - **Session-End Hook**: Captures and consolidates session outcomes automatically
7374 | - Conversation analysis and intelligent summarization
7375 | - Automatic tagging with project context and session insights
7376 | - Long-term knowledge building through outcome storage
7377 | - Session relationship tracking for continuity
7378 |
7379 | ##### 🎯 **Advanced Project Detection System**
7380 | - **Multi-Language Support**: Detects 15+ project types and frameworks
7381 | - Package managers: `package.json`, `Cargo.toml`, `go.mod`, `requirements.txt`, `pom.xml`
7382 | - Build systems: `Makefile`, `CMakeLists.txt`, `build.gradle`, `setup.py`
7383 | - Configuration files: `tsconfig.json`, `pyproject.toml`, `.gitignore`
7384 | - **Git Integration**: Repository context analysis with branch and commit information
7385 | - **Framework Detection**: React, Vue, Angular, Django, Flask, Express, and more
7386 | - **Technology Stack Analysis**: Automatic identification of languages, databases, and tools
7387 |
7388 | ##### 🧮 **Intelligent Memory Scoring System**
7389 | - **Time Decay Algorithm**: Recent memories weighted higher with configurable decay curves
7390 | - **Tag Relevance Matching**: Project-specific and technology-specific tag scoring
7391 | - **Content Similarity Analysis**: Semantic matching with current project context
7392 | - **Memory Type Bonuses**: Prioritizes decisions, insights, and architecture notes
7393 | - **Relevance Threshold**: Only injects memories above significance threshold (>0.3)
7394 |
7395 | ##### 🎨 **Context Formatting & Presentation**
7396 | - **Categorized Memory Display**: Organized by Recent Insights, Key Decisions, and Project Context
7397 | - **Markdown-Rich Formatting**: Beautiful presentation with metadata, timestamps, and tags
7398 | - **Configurable Limits**: Prevents context overload with smart memory selection
7399 | - **Source Attribution**: Clear memory source tracking with content hashes
7400 |
7401 | ##### 💻 **Complete Installation & Testing System**
7402 | - **One-Command Installation**: `./install.sh` deploys entire system to Claude Code hooks
7403 | - **Comprehensive Test Suite**: 10 integration tests with 100% pass rate
7404 | - Project detection testing across multiple languages
7405 | - Memory scoring algorithm validation
7406 | - Context formatting verification
7407 | - Hook structure and configuration validation
7408 | - MCP service connectivity testing
7409 | - **Configuration Management**: Production-ready config with memory service endpoints
7410 | - **Backup and Recovery**: Automatic backup of existing hooks during installation
7411 |
7412 | #### Technical Architecture
7413 |
7414 | ##### 🏗️ **Claude Code Hooks System**
7415 | ```javascript
7416 | claude-hooks/
7417 | ├── core/
7418 | │ ├── session-start.js # Automatic memory injection hook
7419 | │ └── session-end.js # Session consolidation hook
7420 | ├── utilities/
7421 | │ ├── project-detector.js # Multi-language project detection
7422 | │ ├── memory-scorer.js # Relevance scoring algorithms
7423 | │ └── context-formatter.js # Memory presentation utilities
7424 | ├── tests/
7425 | │ └── integration-test.js # Complete test suite (100% pass)
7426 | ├── config.json # Production configuration
7427 | └── install.sh # One-command installation
7428 | ```
7429 |
7430 | ##### 🔗 **MCP Memory Service Integration**
7431 | - **JSON-RPC Protocol**: Direct communication with MCP Memory Service
7432 | - **Error Handling**: Graceful degradation when memory service unavailable
7433 | - **Performance Optimization**: Efficient memory querying with result caching
7434 | - **Security**: Content hash verification and safe JSON parsing
7435 |
7436 | ##### 📊 **Memory Selection Algorithm**
7437 | ```javascript
7438 | // Multi-factor scoring system
7439 | const relevanceScore = (
7440 | timeDecayScore * 0.4 + // Recent memories preferred
7441 | tagRelevanceScore * 0.3 + // Project-specific tags
7442 | contentSimilarityScore * 0.2 + // Semantic matching
7443 | memoryTypeBonusScore * 0.1 // Decision/insight bonus
7444 | );
7445 | ```
7446 |
7447 | #### Usage Examples
7448 |
7449 | ##### Automatic Session Context
7450 | ```markdown
7451 | # 🧠 Relevant Memory Context
7452 |
7453 | ## Recent Insights (Last 7 days)
7454 | - **Database Performance Issue** - Resolved SQLite-vec query optimization (yesterday)
7455 | - **Authentication Flow** - Implemented JWT token validation in API (3 days ago)
7456 |
7457 | ## Key Decisions
7458 | - **Architecture Decision** - Chose React over Vue for frontend consistency (1 week ago)
7459 | - **Database Choice** - Selected PostgreSQL for production scalability (2 weeks ago)
7460 |
7461 | ## Project Context: mcp-memory-service
7462 | - **Language**: JavaScript, Python
7463 | - **Frameworks**: Node.js, FastAPI
7464 | - **Recent Activity**: Bug fixes, feature implementation
7465 | ```
7466 |
7467 | ##### Session Outcome Storage
7468 | ```markdown
7469 | Session consolidated and stored with tags:
7470 | - mcp-memory-service, claude-code-session
7471 | - bug-fix, performance-optimization
7472 | - javascript, api-development
7473 | Content hash: abc123...def456
7474 | ```
7475 |
7476 | #### Benefits & Impact
7477 |
7478 | ##### 🚀 **Productivity Enhancements**
7479 | - **Zero Cognitive Load**: Memory context appears automatically without user intervention
7480 | - **Perfect Continuity**: Never lose track of decisions, insights, or architectural choices
7481 | - **Intelligent Context**: Only relevant memories shown, preventing information overload
7482 | - **Session Learning**: Each coding session builds upon previous knowledge automatically
7483 |
7484 | ##### 🧠 **Memory-Aware Development**
7485 | - **Decision Tracking**: Automatic capture of technical decisions and rationale
7486 | - **Knowledge Building**: Progressive accumulation of project understanding
7487 | - **Context Preservation**: Important insights never get lost between sessions
7488 | - **Team Knowledge Sharing**: Shareable memory context across team members
7489 |
7490 | ##### ⚡ **Performance Optimized**
7491 | - **Fast Startup**: Memory injection adds <2 seconds to session startup
7492 | - **Smart Caching**: Efficient memory retrieval with minimal API calls
7493 | - **Configurable Limits**: Prevents memory service overload with request throttling
7494 | - **Graceful Fallback**: Works with or without memory service availability
7495 |
7496 | #### Migration & Compatibility
7497 |
7498 | ##### 🔄 **Seamless Integration**
7499 | - **Non-Intrusive**: Works alongside existing Claude Code workflows
7500 | - **Backward Compatible**: No changes required to existing development processes
7501 | - **Optional Feature**: Can be enabled/disabled per project or globally
7502 | - **Multi-Environment**: Works with local, remote, and distributed memory services
7503 |
7504 | ##### 📋 **Installation Requirements**
7505 | - Claude Code CLI installed and configured
7506 | - MCP Memory Service running (local or remote)
7507 | - Node.js environment for hook execution
7508 | - Git repository for optimal project detection
7509 |
7510 | #### Roadmap Integration
7511 |
7512 | This release completes **Phase 1** of the Memory Awareness Enhancement Roadmap (Issue #14):
7513 | - ✅ Session startup hooks with automatic memory injection
7514 | - ✅ Project-aware memory selection algorithms
7515 | - ✅ Context formatting and injection utilities
7516 | - ✅ Comprehensive testing and installation system
7517 | - ✅ Production-ready configuration and deployment
7518 |
7519 | **Next Phase**: Dynamic memory loading, cross-session intelligence, and advanced consolidation features.
7520 |
7521 | #### Breaking Changes
7522 | None - This is a purely additive feature that enhances existing Claude Code functionality.
7523 |
7524 | ---
7525 |
7526 | ## [5.2.0] - 2025-08-18
7527 |
7528 | ### 🚀 **New Features**
7529 |
7530 | #### Command Line Interface (CLI)
7531 | - **Comprehensive CLI**: Added `memory` command with subcommands for document ingestion and management
7532 | - **Document Ingestion Commands**:
7533 | - `memory ingest-document <file>` - Ingest single documents with customizable chunking
7534 | - `memory ingest-directory <path>` - Batch process entire directories
7535 | - `memory list-formats` - Show all supported document formats
7536 | - **Management Commands**:
7537 | - `memory server` - Start the MCP server (replaces old `memory` command)
7538 | - `memory status` - Show service status and statistics
7539 | - **Advanced Options**: Tags, chunk sizing, storage backend selection, verbose output, dry-run mode
7540 | - **Progress Tracking**: Real-time progress bars and detailed error reporting
7541 | - **Cross-Platform**: Works on Windows, macOS, and Linux with proper path handling
7542 |
7543 | #### Enhanced Document Processing
7544 | - **Click Framework**: Professional CLI with help system and tab completion support
7545 | - **Async Operations**: Non-blocking document processing with proper resource management
7546 | - **Error Recovery**: Graceful handling of processing errors with detailed diagnostics
7547 | - **Batch Limits**: Configurable file limits and extension filtering for large directories
7548 |
7549 | **New Dependencies**: `click>=8.0.0` for CLI framework
7550 |
7551 | **Examples**:
7552 | ```bash
7553 | memory ingest-document manual.pdf --tags documentation,manual --verbose
7554 | memory ingest-directory ./docs --recursive --max-files 50
7555 | memory list-formats
7556 | memory status
7557 | ```
7558 |
7559 | **Backward Compatibility**: Old `memory` server command now available as `memory server` and `memory-server`
7560 |
7561 | ## [5.1.0] - 2025-08-18
7562 |
7563 | ### 🚀 **New Features**
7564 |
7565 | #### Remote ChromaDB Support
7566 | - **Enterprise-Ready**: Connect to remote ChromaDB servers, Chroma Cloud, or self-hosted instances
7567 | - **HttpClient Implementation**: Full support for remote ChromaDB connectivity
7568 | - **Authentication**: API key authentication via `X_CHROMA_TOKEN` header
7569 | - **SSL/HTTPS Support**: Secure connections to remote ChromaDB servers
7570 | - **Custom Collections**: Specify collection names for multi-tenant deployments
7571 |
7572 | **New Environment Variables:**
7573 | - `MCP_MEMORY_CHROMADB_HOST`: Remote server hostname (enables remote mode)
7574 | - `MCP_MEMORY_CHROMADB_PORT`: Server port (default: 8000)
7575 | - `MCP_MEMORY_CHROMADB_SSL`: Use HTTPS ('true'/'false')
7576 | - `MCP_MEMORY_CHROMADB_API_KEY`: Authentication token
7577 | - `MCP_MEMORY_COLLECTION_NAME`: Custom collection name (default: 'memory_collection')
7578 |
7579 | **Perfect Timing**: Arrives just as Chroma Cloud launches Q1 2025 (early access available)
7580 |
7581 | **Resolves**: #36 (Remote ChromaDB support request)
7582 |
7583 | ## [5.0.5] - 2025-08-18
7584 |
7585 | ### 🐛 **Bug Fixes**
7586 |
7587 | #### Code Quality & Future Compatibility
7588 | - **Fixed datetime deprecation warnings**: Replaced all `datetime.utcnow()` usage with `datetime.now(timezone.utc)`
7589 | - Updated `src/mcp_memory_service/web/api/health.py` (2 occurrences)
7590 | - Updated `src/mcp_memory_service/web/sse.py` (3 occurrences)
7591 | - Eliminates deprecation warnings in Python 3.12+
7592 | - Future-proof timezone-aware datetime handling
7593 |
7594 | ### 🎨 **UI Improvements**
7595 |
7596 | #### Dashboard Mobile Responsiveness
7597 | - **Enhanced mobile UX**: Added responsive design for action buttons
7598 | - Buttons now stack vertically on screens < 768px width
7599 | - Improved touch-friendly spacing and sizing
7600 | - Better mobile experience for API documentation links
7601 | - Maintains desktop horizontal layout on larger screens
7602 |
7603 | **Issues Resolved**: #68 (Code Quality & Deprecation Fixes), #80 (Dashboard Mobile Responsiveness)
7604 |
7605 | ## [5.0.4] - 2025-08-18
7606 |
7607 | ### 🐛 **Critical Bug Fixes**
7608 |
7609 | #### SQLite-vec Embedding Model Loading
7610 | - **Fixed UnboundLocalError**: Removed redundant `import os` statement at line 285 in `sqlite_vec.py`
7611 | - Variable shadowing prevented ONNX embedding model initialization
7612 | - Caused "cannot access local variable 'os'" error in production
7613 | - Restored full embedding functionality for memory storage
7614 |
7615 | #### Docker HTTP Server Support
7616 | - **Fixed Missing Files**: Added `run_server.py` to Docker image (reported by Joe Esposito)
7617 | - HTTP server wouldn't start without this critical file
7618 | - Now properly copied in Dockerfile for HTTP/API mode
7619 | - **Fixed Python Path**: Corrected `PYTHONPATH` from `/app` to `/app/src`
7620 | - Modules couldn't be found with incorrect path
7621 | - Essential for both MCP and HTTP modes
7622 |
7623 | ### 🚀 **Major Docker Improvements**
7624 |
7625 | #### Simplified Docker Architecture
7626 | - **Reduced Complexity by 60%**: Consolidated from 4 confusing compose files to 2 clear options
7627 | - `docker-compose.yml` for MCP protocol mode (Claude Desktop, VS Code)
7628 | - `docker-compose.http.yml` for HTTP/API mode (REST API, Web Dashboard)
7629 | - **Unified Entrypoint**: Created single smart entrypoint script
7630 | - Auto-detects mode from `MCP_MODE` environment variable
7631 | - Eliminates confusion about which script to use
7632 | - **Pre-download Models**: Embedding models now downloaded during Docker build
7633 | - Prevents runtime failures from network/DNS issues
7634 | - Makes containers fully self-contained
7635 | - Faster startup times
7636 |
7637 | #### Deprecated Docker Files
7638 | - Marked 4 redundant Docker files as deprecated:
7639 | - `docker-compose.standalone.yml` → Use `docker-compose.http.yml`
7640 | - `docker-compose.uv.yml` → UV now built into main Dockerfile
7641 | - `docker-compose.pythonpath.yml` → Fix applied to main Dockerfile
7642 | - `docker-entrypoint-persistent.sh` → Replaced by unified entrypoint
7643 |
7644 | ### 📝 **Documentation**
7645 |
7646 | #### Docker Documentation Overhaul
7647 | - **Added Docker README**: Clear instructions for both MCP and HTTP modes
7648 | - **Created DEPRECATED.md**: Migration guide for old Docker setups
7649 | - **Added Test Script**: `test-docker-modes.sh` to verify both modes work
7650 | - **Troubleshooting Guide**: Added comprehensive debugging section to CLAUDE.md
7651 | - Web frontend debugging (CSS/format string conflicts)
7652 | - Cache clearing procedures
7653 | - Environment reset steps
7654 | - Backend method compatibility
7655 |
7656 | ### 🙏 **Credits**
7657 | - Special thanks to **Joe Esposito** for identifying and helping fix critical Docker issues
7658 |
7659 | ## [5.0.3] - 2025-08-17
7660 |
7661 | ### 🐛 **Bug Fixes**
7662 |
7663 | #### SQLite-vec Backend Method Support
7664 | - **Fixed Missing Method**: Added `search_by_tags` method to SQLite-vec backend
7665 | - Web API was calling `search_by_tags` (plural) but backend only had `search_by_tag` (singular)
7666 | - This caused 500 errors when using tag-based search via HTTP/MCP endpoints
7667 | - New method supports both AND/OR operations for tag matching
7668 | - Fixes network distribution and memory retrieval functionality
7669 |
7670 | ### 🚀 **Enhancements**
7671 |
7672 | #### Version Information in Health Checks
7673 | - **Added Version Field**: All health endpoints now return service version
7674 | - Basic health endpoint (`/api/health`) includes version field
7675 | - Detailed health endpoint (`/api/health/detailed`) includes version field
7676 | - MCP `check_database_health` tool returns version in response
7677 | - Enables easier debugging and version tracking across deployments
7678 |
7679 | ### 🚀 **New Features**
7680 |
7681 | #### Memory Distribution and Network Sharing
7682 | - **Export Tool**: Added `scripts/export_distributable_memories.sh` for memory export
7683 | - Export memories tagged with `distributable-reference` for team sharing
7684 | - JSON format for easy import to other MCP instances
7685 | - Support for cross-network memory synchronization
7686 | - **Personalized CLAUDE.md Generator**: Added `scripts/generate_personalized_claude_md.sh`
7687 | - Generate CLAUDE.md with embedded memory service endpoints
7688 | - Customize for different network deployments
7689 | - Include memory retrieval commands for each environment
7690 | - **Memory Context Templates**: Added `prompts/load_memory_context.md`
7691 | - Ready-to-use prompts for loading project context
7692 | - Quick retrieval commands for Claude Code sessions
7693 | - Network distribution instructions
7694 |
7695 | ### 📝 **Documentation**
7696 |
7697 | #### Network Distribution Updates
7698 | - **Fixed Memory Retrieval Commands**: Updated scripts to use working API methods
7699 | - Changed from non-existent `search_by_tag` to `retrieve_memory` for current deployments
7700 | - Updated prompt templates and distribution scripts
7701 | - Improved error handling for memory context loading
7702 | - **CLAUDE.md Enhancements**: Added optional memory context section
7703 | - Instructions for setting up local memory service integration
7704 | - Guidelines for creating CLAUDE_MEMORY.md (git-ignored) for local configurations
7705 | - Best practices for memory management and quarterly reviews
7706 |
7707 | ## [5.0.2] - 2025-08-17
7708 |
7709 | ### 🚀 **New Features**
7710 |
7711 | #### ONNX Runtime Support
7712 | - **PyTorch-free operation**: True PyTorch-free embedding generation using ONNX Runtime
7713 | - Reduced dependencies (~500MB less disk space without PyTorch)
7714 | - Faster startup with pre-optimized ONNX models
7715 | - Automatic fallback to SentenceTransformers when needed
7716 | - Compatible with the same `all-MiniLM-L6-v2` model embeddings
7717 | - Enable with `export MCP_MEMORY_USE_ONNX=true`
7718 |
7719 | ### 🐛 **Bug Fixes**
7720 |
7721 | #### SQLite-vec Consolidation Support (Issue #84)
7722 | - **Missing Methods Fixed**: Added all required methods for consolidation support
7723 | - Implemented `get_memories_by_time_range()` for time-based queries
7724 | - Added `get_memory_connections()` for relationship tracking statistics
7725 | - Added `get_access_patterns()` for access pattern analysis
7726 | - Added `get_all_memories()` method with proper SQL implementation
7727 |
7728 | #### Installer Accuracy
7729 | - **False ONNX Claims**: Fixed misleading installer messages about ONNX support
7730 | - Removed false claims about "ONNX runtime for embeddings" when no implementation existed
7731 | - Updated installer messages to accurately reflect capabilities
7732 | - Now actually implements the ONNX support that was previously claimed
7733 |
7734 | #### Docker Configuration
7735 | - **SQLite-vec Defaults**: Updated Docker configuration to reflect SQLite-vec as default backend
7736 | - Updated `Dockerfile` environment variables to use `MCP_MEMORY_STORAGE_BACKEND=sqlite_vec`
7737 | - Changed paths from `/app/chroma_db` to `/app/sqlite_db`
7738 | - Updated `docker-compose.yml` with SQLite-vec configuration
7739 | - Fixed volume mounts and environment variables
7740 |
7741 | ### 📝 **Documentation**
7742 |
7743 | #### Enhanced README
7744 | - **ONNX Feature Documentation**: Added comprehensive ONNX Runtime feature section
7745 | - **Installation Updates**: Updated installation instructions with ONNX dependencies
7746 | - **Feature Visibility**: Highlighted ONNX support in main features list
7747 |
7748 | #### Technical Implementation
7749 | - **New Module**: Created `src/mcp_memory_service/embeddings/onnx_embeddings.py`
7750 | - Complete ONNX embedding implementation based on ChromaDB's ONNXMiniLM_L6_V2
7751 | - Automatic model downloading and caching
7752 | - Hardware-aware provider selection (CPU, CUDA, DirectML, CoreML)
7753 | - Error handling with graceful fallbacks
7754 |
7755 | - **Enhanced Configuration**: Added ONNX configuration support in `config.py`
7756 | - `USE_ONNX` configuration option
7757 | - ONNX model cache directory management
7758 | - Environment variable support for `MCP_MEMORY_USE_ONNX`
7759 |
7760 | ### Technical Notes
7761 | - Full backward compatibility maintained for existing SQLite-vec users
7762 | - ONNX support is optional and falls back gracefully to SentenceTransformers
7763 | - All consolidation methods implemented with proper error handling
7764 | - Docker images now correctly reflect the SQLite-vec default backend
7765 |
7766 | This release resolves all issues reported in GitHub issue #84, implementing true ONNX support and completing the SQLite-vec consolidation feature set.
7767 | ## [6.2.0] - 2025-08-20
7768 |
7769 | ### 🚀 **MAJOR FEATURE: Native Cloudflare Backend Integration**
7770 |
7771 | This major release introduces native Cloudflare integration as a third storage backend option alongside SQLite-vec and ChromaDB, providing global distribution, automatic scaling, and enterprise-grade infrastructure, integrated with the existing Memory Awareness system.
7772 |
7773 | #### Added
7774 | - **Native Cloudflare Backend Support**: Complete implementation using Cloudflare's edge computing platform
7775 | - **Vectorize**: 768-dimensional vector storage with cosine similarity for semantic search
7776 | - **D1 Database**: SQLite-compatible database for metadata storage
7777 | - **Workers AI**: Embedding generation using @cf/baai/bge-base-en-v1.5 model
7778 | - **R2 Storage** (optional): Object storage for large content exceeding 1MB threshold
7779 |
7780 | - **Implementation Files**:
7781 | - `src/mcp_memory_service/storage/cloudflare.py` - Complete CloudflareStorage implementation (740 lines)
7782 | - `scripts/migrate_to_cloudflare.py` - Migration tool for existing SQLite-vec and ChromaDB users
7783 | - `scripts/test_cloudflare_backend.py` - Comprehensive test suite with automated validation
7784 | - `scripts/setup_cloudflare_resources.py` - Automated Cloudflare resource provisioning
7785 | - `docs/cloudflare-setup.md` - Complete setup, configuration, and troubleshooting guide
7786 | - `tests/unit/test_cloudflare_storage.py` - 15 unit tests for CloudflareStorage class
7787 |
7788 | - **Features**:
7789 | - Automatic retry logic with exponential backoff for API rate limiting
7790 | - Connection pooling for optimal HTTP performance
7791 | - NDJSON format support for Vectorize v2 API endpoints
7792 | - LRU caching (1000 entries) for embedding deduplication
7793 | - Batch operations support for efficient data processing
7794 | - Global distribution with <100ms latency from most locations
7795 | - Pay-per-use pricing model with no upfront costs
7796 |
7797 | #### Changed
7798 | - Updated `config.py` to include 'cloudflare' in SUPPORTED_BACKENDS
7799 | - Enhanced server initialization in `mcp_server.py` to support Cloudflare backend
7800 | - Updated storage factory in `storage/__init__.py` to create CloudflareStorage instances
7801 | - Consolidated documentation, removing redundant setup files
7802 |
7803 | #### Technical Details
7804 | - **Environment Variables**:
7805 | - `MCP_MEMORY_STORAGE_BACKEND=cloudflare` - Activate Cloudflare backend
7806 | - `CLOUDFLARE_API_TOKEN` - API token with Vectorize, D1, Workers AI permissions
7807 | - `CLOUDFLARE_ACCOUNT_ID` - Cloudflare account identifier
7808 | - `CLOUDFLARE_VECTORIZE_INDEX` - Name of Vectorize index (768 dimensions)
7809 | - `CLOUDFLARE_D1_DATABASE_ID` - D1 database UUID
7810 | - `CLOUDFLARE_R2_BUCKET` (optional) - R2 bucket for large content
7811 |
7812 | - **Performance Characteristics**:
7813 | - Storage: ~200ms per memory (including embedding generation)
7814 | - Search: ~100ms for semantic search (5 results)
7815 | - Batch operations: ~50ms per memory in batches of 100
7816 | - Global latency: <100ms from most global locations
7817 |
7818 | #### Migration Path
7819 | Users can migrate from existing backends using provided scripts:
7820 | ```bash
7821 | # From SQLite-vec
7822 | python scripts/migrate_to_cloudflare.py --source sqlite
7823 |
7824 | # From ChromaDB
7825 | python scripts/migrate_to_cloudflare.py --source chroma
7826 | ```
7827 |
7828 | #### Memory Awareness Integration
7829 | - **Full Compatibility**: Cloudflare backend works seamlessly with Phase 1 and Phase 2 Memory Awareness
7830 | - **Cross-Session Intelligence**: Session tracking and conversation threading supported
7831 | - **Dynamic Context Updates**: Real-time memory loading during conversations
7832 | - **Global Performance**: Enhances Memory Awareness with <100ms global response times
7833 |
7834 | #### Compatibility
7835 | - Fully backward compatible with existing SQLite-vec and ChromaDB backends
7836 | - No breaking changes to existing APIs or configurations
7837 | - Supports all existing MCP operations and features
7838 | - Compatible with all existing Memory Awareness hooks and functionality
7839 |
7840 | ## [5.0.1] - 2025-08-15
7841 |
7842 | ### 🐛 **Critical Migration Fixes**
7843 |
7844 | This patch release addresses critical issues in the v5.0.0 ChromaDB to SQLite-vec migration process reported in [Issue #83](https://github.com/doobidoo/mcp-memory-service/issues/83).
7845 |
7846 | #### Fixed
7847 | - **Custom Data Paths**: Migration scripts now properly support custom ChromaDB locations via CLI arguments and environment variables
7848 | - Added `--chroma-path` and `--sqlite-path` arguments to migration scripts
7849 | - Support for `MCP_MEMORY_CHROMA_PATH` and `MCP_MEMORY_SQLITE_PATH` environment variables
7850 | - Fixed hardcoded path assumptions that ignored user configurations
7851 |
7852 | - **Content Hash Generation**: Fixed critical bug where ChromaDB document IDs were used instead of proper SHA256 hashes
7853 | - Now generates correct content hashes using SHA256 algorithm
7854 | - Prevents "NOT NULL constraint failed" errors during migration
7855 | - Ensures data integrity and proper deduplication
7856 |
7857 | - **Tag Format Corruption**: Fixed issue where 60% of tags became malformed during migration
7858 | - Improved tag validation and format conversion
7859 | - Handles comma-separated strings, arrays, and single tags correctly
7860 | - Prevents array syntax from being stored as strings
7861 |
7862 | - **Migration Progress**: Added progress indicators and better error reporting
7863 | - Shows percentage completion during migration
7864 | - Batch processing with configurable batch size
7865 | - Verbose mode for detailed debugging
7866 | - Clear error messages for troubleshooting
7867 |
7868 | #### Added
7869 | - **Enhanced Migration Script** (`scripts/migrate_v5_enhanced.py`):
7870 | - Comprehensive migration tool with all fixes
7871 | - Dry-run mode for testing migrations
7872 | - Transaction-based migration with rollback support
7873 | - Progress bars with `tqdm` support
7874 | - JSON backup creation
7875 | - Automatic path detection for common installations
7876 |
7877 | - **Migration Validator** (`scripts/validate_migration.py`):
7878 | - Validates migrated SQLite database integrity
7879 | - Checks for missing fields and corrupted data
7880 | - Compares with original ChromaDB data
7881 | - Generates detailed validation report
7882 | - Identifies specific issues like hash mismatches and tag corruption
7883 |
7884 | - **Comprehensive Documentation**:
7885 | - Updated migration guide with troubleshooting section
7886 | - Documented all known v5.0.0 issues and solutions
7887 | - Added recovery procedures for failed migrations
7888 | - Migration best practices and validation steps
7889 |
7890 | #### Enhanced
7891 | - **Original Migration Script** (`scripts/migrate_chroma_to_sqlite.py`):
7892 | - Added CLI argument support for custom paths
7893 | - Fixed content hash generation
7894 | - Improved tag handling
7895 | - Better duplicate detection
7896 | - Progress percentage display
7897 |
7898 | #### Documentation
7899 | - **Migration Troubleshooting Guide**: Added comprehensive troubleshooting section covering:
7900 | - Custom data location issues
7901 | - Content hash errors
7902 | - Tag corruption problems
7903 | - Migration hangs
7904 | - Dependency conflicts
7905 | - Recovery procedures
7906 |
7907 | ## [5.0.0] - 2025-08-15
7908 |
7909 | ### ⚠️ **BREAKING CHANGES**
7910 |
7911 | #### ChromaDB Deprecation
7912 | - **DEPRECATED**: ChromaDB backend is now deprecated and will be removed in v6.0.0
7913 | - **DEFAULT CHANGE**: SQLite-vec is now the default storage backend (previously ChromaDB)
7914 | - **MIGRATION REQUIRED**: Users with existing ChromaDB data should migrate to SQLite-vec
7915 | - Run `python scripts/migrate_to_sqlite_vec.py` to migrate your data
7916 | - Migration is one-way only (ChromaDB → SQLite-vec)
7917 | - Backup your data before migration
7918 |
7919 | #### Why This Change?
7920 | - **Network Issues**: ChromaDB requires downloading models from Hugging Face, causing frequent failures
7921 | - **Performance**: SQLite-vec is 10x faster at startup (2-3 seconds vs 15-30 seconds)
7922 | - **Resource Usage**: SQLite-vec uses 75% less memory than ChromaDB
7923 | - **Reliability**: Zero network dependencies means no download failures or connection issues
7924 | - **Simplicity**: Single-file database, easier backup and portability
7925 |
7926 | #### Changed
7927 | - **Default Backend**: Changed from ChromaDB to SQLite-vec in all configurations
7928 | - **Installation**: `install.py` now installs SQLite-vec dependencies by default
7929 | - **Documentation**: Updated all guides to recommend SQLite-vec as primary backend
7930 | - **Warnings**: Added deprecation warnings when ChromaDB backend is used
7931 | - **Migration Prompts**: Server now prompts for migration when ChromaDB data is detected
7932 |
7933 | #### Migration Guide
7934 | 1. **Backup your data**: `python scripts/create_backup.py`
7935 | 2. **Run migration**: `python scripts/migrate_to_sqlite_vec.py`
7936 | 3. **Update configuration**: Set `MCP_MEMORY_STORAGE_BACKEND=sqlite_vec`
7937 | 4. **Restart server**: Your memories are now in SQLite-vec format
7938 |
7939 | #### Backward Compatibility
7940 | - ChromaDB backend still functions but displays deprecation warnings
7941 | - Existing ChromaDB installations continue to work until v6.0.0
7942 | - Migration tools provided for smooth transition
7943 | - All APIs remain unchanged regardless of backend
7944 |
7945 | ## [4.6.1] - 2025-08-14
7946 |
7947 | ### 🐛 **Bug Fixes**
7948 |
7949 | #### Fixed
7950 | - **Export/Import Script Database Path Detection**: Fixed critical bug in memory export and import scripts
7951 | - Export script now properly respects `SQLITE_VEC_PATH` configuration from `config.py`
7952 | - Import script now properly respects `SQLITE_VEC_PATH` configuration from `config.py`
7953 | - Scripts now use environment variables like `MCP_MEMORY_SQLITE_PATH` correctly
7954 | - Fixed issue where export/import would use wrong database path, missing actual memories
7955 | - Added support for custom database paths via `--db-path` argument
7956 | - Ensures export captures all memories from the configured database location
7957 | - Ensures import writes to the correct configured database location
7958 |
7959 | #### Enhanced
7960 | - **Export/Import Script Configuration**: Improved database path detection logic
7961 | - Falls back gracefully when SQLite-vec backend is not configured
7962 | - Maintains compatibility with different storage backend configurations
7963 | - Added proper imports for configuration variables
7964 |
7965 | #### Technical Details
7966 | - Modified `scripts/sync/export_memories.py` to use `SQLITE_VEC_PATH` instead of `BASE_DIR`
7967 | - Modified `scripts/sync/import_memories.py` to use `SQLITE_VEC_PATH` instead of `BASE_DIR`
7968 | - Updated `get_default_db_path()` functions in both scripts to check storage backend configuration
7969 | - Added version bump to exporter metadata for tracking
7970 | - Added `get_all_memories()` method to `SqliteVecMemoryStorage` for proper export functionality
7971 |
7972 | ## [4.6.0] - 2025-08-14
7973 |
7974 | ### ✨ **New Features**
7975 |
7976 | #### Added
7977 | - **Custom SSL Certificate Support**: Added environment variable configuration for SSL certificates
7978 | - New `MCP_SSL_CERT_FILE` environment variable for custom certificate path
7979 | - New `MCP_SSL_KEY_FILE` environment variable for custom private key path
7980 | - Maintains backward compatibility with self-signed certificate generation
7981 | - Enables production deployments with proper SSL certificates (e.g., mkcert, Let's Encrypt)
7982 |
7983 | #### Enhanced
7984 | - **HTTPS Server Configuration**: Improved certificate validation and error handling
7985 | - Certificate file existence validation before server startup
7986 | - Clear error messages for missing certificate files
7987 | - Logging improvements for certificate source identification
7988 |
7989 | #### Documentation
7990 | - **SSL/TLS Setup Guide**: Added comprehensive SSL configuration documentation
7991 | - Integration guide for [mkcert](https://github.com/FiloSottile/mkcert) for local development
7992 | - Example HTTPS startup script template
7993 | - Client CA installation instructions for multiple operating systems
7994 |
7995 | ## [4.5.2] - 2025-08-14
7996 |
7997 | ### 🐛 **Bug Fixes & Documentation**
7998 |
7999 | #### Fixed
8000 | - **JSON Protocol Compatibility**: Resolved debug output contaminating MCP JSON-RPC communication
8001 | - Fixed unconditional debug print statements causing "Unexpected token" errors in Claude Desktop logs
8002 | - Added client detection checks to `TOOL CALL INTERCEPTED` and `Processing tool` debug messages
8003 | - Ensures clean JSON-only output for Claude Desktop while preserving debug output for LM Studio
8004 |
8005 | #### Enhanced
8006 | - **Universal README Documentation**: Transformed from Claude Desktop-specific to universal AI client focus
8007 | - Updated opening description to emphasize compatibility with "AI applications and development environments"
8008 | - Added prominent compatibility badges for Cursor, WindSurf, LM Studio, Zed, and other AI clients
8009 | - Moved comprehensive client compatibility table to prominent position in documentation
8010 | - Expanded client support details for 13+ different AI applications and IDEs
8011 | - Added multi-client benefits section highlighting cross-tool memory sharing capabilities
8012 | - Updated examples and Docker configurations to be client-agnostic
8013 |
8014 | #### Documentation
8015 | - **Improved Client Visibility**: Enhanced documentation structure for broader MCP ecosystem appeal
8016 | - **Balanced Examples**: Updated API examples to focus on universal MCP access rather than specific clients
8017 | - **Clear Compatibility Matrix**: Detailed status and configuration for each supported AI client
8018 |
8019 | ## [4.5.1] - 2025-08-13
8020 |
8021 | ### 🎯 **Enhanced Multi-Client Support**
8022 |
8023 | #### Added
8024 | - **Intelligent Client Detection**: Automatic detection of MCP client type
8025 | - Detects Claude Desktop, LM Studio, and other MCP clients
8026 | - Uses process inspection and environment variables for robust detection
8027 | - Falls back to strict JSON mode for unknown clients
8028 |
8029 | - **Client-Aware Logging System**: Optimized output for different MCP clients
8030 | - **Claude Desktop Mode**: Pure JSON-RPC protocol compliance
8031 | - Suppresses diagnostic output to maintain clean JSON communication
8032 | - Routes only WARNING/ERROR messages to stderr
8033 | - Ensures maximum compatibility with Claude's strict parsing
8034 | - **LM Studio Mode**: Enhanced diagnostic experience
8035 | - Shows system diagnostics, dependency checks, and initialization status
8036 | - Provides detailed feedback for troubleshooting
8037 | - Maintains full INFO/DEBUG output to stdout
8038 |
8039 | #### Enhanced
8040 | - **Improved Stability**: All diagnostic output is now conditional based on client type
8041 | - 15+ print statements updated with client-aware logic
8042 | - System diagnostics, dependency checks, and initialization messages
8043 | - Docker mode detection and standalone mode indicators
8044 |
8045 | #### Technical Details
8046 | - Added `psutil` dependency for process-based client detection
8047 | - Implemented `DualStreamHandler` with client-aware routing
8048 | - Environment variable support: `CLAUDE_DESKTOP=1` or `LM_STUDIO=1` for manual override
8049 | - Maintains full backward compatibility with existing integrations
8050 |
8051 | ## [4.5.0] - 2025-08-12
8052 |
8053 | ### 🔄 **Database Synchronization System**
8054 |
8055 | #### Added
8056 | - **Multi-Node Database Sync**: Complete Litestream-based synchronization for SQLite-vec databases
8057 | - **JSON Export/Import**: Preserve timestamps and metadata across database migrations
8058 | - **Litestream Integration**: Real-time database replication with conflict resolution
8059 | - **3-Node Architecture**: Central server with replica nodes for distributed workflows
8060 | - **Deduplication Logic**: Content hash-based duplicate prevention during imports
8061 | - **Source Tracking**: Automatic tagging to identify memory origin machines
8062 |
8063 | - **New Sync Module**: `src/mcp_memory_service/sync/`
8064 | - `MemoryExporter`: Export memories to JSON with full metadata preservation
8065 | - `MemoryImporter`: Import with intelligent deduplication and source tracking
8066 | - `LitestreamManager`: Automated Litestream configuration and management
8067 |
8068 | - **Sync Scripts Suite**: `scripts/sync/`
8069 | - `export_memories.py`: Platform-aware memory export utility
8070 | - `import_memories.py`: Central server import with merge statistics
8071 | - `README.md`: Comprehensive usage documentation
8072 |
8073 | #### Enhanced
8074 | - **Migration Tools**: Extended existing migration scripts to support sync workflows
8075 | - **Backup Integration**: Sync capabilities integrate with existing backup system
8076 | - **Health Monitoring**: Added sync status to health endpoints and monitoring
8077 |
8078 | #### Documentation
8079 | - **Complete Sync Guide**: `docs/deployment/database-synchronization.md`
8080 | - **Technical Architecture**: Detailed setup and troubleshooting documentation
8081 | - **Migration Examples**: Updated migration documentation with sync procedures
8082 |
8083 | #### Use Cases
8084 | - **Multi-Device Workflows**: Keep memories synchronized across Windows, macOS, and server
8085 | - **Team Collaboration**: Shared memory databases with individual client access
8086 | - **Backup and Recovery**: Real-time replication provides instant backup capability
8087 | - **Offline Capability**: Local replicas work offline, sync when reconnected
8088 |
8089 | This release enables seamless database synchronization across multiple machines while preserving all memory metadata, timestamps, and source attribution.
8090 |
8091 | ## [4.4.0] - 2025-08-12
8092 |
8093 | ### 🚀 **Backup System Enhancements**
8094 |
8095 | #### Added
8096 | - **SQLite-vec Backup Support**: Enhanced MCP backup system to fully support SQLite-vec backend
8097 | - **Multi-Backend Support**: `dashboard_create_backup` now handles both ChromaDB and SQLite-vec databases
8098 | - **Complete File Coverage**: Backs up main database, WAL, and SHM files for data integrity
8099 | - **Metadata Generation**: Creates comprehensive backup metadata with size, file count, and backend info
8100 | - **Error Handling**: Robust error handling and validation during backup operations
8101 |
8102 | - **Automated Backup Infrastructure**: Complete automation solution for production deployments
8103 | - **Backup Script**: `scripts/backup_sqlite_vec.sh` with 7-day retention policy
8104 | - **Cron Setup**: `scripts/setup_backup_cron.sh` for easy daily backup scheduling
8105 | - **Metadata Tracking**: JSON metadata files with backup timestamp, size, and source information
8106 | - **Automatic Cleanup**: Old backup removal to prevent disk space issues
8107 |
8108 | #### Enhanced
8109 | - **Backup Reliability**: Improved backup system architecture for production use
8110 | - **Backend Detection**: Automatic detection and appropriate handling of storage backend
8111 | - **File Integrity**: Proper handling of SQLite WAL mode with transaction log files
8112 | - **Consistent Naming**: Standardized backup naming with timestamps
8113 | - **Validation**: Pre-backup validation of source files and post-backup verification
8114 |
8115 | #### Technical Details
8116 | - **Storage Backend**: Seamless support for both `sqlite_vec` and `chroma` backends
8117 | - **File Operations**: Safe file copying with proper permission handling
8118 | - **Scheduling**: Cron integration for hands-off automated backups
8119 | - **Monitoring**: Backup logs and status tracking for operational visibility
8120 |
8121 | ## [4.3.5] - 2025-08-12
8122 |
8123 | ### 🔧 **Critical Fix: Client Hostname Capture**
8124 |
8125 | #### Fixed
8126 | - **Architecture Correction**: Fixed hostname capture to identify CLIENT machine instead of server machine
8127 | - **Before**: Always captured server hostname (`narrowbox`) regardless of client
8128 | - **After**: Prioritizes client-provided hostname, fallback to server hostname
8129 | - **HTTP API**: Supports `client_hostname` in request body + `X-Client-Hostname` header
8130 | - **MCP Server**: Added `client_hostname` parameter to store_memory tool
8131 | - **Legacy Server**: Supports `client_hostname` in arguments dictionary
8132 | - **Priority Order**: request body > HTTP header > server hostname fallback
8133 |
8134 | #### Changed
8135 | - **Client Detection Logic**: Updated all three interfaces with proper client hostname detection
8136 | - `memories.py`: Added Request parameter and header/body hostname extraction
8137 | - `mcp_server.py`: Added client_hostname parameter with priority logic
8138 | - `server.py`: Added client_hostname argument extraction with fallback
8139 | - Maintains backward compatibility when `MCP_MEMORY_INCLUDE_HOSTNAME=false`
8140 |
8141 | #### Documentation
8142 | - **Command Templates**: Updated repository templates with client hostname detection guidance
8143 | - **API Documentation**: Enhanced descriptions to clarify client vs server hostname capture
8144 | - **Test Documentation**: Added comprehensive test scenarios and verification steps
8145 |
8146 | #### Technical Impact
8147 | - ✅ **Multi-device workflows**: Memories now correctly identify originating client machine
8148 | - ✅ **Audit trails**: Proper source attribution across different client connections
8149 | - ✅ **Remote deployments**: Works correctly when client and server are different machines
8150 | - ✅ **Backward compatible**: No breaking changes, respects environment variable setting
8151 |
8152 | ## [4.3.4] - 2025-08-12
8153 |
8154 | ### 🔧 **Optional Machine Identification**
8155 |
8156 | #### Added
8157 | - **Environment-Controlled Machine Tracking**: Made machine identification optional via environment variable
8158 | - New environment variable: `MCP_MEMORY_INCLUDE_HOSTNAME` (default: `false`)
8159 | - When enabled, automatically adds machine hostname to all stored memories
8160 | - Adds both `source:hostname` tag and hostname metadata field
8161 | - Supports all interfaces: MCP server, HTTP API, and legacy server
8162 | - Privacy-focused: disabled by default, enables multi-device workflows when needed
8163 |
8164 | #### Changed
8165 | - **Memory Storage Enhancement**: All memory storage operations now support optional machine tracking
8166 | - Updated `mcp_server.py` store_memory function with hostname logic
8167 | - Enhanced HTTP API `/memories` endpoint with machine identification
8168 | - Updated legacy `server.py` with consistent hostname tracking
8169 | - Maintains backward compatibility with existing memory operations
8170 |
8171 | #### Documentation
8172 | - **CLAUDE.md Updated**: Added `MCP_MEMORY_INCLUDE_HOSTNAME` environment variable documentation
8173 | - **Configuration Guide**: Explains optional hostname tracking for audit trails and multi-device setups
8174 |
8175 | ## [4.3.3] - 2025-08-12
8176 |
8177 | ### 🎯 **Claude Code Command Templates Enhancement**
8178 |
8179 | #### Added
8180 | - **Machine Source Tracking**: All memory storage commands now automatically include machine hostname as a tag
8181 | - Enables filtering memories by originating machine (e.g., `source:machine-name`)
8182 | - Adds hostname to both tags and metadata for redundancy
8183 | - Supports multi-device workflows and audit trails
8184 |
8185 | #### Changed
8186 | - **Command Templates Updated**: All five memory command templates enhanced with:
8187 | - Updated to use generic HTTPS endpoint (`https://memory.local:8443/`)
8188 | - Proper API endpoint paths documented for all operations
8189 | - Auto-save functionality without confirmation prompts
8190 | - curl with `-k` flag for HTTPS self-signed certificates
8191 | - Machine hostname tracking integrated throughout
8192 |
8193 | #### Documentation
8194 | - `memory-store.md`: Added machine context and HTTPS configuration
8195 | - `memory-health.md`: Updated with specific health API endpoints
8196 | - `memory-search.md`: Added all search API endpoints and machine source search
8197 | - `memory-context.md`: Integrated machine tracking for session captures
8198 | - `memory-recall.md`: Updated with API endpoints and time parser limitations
8199 |
8200 | ## [4.3.2] - 2025-08-11
8201 |
8202 | ### 🎯 **Repository Organization & PyTorch Download Fix**
8203 |
8204 | #### Fixed
8205 | - **PyTorch Repeated Downloads**: Completely resolved Claude Desktop downloading PyTorch (230MB+) on every startup
8206 | - Root cause: UV package manager isolation prevented offline environment variables from taking effect
8207 | - Solution: Created `scripts/memory_offline.py` launcher that sets offline mode BEFORE any imports
8208 | - Updated Claude Desktop config to use Python directly instead of UV isolation
8209 | - Added comprehensive offline mode configuration for HuggingFace transformers
8210 |
8211 | - **Environment Variable Inheritance**: Fixed UV environment isolation issues
8212 | - Implemented direct Python execution bypass for Claude Desktop integration
8213 | - Added code-level offline setup in `src/mcp_memory_service/__init__.py` as fallback
8214 | - Ensured cached model usage without network requests
8215 |
8216 | #### Changed
8217 | - **Repository Structure**: Major cleanup and reorganization of root directory
8218 | - Moved documentation files to appropriate `/docs` subdirectories
8219 | - Consolidated guides in `docs/guides/`, technical docs in `docs/technical/`
8220 | - Moved deployment guides to `docs/deployment/`, installation to `docs/installation/`
8221 | - Removed obsolete debug scripts and development notes
8222 | - Moved service management scripts to `/scripts` directory
8223 |
8224 | - **Documentation Organization**: Improved logical hierarchy
8225 | - Claude Code compatibility → `docs/guides/claude-code-compatibility.md`
8226 | - Setup guides → `docs/installation/` and `docs/guides/`
8227 | - Technical documentation → `docs/technical/`
8228 | - Integration guides → `docs/integrations/`
8229 |
8230 | #### Technical Details
8231 | - **Offline Mode Implementation**: `scripts/memory_offline.py` sets `HF_HUB_OFFLINE=1` and `TRANSFORMERS_OFFLINE=1` before ML library imports
8232 | - **Config Optimization**: Updated Claude Desktop config templates for both Windows and general use
8233 | - **Cache Management**: Proper Windows cache path configuration for sentence-transformers and HuggingFace
8234 |
8235 | #### Impact
8236 | - ✅ **Eliminated 230MB PyTorch downloads** - Startup time reduced from ~60s to ~3s
8237 | - ✅ **Professional repository structure** - Clean root directory with logical documentation hierarchy
8238 | - ✅ **Improved maintainability** - Consolidated scripts and removed redundant files
8239 | - ✅ **Enhanced user experience** - No more frustrating download delays in Claude Desktop
8240 |
8241 | This release resolves the persistent PyTorch download issue that affected Windows users and establishes a clean, professional repository structure suitable for enterprise deployment.
8242 |
8243 | ## [4.3.1] - 2025-08-11
8244 |
8245 | ### 🔧 **Critical Windows Installation Fixes**
8246 |
8247 | #### Fixed
8248 | - **PyTorch-DirectML Compatibility**: Resolved major installation issues on Windows 11
8249 | - Fixed installer attempting to install incompatible PyTorch 2.5.1 over working 2.4.1+DirectML setup
8250 | - Added smart compatibility checking: PyTorch 2.4.x works with DirectML, 2.5.x doesn't
8251 | - Enhanced `install_pytorch_windows()` to preserve existing compatible installations
8252 | - Only installs torch-directml if PyTorch 2.4.1 exists without DirectML extensions
8253 |
8254 | - **Corrupted Virtual Environment Recovery**: Fixed "module 'torch' has no attribute 'version'" errors
8255 | - Implemented complete cleanup of corrupted `~orch` and `functorch` directories
8256 | - Added robust uninstall and reinstall process for broken PyTorch installations
8257 | - Restored proper torch.version attribute functionality
8258 |
8259 | - **Windows 11 Detection**: Fixed incorrect OS identification
8260 | - Implemented registry-based Windows 11 detection using build numbers (≥22000)
8261 | - Replaced unreliable platform detection with accurate registry lookups
8262 | - Added system info caching to prevent duplicate detection calls
8263 |
8264 | - **Installation Logging Improvements**: Enhanced installer feedback and debugging
8265 | - Created built-in DualOutput logging system with UTF-8 encoding
8266 | - Fixed character encoding issues in installation logs
8267 | - Added comprehensive logging for PyTorch compatibility decisions
8268 |
8269 | #### Changed
8270 | - **Installation Intelligence**: Installer now preserves working DirectML setups instead of force-upgrading
8271 | - **Error Prevention**: Added extensive pre-checks to prevent corrupted package installations
8272 | - **User Experience**: Clear messaging about PyTorch version compatibility and preservation decisions
8273 |
8274 | #### Technical Details
8275 | - Enhanced PyTorch version detection and compatibility matrix
8276 | - Smart preservation of PyTorch 2.4.1 + torch-directml 0.2.5.dev240914 combinations
8277 | - Automatic cleanup of corrupted package directories during installation recovery
8278 | - Registry-based Windows version detection via `SOFTWARE\Microsoft\Windows NT\CurrentVersion`
8279 |
8280 | This release resolves critical Windows installation failures that prevented successful PyTorch-DirectML setup, ensuring reliable DirectML acceleration on Windows 11 systems.
8281 |
8282 | ## [4.3.0] - 2025-08-10
8283 |
8284 | ### ⚡ **Developer Experience Improvements**
8285 |
8286 | #### Added
8287 | - **Automated uv.lock Conflict Resolution**: Eliminates manual merge conflict resolution
8288 | - Custom git merge driver automatically resolves `uv.lock` conflicts
8289 | - Auto-runs `uv sync` after conflict resolution to ensure consistency
8290 | - One-time setup script for contributors: `./scripts/setup-git-merge-drivers.sh`
8291 | - Comprehensive documentation in README.md and CLAUDE.md
8292 |
8293 | #### Technical
8294 | - Added `.gitattributes` configuration for `uv.lock` merge handling
8295 | - Created `scripts/uv-lock-merge.sh` custom merge driver script
8296 | - Added contributor setup script with automatic git configuration
8297 | - Enhanced development documentation with git setup instructions
8298 |
8299 | This release significantly improves the contributor experience by automating the resolution of the most common merge conflicts in the repository.
8300 |
8301 | ## [4.2.0] - 2025-08-10
8302 |
8303 | ### 🔧 **Improved Client Compatibility**
8304 |
8305 | #### Added
8306 | - **LM Studio Compatibility Layer**: Automatic handling of non-standard MCP notifications
8307 | - Monkey patch for `notifications/cancelled` messages that aren't in the MCP specification
8308 | - Graceful error handling prevents server crashes when LM Studio cancels operations
8309 | - Debug logging for troubleshooting compatibility issues
8310 | - Comprehensive documentation in `docs/LM_STUDIO_COMPATIBILITY.md`
8311 |
8312 | #### Technical
8313 | - Added `lm_studio_compat.py` module with compatibility patches
8314 | - Applied patches automatically during server initialization
8315 | - Enhanced error handling in MCP protocol communication
8316 |
8317 | This release significantly improves compatibility with LM Studio and other MCP clients while maintaining full backward compatibility with existing Claude Desktop integrations.
8318 |
8319 | ## [4.1.1] - 2025-08-10
8320 |
8321 | ### Fixed
8322 | - **macOS ARM64 Support**: Enhanced PyTorch installation for Apple Silicon
8323 | - Proper dependency resolution for M1/M2/M3 Mac systems
8324 | - Updated torch dependency requirements from `>=1.6.0` to `>=2.0.0` in `pyproject.toml`
8325 | - Platform-specific installation instructions in `install.py`
8326 | - Improved cross-platform dependency management
8327 |
8328 | ## [4.1.0] - 2025-08-06
8329 |
8330 | ### 🎯 **Full MCP Specification Compliance**
8331 |
8332 | #### Added
8333 | - **Enhanced Resources System**: URI-based access to memory collections
8334 | - `memory://stats` - Real-time database statistics and health metrics
8335 | - `memory://tags` - Complete list of available memory tags
8336 | - `memory://recent/{n}` - Access to N most recent memories
8337 | - `memory://tag/{tagname}` - Query memories by specific tag
8338 | - `memory://search/{query}` - Dynamic search with structured results
8339 | - Resource templates for parameterized queries
8340 | - JSON responses for all resource endpoints
8341 |
8342 | - **Guided Prompts Framework**: Interactive workflows for memory operations
8343 | - `memory_review` - Review and organize memories from specific time periods
8344 | - `memory_analysis` - Analyze patterns, themes, and tag distributions
8345 | - `knowledge_export` - Export memories in JSON, Markdown, or Text formats
8346 | - `memory_cleanup` - Identify and remove duplicate or outdated memories
8347 | - `learning_session` - Store structured learning notes with automatic categorization
8348 | - Each prompt includes proper argument schemas and validation
8349 |
8350 | - **Progress Tracking System**: Real-time notifications for long operations
8351 | - Progress notifications with percentage completion
8352 | - Operation IDs for tracking concurrent tasks
8353 | - Enhanced `delete_by_tags` with step-by-step progress
8354 | - Enhanced `dashboard_optimize_db` with operation stages
8355 | - MCP-compliant progress notification protocol
8356 |
8357 | #### Changed
8358 | - Extended `MemoryStorage` base class with helper methods for resources
8359 | - Enhanced `Memory` and `MemoryQueryResult` models with `to_dict()` methods
8360 | - Improved server initialization with progress tracking state management
8361 |
8362 | #### Technical
8363 | - Added `send_progress_notification()` method to MemoryServer
8364 | - Implemented `get_stats()`, `get_all_tags()`, `get_recent_memories()` in storage base
8365 | - Full backward compatibility maintained with existing operations
8366 |
8367 | This release brings the MCP Memory Service to full compliance with the Model Context Protocol specification, enabling richer client interactions and better user experience through structured data access and guided workflows.
8368 |
8369 | ## [4.0.1] - 2025-08-04
8370 |
8371 | ### Fixed
8372 | - **MCP Protocol Validation**: Resolved critical ID validation errors affecting integer/string ID handling
8373 | - **Embedding Model Loading**: Fixed model loading failures in offline environments
8374 | - **Semantic Search**: Restored semantic search functionality that was broken in 4.0.0
8375 | - **Version Consistency**: Fixed version mismatch between `__init__.py` and `pyproject.toml`
8376 |
8377 | ### Technical
8378 | - Enhanced flexible ID validation for MCP protocol compliance
8379 | - Improved error handling for embedding model initialization
8380 | - Corrected version bumping process for patch releases
8381 |
8382 | ## [4.0.0] - 2025-08-04
8383 |
8384 | ### 🚀 **Major Release: Production-Ready Remote MCP Memory Service**
8385 |
8386 | #### Added
8387 | - **Native MCP-over-HTTP Protocol**: Direct MCP protocol support via FastAPI without Node.js bridge
8388 | - **Remote Server Deployment**: Full production deployment capability with remote access
8389 | - **Cross-Device Memory Access**: Validated multi-device memory synchronization
8390 | - **Comprehensive Documentation**: Complete deployment guides and remote access documentation
8391 |
8392 | #### Changed
8393 | - **Architecture Evolution**: Transitioned from local experimental service to production infrastructure
8394 | - **Protocol Compliance**: Applied MCP protocol refactorings with flexible ID validation
8395 | - **Docker CI/CD**: Fixed and operationalized Docker workflows for automated deployment
8396 | - **Repository Maintenance**: Comprehensive cleanup and branch management
8397 |
8398 | #### Production Validation
8399 | - Successfully deployed server running at remote endpoints with 65+ memories
8400 | - SQLite-vec backend validated (1.7MB database, 384-dim embeddings)
8401 | - all-MiniLM-L6-v2 model loaded and operational
8402 | - Full MCP tool suite available and tested
8403 |
8404 | #### Milestones Achieved
8405 | - GitHub Issue #71 (remote access) completed
8406 | - GitHub Issue #72 (bridge deprecation) resolved
8407 | - Production deployment proven successful
8408 |
8409 | ## [4.0.0-beta.1] - 2025-08-03
8410 |
8411 | ### Added
8412 | - **Dual-Service Architecture**: Combined HTTP Dashboard + Native MCP Protocol
8413 | - **FastAPI MCP Integration**: Complete integration for native remote access
8414 | - **Direct MCP-over-HTTP**: Eliminated dependency on Node.js bridge
8415 |
8416 | ### Changed
8417 | - **Remote Access Solution**: Resolved remote memory service access (Issue #71)
8418 | - **Bridge Deprecation**: Deprecated Node.js bridge in favor of direct protocol
8419 | - **Docker Workflows**: Fixed CI/CD pipeline for automated testing
8420 |
8421 | ### Technical
8422 | - Maintained backward compatibility for existing HTTP API users
8423 | - Repository cleanup and branch management improvements
8424 | - Significant architectural evolution while preserving existing functionality
8425 |
8426 | ## [4.0.0-alpha.1] - 2025-08-03
8427 |
8428 | ### Added
8429 | - **Initial FastAPI MCP Server**: First implementation of native MCP server structure
8430 | - **MCP Protocol Endpoints**: Added core MCP protocol endpoints to FastAPI server
8431 | - **Hybrid Support**: Initial HTTP+MCP hybrid architecture support
8432 |
8433 | ### Changed
8434 | - **Server Architecture**: Began transition from pure HTTP to MCP-native implementation
8435 | - **Remote Access Configuration**: Initial configuration for remote server access
8436 | - **Protocol Implementation**: Started implementing MCP specification compliance
8437 |
8438 | ### Technical
8439 | - Validated local testing with FastAPI MCP server
8440 | - Fixed `mcp.run()` syntax issues
8441 | - Established foundation for dual-protocol support
8442 |
8443 | ## [3.3.4] - 2025-08-03
8444 |
8445 | ### Fixed
8446 | - **Multi-Client Backend Selection**: Fixed hardcoded sqlite_vec backend in multi-client configuration
8447 | - Configuration functions now properly accept and use storage_backend parameter
8448 | - Chosen backend is correctly passed through entire multi-client setup flow
8449 | - M1 Macs with MPS acceleration now correctly use ChromaDB when selected
8450 | - SQLite pragmas only applied when sqlite_vec is actually chosen
8451 |
8452 | ### Changed
8453 | - **Configuration Instructions**: Updated generic configuration to reflect chosen backend
8454 | - **Backend Flexibility**: All systems now get optimal backend configuration in multi-client mode
8455 |
8456 | ### Technical
8457 | - Resolved Issue #73 affecting M1 Mac users
8458 | - Ensures proper backend-specific configuration for all platforms
8459 | - Version bump to 3.3.4 for critical fix release
8460 |
8461 | ## [3.3.3] - 2025-08-02
8462 |
8463 | ### 🔒 **SSL Certificate & MCP Bridge Compatibility**
8464 |
8465 | #### Fixed
8466 | - **SSL Certificate Generation**: Now generates certificates with proper Subject Alternative Names (SANs) for multi-hostname/IP compatibility
8467 | - Auto-detects local machine IP address dynamically (no hardcoded IPs)
8468 | - Includes `DNS:memory.local`, `DNS:localhost`, `DNS:*.local`
8469 | - Includes `IP:127.0.0.1`, `IP:::1` (IPv6), and auto-detected local IP
8470 | - Environment variable support: `MCP_SSL_ADDITIONAL_IPS`, `MCP_SSL_ADDITIONAL_HOSTNAMES`
8471 | - **Node.js MCP Bridge Compatibility**: Resolved SSL handshake failures when connecting from Claude Code
8472 | - Added missing MCP protocol methods: `initialize`, `tools/list`, `tools/call`, `notifications/initialized`
8473 | - Enhanced error handling with exponential backoff retry logic (3 attempts, max 5s delay)
8474 | - Comprehensive request/response logging with unique request IDs
8475 | - Improved HTTPS client configuration with custom SSL agent
8476 | - Reduced timeout from 30s to 10s for faster failure detection
8477 | - Removed conflicting Host headers that caused SSL verification issues
8478 |
8479 | #### Changed
8480 | - **Certificate Security**: CN changed from `localhost` to `memory.local` for better hostname matching
8481 | - **HTTP Client**: Enhanced connection management with explicit port handling and connection close headers
8482 | - **Logging**: Added detailed SSL handshake and request flow debugging
8483 |
8484 | #### Environment Variables
8485 | - `MCP_SSL_ADDITIONAL_IPS`: Comma-separated list of additional IP addresses to include in certificate
8486 | - `MCP_SSL_ADDITIONAL_HOSTNAMES`: Comma-separated list of additional hostnames to include in certificate
8487 |
8488 | This release resolves SSL connectivity issues that prevented Claude Code from connecting to remote MCP Memory Service instances across different networks and deployment environments.
8489 |
8490 | ## [3.3.2] - 2025-08-02
8491 |
8492 | ### 📚 **Enhanced Documentation & API Key Management**
8493 |
8494 | #### Changed
8495 | - **API Key Documentation**: Comprehensive improvements to authentication guides
8496 | - Enhanced multi-client server documentation with security best practices
8497 | - Detailed API key generation and configuration instructions
8498 | - Updated service installation guide with authentication setup
8499 | - Improved CLAUDE.md with API key environment variable explanations
8500 |
8501 | #### Technical
8502 | - **Documentation Quality**: Enhanced authentication documentation across multiple guides
8503 | - **Security Guidance**: Clear instructions for production API key management
8504 | - **Cross-Reference Links**: Better navigation between related documentation sections
8505 |
8506 | This release significantly improves the user experience for setting up secure, authenticated MCP Memory Service deployments.
8507 |
8508 | ## [3.3.1] - 2025-08-01
8509 |
8510 | ### 🔧 **Memory Statistics & Health Monitoring**
8511 |
8512 | #### Added
8513 | - **Enhanced Health Endpoint**: Memory statistics integration for dashboard display
8514 | - Added memory statistics to `/health` endpoint for real-time monitoring
8515 | - Integration with dashboard UI for comprehensive system overview
8516 | - Better visibility into database health and memory usage
8517 |
8518 | #### Fixed
8519 | - **Dashboard Display**: Improved dashboard data integration and visualization support
8520 |
8521 | #### Technical
8522 | - **Web App Enhancement**: Updated FastAPI app with integrated statistics endpoints
8523 | - **Version Synchronization**: Updated package version to maintain consistency
8524 |
8525 | This release enhances monitoring capabilities and prepares the foundation for advanced dashboard features.
8526 |
8527 | ## [3.3.0] - 2025-07-31
8528 |
8529 | ### 🎨 **Modern Professional Dashboard UI**
8530 |
8531 | #### Added
8532 | - **Professional Dashboard Interface**: Complete UI overhaul for web interface
8533 | - Modern, responsive design with professional styling
8534 | - Real-time memory statistics display
8535 | - Interactive memory search and management interface
8536 | - Enhanced user experience for memory operations
8537 |
8538 | #### Changed
8539 | - **Visual Identity**: Updated project branding with professional dashboard preview
8540 | - **User Interface**: Complete redesign of web-based memory management
8541 | - **Documentation Assets**: Added dashboard screenshots and visual documentation
8542 |
8543 | #### Technical
8544 | - **Web App Modernization**: Updated FastAPI application with modern UI components
8545 | - **Asset Organization**: Proper structure for dashboard images and visual assets
8546 |
8547 | This release transforms the web interface from a basic API into a professional, user-friendly dashboard for memory management.
8548 |
8549 | ## [3.2.0] - 2025-07-30
8550 |
8551 | ### 🛠️ **SQLite-vec Diagnostic & Repair Tools**
8552 |
8553 | #### Added
8554 | - **Comprehensive Diagnostic Tools**: Advanced SQLite-vec backend analysis and repair
8555 | - Database integrity checking and validation
8556 | - Embedding consistency verification tools
8557 | - Memory preservation during repairs and migrations
8558 | - Automated repair workflows for corrupted databases
8559 |
8560 | #### Fixed
8561 | - **SQLite-vec Embedding Issues**: Resolved critical embedding problems causing zero search results
8562 | - Fixed embedding dimension mismatches
8563 | - Resolved database schema inconsistencies
8564 | - Improved embedding generation and storage reliability
8565 |
8566 | #### Technical
8567 | - **Migration Tools**: Enhanced migration utilities to preserve existing memories during backend transitions
8568 | - **Diagnostic Scripts**: Comprehensive database analysis and repair automation
8569 |
8570 | This release significantly improves SQLite-vec backend reliability and provides tools for database maintenance and recovery.
8571 |
8572 | ## [3.1.0] - 2025-07-30
8573 |
8574 | ### 🔧 **Cross-Platform Service Installation**
8575 |
8576 | #### Added
8577 | - **Universal Service Installation**: Complete cross-platform service management
8578 | - Linux systemd service installation and configuration
8579 | - macOS LaunchAgent/LaunchDaemon support
8580 | - Windows Service installation and management
8581 | - Unified service utilities across all platforms
8582 |
8583 | #### Changed
8584 | - **Installation Experience**: Streamlined service setup for all operating systems
8585 | - **Service Management**: Consistent service control across platforms
8586 | - **Documentation**: Enhanced service installation guides
8587 |
8588 | #### Technical
8589 | - **Platform-Specific Scripts**: Dedicated installation scripts for each operating system
8590 | - **Service Configuration**: Proper service definitions and startup configurations
8591 | - **Cross-Platform Utilities**: Unified service management tools
8592 |
8593 | This release enables easy deployment of MCP Memory Service as a system service on any major operating system.
8594 |
8595 | ## [3.0.0] - 2025-07-29
8596 |
8597 | ### 🚀 MAJOR RELEASE: Autonomous Multi-Client Memory Service
8598 |
8599 | This is a **major architectural evolution** transforming MCP Memory Service from a development tool into a production-ready, intelligent memory system with autonomous processing capabilities.
8600 |
8601 | ### Added
8602 | #### 🧠 **Dream-Inspired Consolidation System**
8603 | - **Autonomous Memory Processing**: Fully autonomous consolidation system inspired by human cognitive processes
8604 | - **Exponential Decay Scoring**: Memory aging with configurable retention periods (critical: 365d, reference: 180d, standard: 30d, temporary: 7d)
8605 | - **Creative Association Discovery**: Automatic discovery of semantic connections between memories (similarity range 0.3-0.7)
8606 | - **Semantic Clustering**: DBSCAN algorithm for intelligent memory grouping (minimum 5 memories per cluster)
8607 | - **Memory Compression**: Statistical summarization with 500-character limits while preserving originals
8608 | - **Controlled Forgetting**: Relevance-based memory archival system (threshold 0.1, 90-day access window)
8609 | - **Automated Scheduling**: Configurable consolidation schedules (daily 2AM, weekly Sunday 3AM, monthly 1st 4AM)
8610 | - **Zero-AI Dependencies**: Operates entirely offline using existing embeddings and mathematical algorithms
8611 |
8612 | #### 🌐 **Multi-Client Server Architecture**
8613 | - **HTTPS Server**: Production-ready FastAPI server with auto-generated SSL certificates
8614 | - **mDNS Service Discovery**: Zero-configuration automatic service discovery (`MCP Memory._mcp-memory._tcp.local.`)
8615 | - **Server-Sent Events (SSE)**: Real-time updates with 30s heartbeat intervals for all connected clients
8616 | - **Multi-Interface Support**: Service advertisement across all network interfaces (WiFi, Ethernet, Docker, etc.)
8617 | - **API Authentication**: Secure API key-based authentication system
8618 | - **Cross-Platform Discovery**: Works on Windows, macOS, and Linux with standard mDNS/Bonjour
8619 |
8620 | #### 🚀 **Production Deployment System**
8621 | - **Systemd Auto-Startup**: Complete systemd service integration for automatic startup on boot
8622 | - **Service Management**: Professional service control scripts with start/stop/restart/status/logs/health commands
8623 | - **User-Space Service**: Runs as regular user (not root) for enhanced security
8624 | - **Auto-Restart**: Automatic service recovery on failures with 10-second restart delay
8625 | - **Journal Logging**: Integrated with systemd journal for professional log management
8626 | - **Health Monitoring**: Built-in health checks and monitoring endpoints
8627 |
8628 | #### 📖 **Comprehensive Documentation**
8629 | - **Complete Setup Guide**: 100+ line comprehensive production deployment guide
8630 | - **Production Quick Start**: Streamlined production deployment instructions
8631 | - **Service Management**: Full service lifecycle documentation
8632 | - **Troubleshooting**: Detailed problem resolution guides
8633 | - **Network Configuration**: Firewall and mDNS setup instructions
8634 |
8635 | ### Enhanced
8636 | #### 🔧 **Improved Server Features**
8637 | - **Enhanced SSE Implementation**: Restored full Server-Sent Events functionality with connection statistics
8638 | - **Network Optimization**: Multi-interface service discovery and connection handling
8639 | - **Configuration Management**: Environment-based configuration with secure defaults
8640 | - **Error Handling**: Comprehensive error handling and recovery mechanisms
8641 |
8642 | #### 🛠️ **Developer Experience**
8643 | - **Debug Tools**: Service debugging and testing utilities
8644 | - **Installation Scripts**: One-command installation and configuration
8645 | - **Management Scripts**: Easy service lifecycle management
8646 | - **Archive Organization**: Clean separation of development and production files
8647 |
8648 | ### Configuration
8649 | #### 🔧 **New Environment Variables**
8650 | - `MCP_CONSOLIDATION_ENABLED`: Enable/disable autonomous consolidation (default: true)
8651 | - `MCP_MDNS_ENABLED`: Enable/disable mDNS service discovery (default: true)
8652 | - `MCP_MDNS_SERVICE_NAME`: Customizable service name for discovery (default: "MCP Memory")
8653 | - `MCP_HTTPS_ENABLED`: Enable HTTPS with auto-generated certificates (default: true)
8654 | - `MCP_HTTP_HOST`: Server bind address (default: 0.0.0.0 for multi-client)
8655 | - `MCP_HTTP_PORT`: Server port (default: 8000)
8656 | - Consolidation timing controls: `MCP_SCHEDULE_DAILY`, `MCP_SCHEDULE_WEEKLY`, `MCP_SCHEDULE_MONTHLY`
8657 |
8658 | ### Breaking Changes
8659 | - **Architecture Change**: Single-client MCP protocol → Multi-client HTTPS server architecture
8660 | - **Service Discovery**: Manual configuration → Automatic mDNS discovery
8661 | - **Deployment Model**: Development script → Production systemd service
8662 | - **Access Method**: Direct library import → HTTP API with authentication
8663 |
8664 | ### Migration
8665 | - **Client Configuration**: Update to use HTTP-MCP bridge with auto-discovery
8666 | - **Service Deployment**: Install systemd service for production use
8667 | - **Network Setup**: Configure firewall for ports 8000/tcp (HTTPS) and 5353/udp (mDNS)
8668 | - **API Access**: Use generated API key for authentication
8669 |
8670 | ### Technical Details
8671 | - **Consolidation Algorithm**: Mathematical approach using existing embeddings without external AI
8672 | - **Service Architecture**: FastAPI + uvicorn + systemd for production deployment
8673 | - **Discovery Protocol**: RFC-compliant mDNS service advertisement
8674 | - **Security**: User-space execution, API key authentication, HTTPS encryption
8675 | - **Storage**: Continues to support both ChromaDB and SQLite-vec backends
8676 |
8677 | ---
8678 |
8679 | ## [2.2.0] - 2025-07-29
8680 |
8681 | ### Added
8682 | - **Claude Code Commands Integration**: 5 conversational memory commands following CCPlugins pattern
8683 | - `/memory-store`: Store information with context and smart tagging
8684 | - `/memory-recall`: Time-based memory retrieval with natural language
8685 | - `/memory-search`: Tag and content-based semantic search
8686 | - `/memory-context`: Capture current session and project context
8687 | - `/memory-health`: Service health diagnostics and statistics
8688 | - **Optional Installation System**: Integrated command installation into main installer
8689 | - New CLI arguments: `--install-claude-commands`, `--skip-claude-commands-prompt`
8690 | - Intelligent prompting during installation when Claude Code CLI is detected
8691 | - Automatic backup of existing commands with timestamps
8692 | - **Command Management Utilities**: Standalone installation and management script
8693 | - `scripts/claude_commands_utils.py` for manual command installation
8694 | - Cross-platform support with comprehensive error handling
8695 | - Prerequisites testing and service connectivity validation
8696 | - **Context-Aware Operations**: Commands understand project and session context
8697 | - Automatic project detection from current directory and git repository
8698 | - Smart tag generation based on file types and development context
8699 | - Session analysis and summarization capabilities
8700 | - **Auto-Discovery Integration**: Commands automatically locate MCP Memory Service
8701 | - Uses existing mDNS service discovery functionality
8702 | - Graceful fallback when service is unavailable
8703 | - Backend-agnostic operation (works with both ChromaDB and SQLite-vec)
8704 |
8705 | ### Changed
8706 | - Updated main README.md with Claude Code commands feature documentation
8707 | - Enhanced `docs/guides/claude-code-integration.md` with comprehensive command usage guide
8708 | - Updated installation documentation to include new command options
8709 | - Version bump from 2.1.0 to 2.2.0 for significant feature addition
8710 |
8711 | ### Documentation
8712 | - Added detailed command descriptions and usage examples
8713 | - Created comparison guide between conversational commands and MCP server registration
8714 | - Enhanced troubleshooting documentation for both integration methods
8715 | - Added `claude_commands/README.md` with complete command reference
8716 |
8717 | ## [2.1.0] - 2025-07-XX
8718 |
8719 | ### Added
8720 | - **mDNS Service Discovery**: Zero-configuration networking with automatic service discovery
8721 | - **HTTPS Support**: SSL/TLS support with automatic self-signed certificate generation
8722 | - **Enhanced HTTP-MCP Bridge**: Auto-discovery mode with health validation and fallback
8723 | - **Zero-Config Deployment**: No manual endpoint configuration needed for local networks
8724 |
8725 | ### Changed
8726 | - Updated service discovery to use `_mcp-memory._tcp.local.` service type
8727 | - Enhanced HTTP server with SSL certificate generation capabilities
8728 | - Improved multi-client coordination with automatic discovery
8729 |
8730 | ## [2.0.0] - 2025-07-XX
8731 |
8732 | ### Added
8733 | - **Dream-Inspired Memory Consolidation**: Autonomous memory management system
8734 | - **Multi-layered Time Horizons**: Daily, weekly, monthly, quarterly, yearly consolidation
8735 | - **Creative Association Discovery**: Finding non-obvious connections between memories
8736 | - **Semantic Clustering**: Automatic organization of related memories
8737 | - **Intelligent Compression**: Preserving key information while reducing storage
8738 | - **Controlled Forgetting**: Safe archival and recovery systems
8739 | - **Performance Optimization**: Efficient processing of 10k+ memories
8740 | - **Health Monitoring**: Comprehensive error handling and alerts
8741 |
8742 | ### Changed
8743 | - Major architecture updates for consolidation system
8744 | - Enhanced storage backends with consolidation support
8745 | - Improved multi-client coordination capabilities
8746 |
8747 | ## [1.0.0] - 2025-07-XX
8748 |
8749 | ### Added
8750 | - Initial stable release
8751 | - Core memory operations (store, retrieve, search, recall)
8752 | - ChromaDB and SQLite-vec storage backends
8753 | - Cross-platform compatibility
8754 | - Claude Desktop integration
8755 | - Basic multi-client support
8756 |
8757 | ## [0.1.0] - 2025-07-XX
8758 |
8759 | ### Added
8760 | - Initial development release
8761 | - Basic memory storage and retrieval functionality
8762 | - ChromaDB integration
8763 | - MCP server implementation
```