superlocalmemory 2.8.5 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/LICENSE +9 -1
- package/NOTICE +63 -0
- package/README.md +165 -480
- package/bin/slm +17 -449
- package/bin/slm-npm +2 -2
- package/bin/slm.bat +4 -2
- package/conftest.py +5 -0
- package/docs/api-reference.md +284 -0
- package/docs/architecture.md +149 -0
- package/docs/auto-memory.md +150 -0
- package/docs/cli-reference.md +276 -0
- package/docs/compliance.md +191 -0
- package/docs/configuration.md +182 -0
- package/docs/getting-started.md +102 -0
- package/docs/ide-setup.md +261 -0
- package/docs/mcp-tools.md +220 -0
- package/docs/migration-from-v2.md +170 -0
- package/docs/profiles.md +173 -0
- package/docs/troubleshooting.md +310 -0
- package/{configs → ide/configs}/antigravity-mcp.json +3 -3
- package/ide/configs/chatgpt-desktop-mcp.json +16 -0
- package/{configs → ide/configs}/claude-desktop-mcp.json +3 -3
- package/{configs → ide/configs}/codex-mcp.toml +4 -4
- package/{configs → ide/configs}/continue-mcp.yaml +4 -3
- package/{configs → ide/configs}/continue-skills.yaml +6 -6
- package/ide/configs/cursor-mcp.json +15 -0
- package/{configs → ide/configs}/gemini-cli-mcp.json +2 -2
- package/{configs → ide/configs}/jetbrains-mcp.json +2 -2
- package/{configs → ide/configs}/opencode-mcp.json +2 -2
- package/{configs → ide/configs}/perplexity-mcp.json +2 -2
- package/{configs → ide/configs}/vscode-copilot-mcp.json +2 -2
- package/{configs → ide/configs}/windsurf-mcp.json +3 -3
- package/{configs → ide/configs}/zed-mcp.json +2 -2
- package/{hooks → ide/hooks}/context-hook.js +9 -20
- package/ide/hooks/memory-list-skill.js +70 -0
- package/ide/hooks/memory-profile-skill.js +101 -0
- package/ide/hooks/memory-recall-skill.js +62 -0
- package/ide/hooks/memory-remember-skill.js +68 -0
- package/ide/hooks/memory-reset-skill.js +160 -0
- package/{hooks → ide/hooks}/post-recall-hook.js +2 -2
- package/ide/integrations/langchain/README.md +106 -0
- package/ide/integrations/langchain/langchain_superlocalmemory/__init__.py +9 -0
- package/ide/integrations/langchain/langchain_superlocalmemory/chat_message_history.py +201 -0
- package/ide/integrations/langchain/pyproject.toml +38 -0
- package/{src/learning → ide/integrations/langchain}/tests/__init__.py +1 -0
- package/ide/integrations/langchain/tests/test_chat_message_history.py +215 -0
- package/ide/integrations/langchain/tests/test_security.py +117 -0
- package/ide/integrations/llamaindex/README.md +81 -0
- package/ide/integrations/llamaindex/llama_index/storage/chat_store/superlocalmemory/__init__.py +9 -0
- package/ide/integrations/llamaindex/llama_index/storage/chat_store/superlocalmemory/base.py +316 -0
- package/ide/integrations/llamaindex/pyproject.toml +43 -0
- package/{src/lifecycle → ide/integrations/llamaindex}/tests/__init__.py +1 -2
- package/ide/integrations/llamaindex/tests/test_chat_store.py +294 -0
- package/ide/integrations/llamaindex/tests/test_security.py +241 -0
- package/{skills → ide/skills}/slm-build-graph/SKILL.md +6 -6
- package/{skills → ide/skills}/slm-list-recent/SKILL.md +5 -5
- package/{skills → ide/skills}/slm-recall/SKILL.md +5 -5
- package/{skills → ide/skills}/slm-remember/SKILL.md +6 -6
- package/{skills → ide/skills}/slm-show-patterns/SKILL.md +7 -7
- package/{skills → ide/skills}/slm-status/SKILL.md +9 -9
- package/{skills → ide/skills}/slm-switch-profile/SKILL.md +9 -9
- package/package.json +13 -22
- package/pyproject.toml +85 -0
- package/scripts/build-dmg.sh +417 -0
- package/scripts/install-skills.ps1 +334 -0
- package/{install.ps1 → scripts/install.ps1} +36 -4
- package/{install.sh → scripts/install.sh} +14 -13
- package/scripts/postinstall.js +2 -2
- package/scripts/start-dashboard.ps1 +52 -0
- package/scripts/start-dashboard.sh +41 -0
- package/scripts/sync-wiki.ps1 +127 -0
- package/scripts/sync-wiki.sh +82 -0
- package/scripts/test-dmg.sh +161 -0
- package/scripts/test-npm-package.ps1 +252 -0
- package/scripts/test-npm-package.sh +207 -0
- package/scripts/verify-install.ps1 +294 -0
- package/scripts/verify-install.sh +266 -0
- package/src/superlocalmemory/__init__.py +0 -0
- package/src/superlocalmemory/attribution/__init__.py +9 -0
- package/src/superlocalmemory/attribution/mathematical_dna.py +235 -0
- package/src/superlocalmemory/attribution/signer.py +153 -0
- package/src/superlocalmemory/attribution/watermark.py +189 -0
- package/src/superlocalmemory/cli/__init__.py +5 -0
- package/src/superlocalmemory/cli/commands.py +245 -0
- package/src/superlocalmemory/cli/main.py +89 -0
- package/src/superlocalmemory/cli/migrate_cmd.py +55 -0
- package/src/superlocalmemory/cli/post_install.py +99 -0
- package/src/superlocalmemory/cli/setup_wizard.py +129 -0
- package/src/superlocalmemory/compliance/__init__.py +0 -0
- package/src/superlocalmemory/compliance/abac.py +204 -0
- package/src/superlocalmemory/compliance/audit.py +314 -0
- package/src/superlocalmemory/compliance/eu_ai_act.py +131 -0
- package/src/superlocalmemory/compliance/gdpr.py +294 -0
- package/src/superlocalmemory/compliance/lifecycle.py +158 -0
- package/src/superlocalmemory/compliance/retention.py +232 -0
- package/src/superlocalmemory/compliance/scheduler.py +148 -0
- package/src/superlocalmemory/core/__init__.py +0 -0
- package/src/superlocalmemory/core/config.py +391 -0
- package/src/superlocalmemory/core/embeddings.py +293 -0
- package/src/superlocalmemory/core/engine.py +701 -0
- package/src/superlocalmemory/core/hooks.py +65 -0
- package/src/superlocalmemory/core/maintenance.py +172 -0
- package/src/superlocalmemory/core/modes.py +140 -0
- package/src/superlocalmemory/core/profiles.py +234 -0
- package/src/superlocalmemory/core/registry.py +117 -0
- package/src/superlocalmemory/dynamics/__init__.py +0 -0
- package/src/superlocalmemory/dynamics/fisher_langevin_coupling.py +223 -0
- package/src/superlocalmemory/encoding/__init__.py +0 -0
- package/src/superlocalmemory/encoding/consolidator.py +485 -0
- package/src/superlocalmemory/encoding/emotional.py +125 -0
- package/src/superlocalmemory/encoding/entity_resolver.py +525 -0
- package/src/superlocalmemory/encoding/entropy_gate.py +104 -0
- package/src/superlocalmemory/encoding/fact_extractor.py +775 -0
- package/src/superlocalmemory/encoding/foresight.py +91 -0
- package/src/superlocalmemory/encoding/graph_builder.py +302 -0
- package/src/superlocalmemory/encoding/observation_builder.py +160 -0
- package/src/superlocalmemory/encoding/scene_builder.py +183 -0
- package/src/superlocalmemory/encoding/signal_inference.py +90 -0
- package/src/superlocalmemory/encoding/temporal_parser.py +426 -0
- package/src/superlocalmemory/encoding/type_router.py +235 -0
- package/src/superlocalmemory/hooks/__init__.py +3 -0
- package/src/superlocalmemory/hooks/auto_capture.py +111 -0
- package/src/superlocalmemory/hooks/auto_recall.py +93 -0
- package/src/superlocalmemory/hooks/ide_connector.py +204 -0
- package/src/superlocalmemory/hooks/rules_engine.py +99 -0
- package/src/superlocalmemory/infra/__init__.py +3 -0
- package/src/superlocalmemory/infra/auth_middleware.py +82 -0
- package/src/superlocalmemory/infra/backup.py +317 -0
- package/src/superlocalmemory/infra/cache_manager.py +267 -0
- package/src/superlocalmemory/infra/event_bus.py +381 -0
- package/src/superlocalmemory/infra/rate_limiter.py +135 -0
- package/src/{webhook_dispatcher.py → superlocalmemory/infra/webhook_dispatcher.py} +104 -101
- package/src/superlocalmemory/learning/__init__.py +0 -0
- package/src/superlocalmemory/learning/adaptive.py +172 -0
- package/src/superlocalmemory/learning/behavioral.py +490 -0
- package/src/superlocalmemory/learning/behavioral_listener.py +94 -0
- package/src/superlocalmemory/learning/bootstrap.py +298 -0
- package/src/superlocalmemory/learning/cross_project.py +399 -0
- package/src/superlocalmemory/learning/database.py +376 -0
- package/src/superlocalmemory/learning/engagement.py +323 -0
- package/src/superlocalmemory/learning/features.py +138 -0
- package/src/superlocalmemory/learning/feedback.py +316 -0
- package/src/superlocalmemory/learning/outcomes.py +255 -0
- package/src/superlocalmemory/learning/project_context.py +366 -0
- package/src/superlocalmemory/learning/ranker.py +155 -0
- package/src/superlocalmemory/learning/source_quality.py +303 -0
- package/src/superlocalmemory/learning/workflows.py +309 -0
- package/src/superlocalmemory/llm/__init__.py +0 -0
- package/src/superlocalmemory/llm/backbone.py +316 -0
- package/src/superlocalmemory/math/__init__.py +0 -0
- package/src/superlocalmemory/math/fisher.py +356 -0
- package/src/superlocalmemory/math/langevin.py +398 -0
- package/src/superlocalmemory/math/sheaf.py +257 -0
- package/src/superlocalmemory/mcp/__init__.py +0 -0
- package/src/superlocalmemory/mcp/resources.py +245 -0
- package/src/superlocalmemory/mcp/server.py +61 -0
- package/src/superlocalmemory/mcp/tools.py +18 -0
- package/src/superlocalmemory/mcp/tools_core.py +305 -0
- package/src/superlocalmemory/mcp/tools_v28.py +223 -0
- package/src/superlocalmemory/mcp/tools_v3.py +286 -0
- package/src/superlocalmemory/retrieval/__init__.py +0 -0
- package/src/superlocalmemory/retrieval/agentic.py +295 -0
- package/src/superlocalmemory/retrieval/ann_index.py +223 -0
- package/src/superlocalmemory/retrieval/bm25_channel.py +185 -0
- package/src/superlocalmemory/retrieval/bridge_discovery.py +170 -0
- package/src/superlocalmemory/retrieval/engine.py +390 -0
- package/src/superlocalmemory/retrieval/entity_channel.py +179 -0
- package/src/superlocalmemory/retrieval/fusion.py +78 -0
- package/src/superlocalmemory/retrieval/profile_channel.py +105 -0
- package/src/superlocalmemory/retrieval/reranker.py +154 -0
- package/src/superlocalmemory/retrieval/semantic_channel.py +232 -0
- package/src/superlocalmemory/retrieval/strategy.py +96 -0
- package/src/superlocalmemory/retrieval/temporal_channel.py +175 -0
- package/src/superlocalmemory/server/__init__.py +1 -0
- package/src/superlocalmemory/server/api.py +248 -0
- package/src/superlocalmemory/server/routes/__init__.py +4 -0
- package/src/superlocalmemory/server/routes/agents.py +107 -0
- package/src/superlocalmemory/server/routes/backup.py +91 -0
- package/src/superlocalmemory/server/routes/behavioral.py +127 -0
- package/src/superlocalmemory/server/routes/compliance.py +160 -0
- package/src/superlocalmemory/server/routes/data_io.py +188 -0
- package/src/superlocalmemory/server/routes/events.py +183 -0
- package/src/superlocalmemory/server/routes/helpers.py +85 -0
- package/src/superlocalmemory/server/routes/learning.py +273 -0
- package/src/superlocalmemory/server/routes/lifecycle.py +116 -0
- package/src/superlocalmemory/server/routes/memories.py +399 -0
- package/src/superlocalmemory/server/routes/profiles.py +219 -0
- package/src/superlocalmemory/server/routes/stats.py +346 -0
- package/src/superlocalmemory/server/routes/v3_api.py +365 -0
- package/src/superlocalmemory/server/routes/ws.py +82 -0
- package/src/superlocalmemory/server/security_middleware.py +57 -0
- package/src/superlocalmemory/server/ui.py +245 -0
- package/src/superlocalmemory/storage/__init__.py +0 -0
- package/src/superlocalmemory/storage/access_control.py +182 -0
- package/src/superlocalmemory/storage/database.py +594 -0
- package/src/superlocalmemory/storage/migrations.py +303 -0
- package/src/superlocalmemory/storage/models.py +406 -0
- package/src/superlocalmemory/storage/schema.py +726 -0
- package/src/superlocalmemory/storage/v2_migrator.py +317 -0
- package/src/superlocalmemory/trust/__init__.py +0 -0
- package/src/superlocalmemory/trust/gate.py +130 -0
- package/src/superlocalmemory/trust/provenance.py +124 -0
- package/src/superlocalmemory/trust/scorer.py +347 -0
- package/src/superlocalmemory/trust/signals.py +153 -0
- package/ui/index.html +278 -5
- package/ui/js/auto-settings.js +70 -0
- package/ui/js/dashboard.js +90 -0
- package/ui/js/fact-detail.js +92 -0
- package/ui/js/feedback.js +2 -2
- package/ui/js/ide-status.js +102 -0
- package/ui/js/math-health.js +98 -0
- package/ui/js/recall-lab.js +127 -0
- package/ui/js/settings.js +2 -2
- package/ui/js/trust-dashboard.js +73 -0
- package/api_server.py +0 -724
- package/bin/aider-smart +0 -72
- package/bin/superlocalmemoryv2-learning +0 -4
- package/bin/superlocalmemoryv2-list +0 -3
- package/bin/superlocalmemoryv2-patterns +0 -4
- package/bin/superlocalmemoryv2-profile +0 -3
- package/bin/superlocalmemoryv2-recall +0 -3
- package/bin/superlocalmemoryv2-remember +0 -3
- package/bin/superlocalmemoryv2-reset +0 -3
- package/bin/superlocalmemoryv2-status +0 -3
- package/configs/chatgpt-desktop-mcp.json +0 -16
- package/configs/cursor-mcp.json +0 -15
- package/docs/SECURITY-QUICK-REFERENCE.md +0 -214
- package/hooks/memory-list-skill.js +0 -139
- package/hooks/memory-profile-skill.js +0 -273
- package/hooks/memory-recall-skill.js +0 -114
- package/hooks/memory-remember-skill.js +0 -127
- package/hooks/memory-reset-skill.js +0 -274
- package/mcp_server.py +0 -1800
- package/requirements-core.txt +0 -22
- package/requirements-learning.txt +0 -12
- package/requirements.txt +0 -12
- package/src/agent_registry.py +0 -411
- package/src/auth_middleware.py +0 -61
- package/src/auto_backup.py +0 -459
- package/src/behavioral/__init__.py +0 -49
- package/src/behavioral/behavioral_listener.py +0 -203
- package/src/behavioral/behavioral_patterns.py +0 -275
- package/src/behavioral/cross_project_transfer.py +0 -206
- package/src/behavioral/outcome_inference.py +0 -194
- package/src/behavioral/outcome_tracker.py +0 -193
- package/src/behavioral/tests/__init__.py +0 -4
- package/src/behavioral/tests/test_behavioral_integration.py +0 -108
- package/src/behavioral/tests/test_behavioral_patterns.py +0 -150
- package/src/behavioral/tests/test_cross_project_transfer.py +0 -142
- package/src/behavioral/tests/test_mcp_behavioral.py +0 -139
- package/src/behavioral/tests/test_mcp_report_outcome.py +0 -117
- package/src/behavioral/tests/test_outcome_inference.py +0 -107
- package/src/behavioral/tests/test_outcome_tracker.py +0 -96
- package/src/cache_manager.py +0 -518
- package/src/compliance/__init__.py +0 -48
- package/src/compliance/abac_engine.py +0 -149
- package/src/compliance/abac_middleware.py +0 -116
- package/src/compliance/audit_db.py +0 -215
- package/src/compliance/audit_logger.py +0 -148
- package/src/compliance/retention_manager.py +0 -289
- package/src/compliance/retention_scheduler.py +0 -186
- package/src/compliance/tests/__init__.py +0 -4
- package/src/compliance/tests/test_abac_enforcement.py +0 -95
- package/src/compliance/tests/test_abac_engine.py +0 -124
- package/src/compliance/tests/test_abac_mcp_integration.py +0 -118
- package/src/compliance/tests/test_audit_db.py +0 -123
- package/src/compliance/tests/test_audit_logger.py +0 -98
- package/src/compliance/tests/test_mcp_audit.py +0 -128
- package/src/compliance/tests/test_mcp_retention_policy.py +0 -125
- package/src/compliance/tests/test_retention_manager.py +0 -131
- package/src/compliance/tests/test_retention_scheduler.py +0 -99
- package/src/compression/__init__.py +0 -25
- package/src/compression/cli.py +0 -150
- package/src/compression/cold_storage.py +0 -217
- package/src/compression/config.py +0 -72
- package/src/compression/orchestrator.py +0 -133
- package/src/compression/tier2_compressor.py +0 -228
- package/src/compression/tier3_compressor.py +0 -153
- package/src/compression/tier_classifier.py +0 -148
- package/src/db_connection_manager.py +0 -536
- package/src/embedding_engine.py +0 -63
- package/src/embeddings/__init__.py +0 -47
- package/src/embeddings/cache.py +0 -70
- package/src/embeddings/cli.py +0 -113
- package/src/embeddings/constants.py +0 -47
- package/src/embeddings/database.py +0 -91
- package/src/embeddings/engine.py +0 -247
- package/src/embeddings/model_loader.py +0 -145
- package/src/event_bus.py +0 -562
- package/src/graph/__init__.py +0 -36
- package/src/graph/build_helpers.py +0 -74
- package/src/graph/cli.py +0 -87
- package/src/graph/cluster_builder.py +0 -188
- package/src/graph/cluster_summary.py +0 -148
- package/src/graph/constants.py +0 -47
- package/src/graph/edge_builder.py +0 -162
- package/src/graph/entity_extractor.py +0 -95
- package/src/graph/graph_core.py +0 -226
- package/src/graph/graph_search.py +0 -231
- package/src/graph/hierarchical.py +0 -207
- package/src/graph/schema.py +0 -99
- package/src/graph_engine.py +0 -52
- package/src/hnsw_index.py +0 -628
- package/src/hybrid_search.py +0 -46
- package/src/learning/__init__.py +0 -217
- package/src/learning/adaptive_ranker.py +0 -682
- package/src/learning/bootstrap/__init__.py +0 -69
- package/src/learning/bootstrap/constants.py +0 -93
- package/src/learning/bootstrap/db_queries.py +0 -316
- package/src/learning/bootstrap/sampling.py +0 -82
- package/src/learning/bootstrap/text_utils.py +0 -71
- package/src/learning/cross_project_aggregator.py +0 -857
- package/src/learning/db/__init__.py +0 -40
- package/src/learning/db/constants.py +0 -44
- package/src/learning/db/schema.py +0 -279
- package/src/learning/engagement_tracker.py +0 -628
- package/src/learning/feature_extractor.py +0 -708
- package/src/learning/feedback_collector.py +0 -806
- package/src/learning/learning_db.py +0 -915
- package/src/learning/project_context_manager.py +0 -572
- package/src/learning/ranking/__init__.py +0 -33
- package/src/learning/ranking/constants.py +0 -84
- package/src/learning/ranking/helpers.py +0 -278
- package/src/learning/source_quality_scorer.py +0 -676
- package/src/learning/synthetic_bootstrap.py +0 -755
- package/src/learning/tests/test_adaptive_ranker.py +0 -325
- package/src/learning/tests/test_adaptive_ranker_v28.py +0 -60
- package/src/learning/tests/test_aggregator.py +0 -306
- package/src/learning/tests/test_auto_retrain_v28.py +0 -35
- package/src/learning/tests/test_e2e_ranking_v28.py +0 -82
- package/src/learning/tests/test_feature_extractor_v28.py +0 -93
- package/src/learning/tests/test_feedback_collector.py +0 -294
- package/src/learning/tests/test_learning_db.py +0 -602
- package/src/learning/tests/test_learning_db_v28.py +0 -110
- package/src/learning/tests/test_learning_init_v28.py +0 -48
- package/src/learning/tests/test_outcome_signals.py +0 -48
- package/src/learning/tests/test_project_context.py +0 -292
- package/src/learning/tests/test_schema_migration.py +0 -319
- package/src/learning/tests/test_signal_inference.py +0 -397
- package/src/learning/tests/test_source_quality.py +0 -351
- package/src/learning/tests/test_synthetic_bootstrap.py +0 -429
- package/src/learning/tests/test_workflow_miner.py +0 -318
- package/src/learning/workflow_pattern_miner.py +0 -655
- package/src/lifecycle/__init__.py +0 -54
- package/src/lifecycle/bounded_growth.py +0 -239
- package/src/lifecycle/compaction_engine.py +0 -226
- package/src/lifecycle/lifecycle_engine.py +0 -355
- package/src/lifecycle/lifecycle_evaluator.py +0 -257
- package/src/lifecycle/lifecycle_scheduler.py +0 -130
- package/src/lifecycle/retention_policy.py +0 -285
- package/src/lifecycle/tests/test_bounded_growth.py +0 -193
- package/src/lifecycle/tests/test_compaction.py +0 -179
- package/src/lifecycle/tests/test_lifecycle_engine.py +0 -137
- package/src/lifecycle/tests/test_lifecycle_evaluation.py +0 -177
- package/src/lifecycle/tests/test_lifecycle_scheduler.py +0 -127
- package/src/lifecycle/tests/test_lifecycle_search.py +0 -109
- package/src/lifecycle/tests/test_mcp_compact.py +0 -149
- package/src/lifecycle/tests/test_mcp_lifecycle_status.py +0 -114
- package/src/lifecycle/tests/test_retention_policy.py +0 -162
- package/src/mcp_tools_v28.py +0 -281
- package/src/memory/__init__.py +0 -36
- package/src/memory/cli.py +0 -205
- package/src/memory/constants.py +0 -39
- package/src/memory/helpers.py +0 -28
- package/src/memory/schema.py +0 -166
- package/src/memory-profiles.py +0 -595
- package/src/memory-reset.py +0 -491
- package/src/memory_compression.py +0 -989
- package/src/memory_store_v2.py +0 -1155
- package/src/migrate_v1_to_v2.py +0 -629
- package/src/pattern_learner.py +0 -34
- package/src/patterns/__init__.py +0 -24
- package/src/patterns/analyzers.py +0 -251
- package/src/patterns/learner.py +0 -271
- package/src/patterns/scoring.py +0 -171
- package/src/patterns/store.py +0 -225
- package/src/patterns/terminology.py +0 -140
- package/src/provenance_tracker.py +0 -312
- package/src/qualixar_attribution.py +0 -139
- package/src/qualixar_watermark.py +0 -78
- package/src/query_optimizer.py +0 -511
- package/src/rate_limiter.py +0 -83
- package/src/search/__init__.py +0 -20
- package/src/search/cli.py +0 -77
- package/src/search/constants.py +0 -26
- package/src/search/engine.py +0 -241
- package/src/search/fusion.py +0 -122
- package/src/search/index_loader.py +0 -114
- package/src/search/methods.py +0 -162
- package/src/search_engine_v2.py +0 -401
- package/src/setup_validator.py +0 -482
- package/src/subscription_manager.py +0 -391
- package/src/tree/__init__.py +0 -59
- package/src/tree/builder.py +0 -185
- package/src/tree/nodes.py +0 -202
- package/src/tree/queries.py +0 -257
- package/src/tree/schema.py +0 -80
- package/src/tree_manager.py +0 -19
- package/src/trust/__init__.py +0 -45
- package/src/trust/constants.py +0 -66
- package/src/trust/queries.py +0 -157
- package/src/trust/schema.py +0 -95
- package/src/trust/scorer.py +0 -299
- package/src/trust/signals.py +0 -95
- package/src/trust_scorer.py +0 -44
- package/ui/app.js +0 -1588
- package/ui/js/graph-cytoscape-monolithic-backup.js +0 -1168
- package/ui/js/graph-cytoscape.js +0 -1168
- package/ui/js/graph-d3-backup.js +0 -32
- package/ui/js/graph.js +0 -32
- package/ui_server.py +0 -266
- /package/docs/{ACCESSIBILITY.md → v2-archive/ACCESSIBILITY.md} +0 -0
- /package/docs/{ARCHITECTURE.md → v2-archive/ARCHITECTURE.md} +0 -0
- /package/docs/{CLI-COMMANDS-REFERENCE.md → v2-archive/CLI-COMMANDS-REFERENCE.md} +0 -0
- /package/docs/{COMPRESSION-README.md → v2-archive/COMPRESSION-README.md} +0 -0
- /package/docs/{FRAMEWORK-INTEGRATIONS.md → v2-archive/FRAMEWORK-INTEGRATIONS.md} +0 -0
- /package/docs/{MCP-MANUAL-SETUP.md → v2-archive/MCP-MANUAL-SETUP.md} +0 -0
- /package/docs/{MCP-TROUBLESHOOTING.md → v2-archive/MCP-TROUBLESHOOTING.md} +0 -0
- /package/docs/{PATTERN-LEARNING.md → v2-archive/PATTERN-LEARNING.md} +0 -0
- /package/docs/{PROFILES-GUIDE.md → v2-archive/PROFILES-GUIDE.md} +0 -0
- /package/docs/{RESET-GUIDE.md → v2-archive/RESET-GUIDE.md} +0 -0
- /package/docs/{SEARCH-ENGINE-V2.2.0.md → v2-archive/SEARCH-ENGINE-V2.2.0.md} +0 -0
- /package/docs/{SEARCH-INTEGRATION-GUIDE.md → v2-archive/SEARCH-INTEGRATION-GUIDE.md} +0 -0
- /package/docs/{UI-SERVER.md → v2-archive/UI-SERVER.md} +0 -0
- /package/docs/{UNIVERSAL-INTEGRATION.md → v2-archive/UNIVERSAL-INTEGRATION.md} +0 -0
- /package/docs/{V2.2.0-OPTIONAL-SEARCH.md → v2-archive/V2.2.0-OPTIONAL-SEARCH.md} +0 -0
- /package/docs/{WINDOWS-INSTALL-README.txt → v2-archive/WINDOWS-INSTALL-README.txt} +0 -0
- /package/docs/{WINDOWS-POST-INSTALL.txt → v2-archive/WINDOWS-POST-INSTALL.txt} +0 -0
- /package/docs/{example_graph_usage.py → v2-archive/example_graph_usage.py} +0 -0
- /package/{completions → ide/completions}/slm.bash +0 -0
- /package/{completions → ide/completions}/slm.zsh +0 -0
- /package/{configs → ide/configs}/cody-commands.json +0 -0
- /package/{install-skills.sh → scripts/install-skills.sh} +0 -0
package/ui/index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>SuperLocalMemory
|
|
6
|
+
<title>SuperLocalMemory V3 — Dashboard</title>
|
|
7
7
|
|
|
8
8
|
<!-- Bootstrap CSS -->
|
|
9
9
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
@@ -636,7 +636,8 @@
|
|
|
636
636
|
<nav class="navbar navbar-dark mb-4">
|
|
637
637
|
<div class="container-fluid">
|
|
638
638
|
<span class="navbar-brand mb-0 h1">
|
|
639
|
-
<i class="bi bi-diagram-3"></i> SuperLocalMemory
|
|
639
|
+
<i class="bi bi-diagram-3"></i> SuperLocalMemory V3
|
|
640
|
+
<span id="mode-badge" class="badge bg-light text-dark ms-2">Mode A</span>
|
|
640
641
|
</span>
|
|
641
642
|
<div class="d-flex align-items-center gap-3">
|
|
642
643
|
<div class="d-flex align-items-center gap-2">
|
|
@@ -699,7 +700,12 @@
|
|
|
699
700
|
<!-- Main Content Tabs -->
|
|
700
701
|
<ul class="nav nav-tabs mb-3" id="mainTabs" role="tablist">
|
|
701
702
|
<li class="nav-item">
|
|
702
|
-
<button class="nav-link active" id="
|
|
703
|
+
<button class="nav-link active" id="dashboard-tab" data-bs-toggle="tab" data-bs-target="#dashboard-pane">
|
|
704
|
+
<i class="bi bi-speedometer2"></i> Dashboard
|
|
705
|
+
</button>
|
|
706
|
+
</li>
|
|
707
|
+
<li class="nav-item">
|
|
708
|
+
<button class="nav-link" id="graph-tab" data-bs-toggle="tab" data-bs-target="#graph-pane">
|
|
703
709
|
<i class="bi bi-diagram-3"></i> Knowledge Graph
|
|
704
710
|
</button>
|
|
705
711
|
</li>
|
|
@@ -708,6 +714,11 @@
|
|
|
708
714
|
<i class="bi bi-list-ul"></i> Memories
|
|
709
715
|
</button>
|
|
710
716
|
</li>
|
|
717
|
+
<li class="nav-item">
|
|
718
|
+
<button class="nav-link" id="recall-lab-tab" data-bs-toggle="tab" data-bs-target="#recall-lab-pane">
|
|
719
|
+
<i class="bi bi-search-heart"></i> Recall Lab
|
|
720
|
+
</button>
|
|
721
|
+
</li>
|
|
711
722
|
<li class="nav-item">
|
|
712
723
|
<button class="nav-link" id="clusters-tab" data-bs-toggle="tab" data-bs-target="#clusters-pane">
|
|
713
724
|
<i class="bi bi-collection"></i> Clusters
|
|
@@ -738,6 +749,11 @@
|
|
|
738
749
|
<i class="bi bi-robot"></i> Agents
|
|
739
750
|
</button>
|
|
740
751
|
</li>
|
|
752
|
+
<li class="nav-item">
|
|
753
|
+
<button class="nav-link" id="trust-tab" data-bs-toggle="tab" data-bs-target="#trust-pane">
|
|
754
|
+
<i class="bi bi-shield-check"></i> Trust
|
|
755
|
+
</button>
|
|
756
|
+
</li>
|
|
741
757
|
<li class="nav-item" role="presentation">
|
|
742
758
|
<button class="nav-link" id="lifecycle-tab" data-bs-toggle="tab" data-bs-target="#lifecycle-pane" type="button" role="tab">
|
|
743
759
|
<i class="bi bi-hourglass-split"></i> Lifecycle <span class="badge bg-success ms-1">v2.8</span>
|
|
@@ -753,6 +769,16 @@
|
|
|
753
769
|
<i class="bi bi-shield-lock"></i> Compliance <span class="badge bg-success ms-1">v2.8</span>
|
|
754
770
|
</button>
|
|
755
771
|
</li>
|
|
772
|
+
<li class="nav-item">
|
|
773
|
+
<button class="nav-link" id="math-health-tab" data-bs-toggle="tab" data-bs-target="#math-health-pane">
|
|
774
|
+
<i class="bi bi-calculator"></i> Math Health
|
|
775
|
+
</button>
|
|
776
|
+
</li>
|
|
777
|
+
<li class="nav-item">
|
|
778
|
+
<button class="nav-link" id="ide-tab" data-bs-toggle="tab" data-bs-target="#ide-pane">
|
|
779
|
+
<i class="bi bi-plug"></i> IDEs
|
|
780
|
+
</button>
|
|
781
|
+
</li>
|
|
756
782
|
<li class="nav-item">
|
|
757
783
|
<button class="nav-link" id="settings-tab" data-bs-toggle="tab" data-bs-target="#settings-pane">
|
|
758
784
|
<i class="bi bi-gear"></i> Settings
|
|
@@ -766,7 +792,100 @@
|
|
|
766
792
|
|
|
767
793
|
<div class="tab-content">
|
|
768
794
|
<!-- Graph Visualization -->
|
|
769
|
-
|
|
795
|
+
<!-- V3 Dashboard -->
|
|
796
|
+
<div class="tab-pane fade show active" id="dashboard-pane">
|
|
797
|
+
<div class="row g-3 mb-4">
|
|
798
|
+
<!-- Mode Card -->
|
|
799
|
+
<div class="col-md-4">
|
|
800
|
+
<div class="card stat-card h-100">
|
|
801
|
+
<div class="card-body">
|
|
802
|
+
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
803
|
+
<h6 class="card-subtitle text-muted">Operating Mode</h6>
|
|
804
|
+
<i class="bi bi-shield-check stat-icon text-primary"></i>
|
|
805
|
+
</div>
|
|
806
|
+
<h3 id="dashboard-mode" class="stat-value">Mode A</h3>
|
|
807
|
+
<p id="dashboard-mode-desc" class="text-muted small mb-2">Local Guardian — Zero Cloud</p>
|
|
808
|
+
<div class="btn-group btn-group-sm" role="group">
|
|
809
|
+
<button class="btn btn-outline-primary mode-btn" data-mode="a">A</button>
|
|
810
|
+
<button class="btn btn-outline-primary mode-btn" data-mode="b">B</button>
|
|
811
|
+
<button class="btn btn-outline-primary mode-btn" data-mode="c">C</button>
|
|
812
|
+
</div>
|
|
813
|
+
</div>
|
|
814
|
+
</div>
|
|
815
|
+
</div>
|
|
816
|
+
<!-- Stats Card -->
|
|
817
|
+
<div class="col-md-4">
|
|
818
|
+
<div class="card stat-card h-100">
|
|
819
|
+
<div class="card-body">
|
|
820
|
+
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
821
|
+
<h6 class="card-subtitle text-muted">Memories</h6>
|
|
822
|
+
<i class="bi bi-database stat-icon text-success"></i>
|
|
823
|
+
</div>
|
|
824
|
+
<h3 id="dashboard-memory-count" class="stat-value">0</h3>
|
|
825
|
+
<p class="text-muted small mb-0">facts stored</p>
|
|
826
|
+
</div>
|
|
827
|
+
</div>
|
|
828
|
+
</div>
|
|
829
|
+
<!-- Provider Card -->
|
|
830
|
+
<div class="col-md-4">
|
|
831
|
+
<div class="card stat-card h-100">
|
|
832
|
+
<div class="card-body">
|
|
833
|
+
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
834
|
+
<h6 class="card-subtitle text-muted">LLM Provider</h6>
|
|
835
|
+
<i class="bi bi-cloud stat-icon text-info"></i>
|
|
836
|
+
</div>
|
|
837
|
+
<h3 id="dashboard-provider" class="stat-value">None</h3>
|
|
838
|
+
<p id="dashboard-model" class="text-muted small mb-0"></p>
|
|
839
|
+
</div>
|
|
840
|
+
</div>
|
|
841
|
+
</div>
|
|
842
|
+
</div>
|
|
843
|
+
<!-- Quick Actions -->
|
|
844
|
+
<div class="row g-3 mb-4">
|
|
845
|
+
<div class="col-md-6">
|
|
846
|
+
<div class="card">
|
|
847
|
+
<div class="card-body">
|
|
848
|
+
<h6><i class="bi bi-plus-circle"></i> Quick Store</h6>
|
|
849
|
+
<div class="input-group">
|
|
850
|
+
<input type="text" id="quick-store-input" class="form-control" placeholder="Type something to remember...">
|
|
851
|
+
<button class="btn btn-primary" id="quick-store-btn">Store</button>
|
|
852
|
+
</div>
|
|
853
|
+
</div>
|
|
854
|
+
</div>
|
|
855
|
+
</div>
|
|
856
|
+
<div class="col-md-6">
|
|
857
|
+
<div class="card">
|
|
858
|
+
<div class="card-body">
|
|
859
|
+
<h6><i class="bi bi-search"></i> Quick Recall</h6>
|
|
860
|
+
<div class="input-group">
|
|
861
|
+
<input type="text" id="quick-recall-input" class="form-control" placeholder="Search your memories...">
|
|
862
|
+
<button class="btn btn-success" id="quick-recall-btn">Recall</button>
|
|
863
|
+
</div>
|
|
864
|
+
<div id="quick-recall-results" class="mt-2 small"></div>
|
|
865
|
+
</div>
|
|
866
|
+
</div>
|
|
867
|
+
</div>
|
|
868
|
+
</div>
|
|
869
|
+
<!-- System Info -->
|
|
870
|
+
<div class="row g-3">
|
|
871
|
+
<div class="col-md-12">
|
|
872
|
+
<div class="card">
|
|
873
|
+
<div class="card-body">
|
|
874
|
+
<h6><i class="bi bi-info-circle"></i> System</h6>
|
|
875
|
+
<div class="row text-muted small">
|
|
876
|
+
<div class="col-md-3">Version: <strong>3.0.0</strong></div>
|
|
877
|
+
<div class="col-md-3">Profile: <strong id="dashboard-profile">default</strong></div>
|
|
878
|
+
<div class="col-md-3">Base: <strong id="dashboard-basedir">~/.superlocalmemory</strong></div>
|
|
879
|
+
<div class="col-md-3">Math Layers: <strong class="text-success">Active</strong></div>
|
|
880
|
+
</div>
|
|
881
|
+
</div>
|
|
882
|
+
</div>
|
|
883
|
+
</div>
|
|
884
|
+
</div>
|
|
885
|
+
</div>
|
|
886
|
+
|
|
887
|
+
<!-- Graph Visualization -->
|
|
888
|
+
<div class="tab-pane fade" id="graph-pane">
|
|
770
889
|
<div class="card p-3 mb-3">
|
|
771
890
|
<div class="row align-items-center mb-2">
|
|
772
891
|
<div class="col-md-8">
|
|
@@ -894,6 +1013,20 @@
|
|
|
894
1013
|
</div>
|
|
895
1014
|
</div>
|
|
896
1015
|
|
|
1016
|
+
<!-- V3 Recall Lab -->
|
|
1017
|
+
<div class="tab-pane fade" id="recall-lab-pane">
|
|
1018
|
+
<h5>Recall Lab — Search with Channel Breakdown</h5>
|
|
1019
|
+
<p class="text-muted">See how each retrieval channel contributes to results.</p>
|
|
1020
|
+
<div class="input-group mb-3">
|
|
1021
|
+
<input type="text" id="recall-lab-query" class="form-control form-control-lg" placeholder="Enter your query...">
|
|
1022
|
+
<button class="btn btn-primary btn-lg" id="recall-lab-search">
|
|
1023
|
+
<i class="bi bi-search"></i> Search with Trace
|
|
1024
|
+
</button>
|
|
1025
|
+
</div>
|
|
1026
|
+
<div id="recall-lab-meta" class="mb-3 text-muted small"></div>
|
|
1027
|
+
<div id="recall-lab-results"></div>
|
|
1028
|
+
</div>
|
|
1029
|
+
|
|
897
1030
|
<!-- Clusters -->
|
|
898
1031
|
<div class="tab-pane fade" id="clusters-pane">
|
|
899
1032
|
<div class="card p-3">
|
|
@@ -1208,6 +1341,44 @@
|
|
|
1208
1341
|
</div>
|
|
1209
1342
|
</div>
|
|
1210
1343
|
|
|
1344
|
+
<!-- Trust Dashboard (V3) -->
|
|
1345
|
+
<div class="tab-pane fade" id="trust-pane">
|
|
1346
|
+
<h5><i class="bi bi-shield-check"></i> Trust Dashboard</h5>
|
|
1347
|
+
<p class="text-muted">Bayesian trust scoring per agent and per fact.</p>
|
|
1348
|
+
<div class="row g-3 mb-3">
|
|
1349
|
+
<div class="col-md-4">
|
|
1350
|
+
<div class="card text-center">
|
|
1351
|
+
<div class="card-body">
|
|
1352
|
+
<h6>Total Agents</h6>
|
|
1353
|
+
<h3 id="trust-agent-count">0</h3>
|
|
1354
|
+
</div>
|
|
1355
|
+
</div>
|
|
1356
|
+
</div>
|
|
1357
|
+
<div class="col-md-4">
|
|
1358
|
+
<div class="card text-center">
|
|
1359
|
+
<div class="card-body">
|
|
1360
|
+
<h6>Avg Trust Score</h6>
|
|
1361
|
+
<h3 id="trust-avg-score">—</h3>
|
|
1362
|
+
</div>
|
|
1363
|
+
</div>
|
|
1364
|
+
</div>
|
|
1365
|
+
<div class="col-md-4">
|
|
1366
|
+
<div class="card text-center">
|
|
1367
|
+
<div class="card-body">
|
|
1368
|
+
<h6>Burst Alerts</h6>
|
|
1369
|
+
<h3 id="trust-burst-count" class="text-danger">0</h3>
|
|
1370
|
+
</div>
|
|
1371
|
+
</div>
|
|
1372
|
+
</div>
|
|
1373
|
+
</div>
|
|
1374
|
+
<div id="trust-agents-table" class="table-responsive">
|
|
1375
|
+
<table class="table table-sm table-striped">
|
|
1376
|
+
<thead><tr><th>Agent/Fact</th><th>Type</th><th>Trust Score</th><th>Evidence</th><th>Status</th></tr></thead>
|
|
1377
|
+
<tbody id="trust-agents-body"></tbody>
|
|
1378
|
+
</table>
|
|
1379
|
+
</div>
|
|
1380
|
+
</div>
|
|
1381
|
+
|
|
1211
1382
|
<!-- Lifecycle (v2.8) -->
|
|
1212
1383
|
<div class="tab-pane fade" id="lifecycle-pane" role="tabpanel">
|
|
1213
1384
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
@@ -1338,8 +1509,103 @@
|
|
|
1338
1509
|
</div>
|
|
1339
1510
|
</div>
|
|
1340
1511
|
|
|
1512
|
+
<!-- Math Health (V3) -->
|
|
1513
|
+
<div class="tab-pane fade" id="math-health-pane">
|
|
1514
|
+
<h5><i class="bi bi-calculator"></i> Mathematical Layer Health</h5>
|
|
1515
|
+
<p class="text-muted">Status of Fisher-Rao, sheaf cohomology, and Langevin dynamics.</p>
|
|
1516
|
+
<div class="row g-3" id="math-health-cards"></div>
|
|
1517
|
+
</div>
|
|
1518
|
+
|
|
1519
|
+
<!-- IDE Connections (V3) -->
|
|
1520
|
+
<div class="tab-pane fade" id="ide-pane">
|
|
1521
|
+
<h5><i class="bi bi-plug"></i> IDE Connections</h5>
|
|
1522
|
+
<p class="text-muted">Manage IDE integrations. Connect new IDEs or check connection status.</p>
|
|
1523
|
+
<button class="btn btn-primary mb-3" id="ide-connect-all-btn"><i class="bi bi-link-45deg"></i> Connect All Detected IDEs</button>
|
|
1524
|
+
<div id="ide-list" class="table-responsive">
|
|
1525
|
+
<table class="table table-sm">
|
|
1526
|
+
<thead><tr><th>IDE</th><th>Installed</th><th>Config Path</th><th>Action</th></tr></thead>
|
|
1527
|
+
<tbody id="ide-list-body"></tbody>
|
|
1528
|
+
</table>
|
|
1529
|
+
</div>
|
|
1530
|
+
</div>
|
|
1531
|
+
|
|
1341
1532
|
<!-- Settings & Backup -->
|
|
1342
1533
|
<div class="tab-pane fade" id="settings-pane">
|
|
1534
|
+
<!-- V3 Configuration -->
|
|
1535
|
+
<div class="card mb-3">
|
|
1536
|
+
<div class="card-header bg-primary text-white">
|
|
1537
|
+
<h6 class="mb-0"><i class="bi bi-gear-wide-connected"></i> V3 Configuration</h6>
|
|
1538
|
+
</div>
|
|
1539
|
+
<div class="card-body">
|
|
1540
|
+
<div class="row">
|
|
1541
|
+
<div class="col-md-6">
|
|
1542
|
+
<label class="form-label fw-bold">Operating Mode</label>
|
|
1543
|
+
<select id="settings-mode" class="form-select">
|
|
1544
|
+
<option value="a">Mode A — Local Guardian (Zero Cloud)</option>
|
|
1545
|
+
<option value="b">Mode B — Smart Local (Ollama)</option>
|
|
1546
|
+
<option value="c">Mode C — Full Power (Cloud LLM)</option>
|
|
1547
|
+
</select>
|
|
1548
|
+
<button class="btn btn-sm btn-primary mt-2" id="settings-mode-save">Save Mode</button>
|
|
1549
|
+
</div>
|
|
1550
|
+
<div class="col-md-6">
|
|
1551
|
+
<label class="form-label fw-bold">LLM Provider</label>
|
|
1552
|
+
<select id="settings-provider" class="form-select">
|
|
1553
|
+
<option value="none">None (Mode A)</option>
|
|
1554
|
+
<option value="openai">OpenAI</option>
|
|
1555
|
+
<option value="anthropic">Anthropic</option>
|
|
1556
|
+
<option value="ollama">Ollama (Local)</option>
|
|
1557
|
+
<option value="openrouter">OpenRouter</option>
|
|
1558
|
+
</select>
|
|
1559
|
+
<div class="mt-2">
|
|
1560
|
+
<input type="password" id="settings-api-key" class="form-control form-control-sm" placeholder="API Key">
|
|
1561
|
+
</div>
|
|
1562
|
+
<button class="btn btn-sm btn-primary mt-2" id="settings-provider-save">Save Provider</button>
|
|
1563
|
+
</div>
|
|
1564
|
+
</div>
|
|
1565
|
+
<hr>
|
|
1566
|
+
<div class="row">
|
|
1567
|
+
<div class="col-md-6">
|
|
1568
|
+
<h6>Auto-Capture</h6>
|
|
1569
|
+
<div class="form-check form-switch">
|
|
1570
|
+
<input class="form-check-input" type="checkbox" id="auto-capture-toggle" checked>
|
|
1571
|
+
<label class="form-check-label">Enable auto-capture</label>
|
|
1572
|
+
</div>
|
|
1573
|
+
<div class="form-check form-switch">
|
|
1574
|
+
<input class="form-check-input" type="checkbox" id="auto-capture-decisions" checked>
|
|
1575
|
+
<label class="form-check-label">Capture decisions</label>
|
|
1576
|
+
</div>
|
|
1577
|
+
<div class="form-check form-switch">
|
|
1578
|
+
<input class="form-check-input" type="checkbox" id="auto-capture-bugs" checked>
|
|
1579
|
+
<label class="form-check-label">Capture bug fixes</label>
|
|
1580
|
+
</div>
|
|
1581
|
+
</div>
|
|
1582
|
+
<div class="col-md-6">
|
|
1583
|
+
<h6>Auto-Recall</h6>
|
|
1584
|
+
<div class="form-check form-switch">
|
|
1585
|
+
<input class="form-check-input" type="checkbox" id="auto-recall-toggle" checked>
|
|
1586
|
+
<label class="form-check-label">Enable auto-recall</label>
|
|
1587
|
+
</div>
|
|
1588
|
+
<div class="form-check form-switch">
|
|
1589
|
+
<input class="form-check-input" type="checkbox" id="auto-recall-session" checked>
|
|
1590
|
+
<label class="form-check-label">Recall on session start</label>
|
|
1591
|
+
</div>
|
|
1592
|
+
</div>
|
|
1593
|
+
</div>
|
|
1594
|
+
<hr>
|
|
1595
|
+
<h6>Migration & Database</h6>
|
|
1596
|
+
<div class="row">
|
|
1597
|
+
<div class="col-md-6">
|
|
1598
|
+
<p class="small text-muted">Database: <strong id="settings-db-path">~/.superlocalmemory/memory.db</strong></p>
|
|
1599
|
+
<p class="small text-muted">Backup: <span id="settings-backup-status">Check with <code>slm migrate --rollback</code></span></p>
|
|
1600
|
+
</div>
|
|
1601
|
+
<div class="col-md-6">
|
|
1602
|
+
<p class="small text-muted">Version: <strong>3.0.0</strong></p>
|
|
1603
|
+
<p class="small text-muted">Engine: <strong class="text-success">V3 Active</strong></p>
|
|
1604
|
+
</div>
|
|
1605
|
+
</div>
|
|
1606
|
+
</div>
|
|
1607
|
+
</div>
|
|
1608
|
+
|
|
1343
1609
|
<!-- Profile Management -->
|
|
1344
1610
|
<div class="card p-3 mb-3">
|
|
1345
1611
|
<h5 class="mb-3"><i class="bi bi-people"></i> Profile Management</h5>
|
|
@@ -1509,9 +1775,16 @@
|
|
|
1509
1775
|
<script src="static/js/behavioral.js"></script>
|
|
1510
1776
|
<script src="static/js/compliance.js"></script>
|
|
1511
1777
|
<script src="static/js/init.js"></script>
|
|
1778
|
+
<script src="static/js/dashboard.js"></script>
|
|
1779
|
+
<script src="static/js/recall-lab.js"></script>
|
|
1780
|
+
<script src="static/js/trust-dashboard.js"></script>
|
|
1781
|
+
<script src="static/js/math-health.js"></script>
|
|
1782
|
+
<script src="static/js/auto-settings.js"></script>
|
|
1783
|
+
<script src="static/js/ide-status.js"></script>
|
|
1784
|
+
<script src="static/js/fact-detail.js"></script>
|
|
1512
1785
|
|
|
1513
1786
|
<footer>
|
|
1514
|
-
<p>SuperLocalMemory
|
|
1787
|
+
<p>SuperLocalMemory V3 by <a href="https://github.com/varun369">Varun Pratap Bhardwaj</a></p>
|
|
1515
1788
|
<p><a href="https://github.com/varun369/SuperLocalMemoryV2">GitHub Repository</a> | MIT License</p>
|
|
1516
1789
|
</footer>
|
|
1517
1790
|
</body>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// SuperLocalMemory V3 — Auto-Capture/Recall Settings
|
|
2
|
+
// Wires the auto-capture and auto-recall toggle switches to the V3 API.
|
|
3
|
+
|
|
4
|
+
async function loadAutoSettings() {
|
|
5
|
+
try {
|
|
6
|
+
var captureResp = await fetch('/api/v3/auto-capture/config');
|
|
7
|
+
var recallResp = await fetch('/api/v3/auto-recall/config');
|
|
8
|
+
var capture = captureResp.ok ? await captureResp.json() : {};
|
|
9
|
+
var recall = recallResp.ok ? await recallResp.json() : {};
|
|
10
|
+
|
|
11
|
+
var cc = capture.config || {};
|
|
12
|
+
var rc = recall.config || {};
|
|
13
|
+
|
|
14
|
+
var el;
|
|
15
|
+
el = document.getElementById('auto-capture-toggle');
|
|
16
|
+
if (el) el.checked = cc.enabled !== false;
|
|
17
|
+
el = document.getElementById('auto-capture-decisions');
|
|
18
|
+
if (el) el.checked = cc.capture_decisions !== false;
|
|
19
|
+
el = document.getElementById('auto-capture-bugs');
|
|
20
|
+
if (el) el.checked = cc.capture_bugs !== false;
|
|
21
|
+
el = document.getElementById('auto-recall-toggle');
|
|
22
|
+
if (el) el.checked = rc.enabled !== false;
|
|
23
|
+
el = document.getElementById('auto-recall-session');
|
|
24
|
+
if (el) el.checked = rc.on_session_start !== false;
|
|
25
|
+
} catch (e) {
|
|
26
|
+
console.log('Auto settings load error:', e);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function saveAutoCaptureConfig() {
|
|
31
|
+
var payload = {
|
|
32
|
+
enabled: document.getElementById('auto-capture-toggle')?.checked,
|
|
33
|
+
capture_decisions: document.getElementById('auto-capture-decisions')?.checked,
|
|
34
|
+
capture_bugs: document.getElementById('auto-capture-bugs')?.checked
|
|
35
|
+
};
|
|
36
|
+
fetch('/api/v3/auto-capture/config', {
|
|
37
|
+
method: 'PUT',
|
|
38
|
+
headers: { 'Content-Type': 'application/json' },
|
|
39
|
+
body: JSON.stringify(payload)
|
|
40
|
+
}).catch(function(e) { console.log('Save auto-capture error:', e); });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function saveAutoRecallConfig() {
|
|
44
|
+
var payload = {
|
|
45
|
+
enabled: document.getElementById('auto-recall-toggle')?.checked,
|
|
46
|
+
on_session_start: document.getElementById('auto-recall-session')?.checked
|
|
47
|
+
};
|
|
48
|
+
fetch('/api/v3/auto-recall/config', {
|
|
49
|
+
method: 'PUT',
|
|
50
|
+
headers: { 'Content-Type': 'application/json' },
|
|
51
|
+
body: JSON.stringify(payload)
|
|
52
|
+
}).catch(function(e) { console.log('Save auto-recall error:', e); });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Bind change listeners for auto-capture toggles
|
|
56
|
+
document.querySelectorAll('#auto-capture-toggle, #auto-capture-decisions, #auto-capture-bugs').forEach(function(el) {
|
|
57
|
+
if (el) {
|
|
58
|
+
el.addEventListener('change', saveAutoCaptureConfig);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// Bind change listeners for auto-recall toggles
|
|
63
|
+
document.querySelectorAll('#auto-recall-toggle, #auto-recall-session').forEach(function(el) {
|
|
64
|
+
if (el) {
|
|
65
|
+
el.addEventListener('change', saveAutoRecallConfig);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// Load settings when the settings tab is shown
|
|
70
|
+
document.getElementById('settings-tab')?.addEventListener('shown.bs.tab', loadAutoSettings);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// SuperLocalMemory V3 — Dashboard
|
|
2
|
+
// Part of Qualixar | https://superlocalmemory.com
|
|
3
|
+
|
|
4
|
+
async function loadDashboard() {
|
|
5
|
+
try {
|
|
6
|
+
var response = await fetch('/api/v3/dashboard');
|
|
7
|
+
if (!response.ok) return;
|
|
8
|
+
var data = await response.json();
|
|
9
|
+
|
|
10
|
+
document.getElementById('dashboard-mode').textContent = 'Mode ' + data.mode.toUpperCase();
|
|
11
|
+
document.getElementById('dashboard-mode-desc').textContent = data.mode_name + (data.provider !== 'none' ? ' — ' + data.provider : '');
|
|
12
|
+
document.getElementById('dashboard-memory-count').textContent = data.fact_count || data.memory_count || '0';
|
|
13
|
+
document.getElementById('dashboard-provider').textContent = data.provider === 'none' ? 'None' : data.provider;
|
|
14
|
+
document.getElementById('dashboard-model').textContent = data.model || '';
|
|
15
|
+
document.getElementById('dashboard-profile').textContent = data.profile || 'default';
|
|
16
|
+
document.getElementById('dashboard-basedir').textContent = data.base_dir || '~/.superlocalmemory';
|
|
17
|
+
|
|
18
|
+
// Update mode badge in navbar
|
|
19
|
+
var badge = document.getElementById('mode-badge');
|
|
20
|
+
if (badge) badge.textContent = 'Mode ' + data.mode.toUpperCase();
|
|
21
|
+
|
|
22
|
+
// Highlight active mode button
|
|
23
|
+
document.querySelectorAll('.mode-btn').forEach(function(btn) {
|
|
24
|
+
btn.classList.toggle('active', btn.dataset.mode === data.mode);
|
|
25
|
+
});
|
|
26
|
+
} catch (e) {
|
|
27
|
+
console.log('Dashboard load error:', e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Mode switch buttons
|
|
32
|
+
document.addEventListener('click', function(e) {
|
|
33
|
+
if (e.target.classList.contains('mode-btn')) {
|
|
34
|
+
var mode = e.target.dataset.mode;
|
|
35
|
+
fetch('/api/v3/mode', {
|
|
36
|
+
method: 'PUT',
|
|
37
|
+
headers: {'Content-Type': 'application/json'},
|
|
38
|
+
body: JSON.stringify({mode: mode})
|
|
39
|
+
}).then(function() { loadDashboard(); });
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Quick store
|
|
44
|
+
document.getElementById('quick-store-btn')?.addEventListener('click', function() {
|
|
45
|
+
var input = document.getElementById('quick-store-input');
|
|
46
|
+
var content = input.value.trim();
|
|
47
|
+
if (!content) return;
|
|
48
|
+
fetch('/api/memories', {
|
|
49
|
+
method: 'POST',
|
|
50
|
+
headers: {'Content-Type': 'application/json'},
|
|
51
|
+
body: JSON.stringify({content: content})
|
|
52
|
+
}).then(function(r) { return r.json(); }).then(function(data) {
|
|
53
|
+
input.value = '';
|
|
54
|
+
loadDashboard();
|
|
55
|
+
alert('Stored!');
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Quick recall
|
|
60
|
+
document.getElementById('quick-recall-btn')?.addEventListener('click', function() {
|
|
61
|
+
var query = document.getElementById('quick-recall-input').value.trim();
|
|
62
|
+
if (!query) return;
|
|
63
|
+
fetch('/api/search', {
|
|
64
|
+
method: 'POST',
|
|
65
|
+
headers: {'Content-Type': 'application/json'},
|
|
66
|
+
body: JSON.stringify({query: query, limit: 5})
|
|
67
|
+
}).then(function(r) { return r.json(); }).then(function(data) {
|
|
68
|
+
var div = document.getElementById('quick-recall-results');
|
|
69
|
+
if (!data.results || data.results.length === 0) {
|
|
70
|
+
div.textContent = 'No results found.';
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
// Build results using DOM methods for safety
|
|
74
|
+
div.textContent = '';
|
|
75
|
+
data.results.forEach(function(r, i) {
|
|
76
|
+
var row = document.createElement('div');
|
|
77
|
+
row.className = 'border-bottom py-1';
|
|
78
|
+
var strong = document.createElement('strong');
|
|
79
|
+
strong.textContent = (i + 1) + '. ';
|
|
80
|
+
row.appendChild(strong);
|
|
81
|
+
var text = document.createTextNode((r.content || r.text || '').substring(0, 150) + ' ');
|
|
82
|
+
row.appendChild(text);
|
|
83
|
+
var scoreSpan = document.createElement('span');
|
|
84
|
+
scoreSpan.className = 'text-muted';
|
|
85
|
+
scoreSpan.textContent = '(' + (r.score || 0).toFixed(2) + ')';
|
|
86
|
+
row.appendChild(scoreSpan);
|
|
87
|
+
div.appendChild(row);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// SuperLocalMemory V3 — Fact Detail View
|
|
2
|
+
// Adds click-to-expand on memory list items to show channel scores and trust data.
|
|
3
|
+
|
|
4
|
+
document.addEventListener('click', function(e) {
|
|
5
|
+
var item = e.target.closest('[data-fact-id]');
|
|
6
|
+
if (!item) return;
|
|
7
|
+
|
|
8
|
+
// Toggle: if detail panel already exists, remove it
|
|
9
|
+
var existingDetail = item.querySelector('.fact-detail-panel');
|
|
10
|
+
if (existingDetail) {
|
|
11
|
+
existingDetail.remove();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Extract query text from the item (first 100 chars)
|
|
16
|
+
var queryText = (item.textContent || '').substring(0, 100).trim();
|
|
17
|
+
if (!queryText) return;
|
|
18
|
+
|
|
19
|
+
fetch('/api/v3/recall/trace', {
|
|
20
|
+
method: 'POST',
|
|
21
|
+
headers: { 'Content-Type': 'application/json' },
|
|
22
|
+
body: JSON.stringify({ query: queryText, limit: 1 })
|
|
23
|
+
}).then(function(r) {
|
|
24
|
+
return r.json();
|
|
25
|
+
}).then(function(data) {
|
|
26
|
+
var result = (data.results || [])[0];
|
|
27
|
+
if (!result) return;
|
|
28
|
+
|
|
29
|
+
var panel = document.createElement('div');
|
|
30
|
+
panel.className = 'fact-detail-panel card mt-2 mb-2 border-info';
|
|
31
|
+
|
|
32
|
+
var cardBody = document.createElement('div');
|
|
33
|
+
cardBody.className = 'card-body small';
|
|
34
|
+
|
|
35
|
+
// Score / Trust / Confidence row
|
|
36
|
+
var row1 = document.createElement('div');
|
|
37
|
+
row1.className = 'row';
|
|
38
|
+
|
|
39
|
+
var col1 = document.createElement('div');
|
|
40
|
+
col1.className = 'col-md-4';
|
|
41
|
+
var col1Label = document.createElement('strong');
|
|
42
|
+
col1Label.textContent = 'Score: ';
|
|
43
|
+
col1.appendChild(col1Label);
|
|
44
|
+
col1.appendChild(document.createTextNode(result.score || 0));
|
|
45
|
+
row1.appendChild(col1);
|
|
46
|
+
|
|
47
|
+
var col2 = document.createElement('div');
|
|
48
|
+
col2.className = 'col-md-4';
|
|
49
|
+
var col2Label = document.createElement('strong');
|
|
50
|
+
col2Label.textContent = 'Trust: ';
|
|
51
|
+
col2.appendChild(col2Label);
|
|
52
|
+
col2.appendChild(document.createTextNode(result.trust_score || 0));
|
|
53
|
+
row1.appendChild(col2);
|
|
54
|
+
|
|
55
|
+
var col3 = document.createElement('div');
|
|
56
|
+
col3.className = 'col-md-4';
|
|
57
|
+
var col3Label = document.createElement('strong');
|
|
58
|
+
col3Label.textContent = 'Confidence: ';
|
|
59
|
+
col3.appendChild(col3Label);
|
|
60
|
+
col3.appendChild(document.createTextNode(result.confidence || 0));
|
|
61
|
+
row1.appendChild(col3);
|
|
62
|
+
|
|
63
|
+
cardBody.appendChild(row1);
|
|
64
|
+
|
|
65
|
+
// Channel scores section
|
|
66
|
+
var channels = result.channel_scores || {};
|
|
67
|
+
var channelKeys = Object.keys(channels);
|
|
68
|
+
if (channelKeys.length > 0) {
|
|
69
|
+
var label = document.createElement('div');
|
|
70
|
+
label.className = 'mt-2';
|
|
71
|
+
var labelStrong = document.createElement('strong');
|
|
72
|
+
labelStrong.textContent = 'Channel Scores:';
|
|
73
|
+
label.appendChild(labelStrong);
|
|
74
|
+
cardBody.appendChild(label);
|
|
75
|
+
|
|
76
|
+
var row2 = document.createElement('div');
|
|
77
|
+
row2.className = 'row text-muted';
|
|
78
|
+
channelKeys.forEach(function(chKey) {
|
|
79
|
+
var chCol = document.createElement('div');
|
|
80
|
+
chCol.className = 'col-md-3';
|
|
81
|
+
chCol.textContent = chKey + ': ' + channels[chKey];
|
|
82
|
+
row2.appendChild(chCol);
|
|
83
|
+
});
|
|
84
|
+
cardBody.appendChild(row2);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
panel.appendChild(cardBody);
|
|
88
|
+
item.appendChild(panel);
|
|
89
|
+
}).catch(function(e) {
|
|
90
|
+
console.log('Fact detail error:', e);
|
|
91
|
+
});
|
|
92
|
+
});
|
package/ui/js/feedback.js
CHANGED
|
@@ -302,10 +302,10 @@ function showPrivacyDetails() {
|
|
|
302
302
|
'- Time spent viewing memory details\n' +
|
|
303
303
|
'- Search patterns (queries are hashed, never stored as raw text)\n\n' +
|
|
304
304
|
'Where it is stored:\n' +
|
|
305
|
-
'~/.
|
|
305
|
+
'~/.superlocalmemory/learning.db (local SQLite file)\n\n' +
|
|
306
306
|
'How to delete it:\n' +
|
|
307
307
|
'Use "Reset Learning Data" in Settings, or run:\n' +
|
|
308
|
-
'rm ~/.
|
|
308
|
+
'rm ~/.superlocalmemory/learning.db';
|
|
309
309
|
alert(info);
|
|
310
310
|
}
|
|
311
311
|
|