levh 2.26.8__tar.gz
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.
- levh-2.26.8/.env.example +91 -0
- levh-2.26.8/CHANGELOG.md +831 -0
- levh-2.26.8/CONTRIBUTING.md +31 -0
- levh-2.26.8/LICENSE +21 -0
- levh-2.26.8/MANIFEST.in +7 -0
- levh-2.26.8/PKG-INFO +677 -0
- levh-2.26.8/README.md +636 -0
- levh-2.26.8/SECURITY.md +19 -0
- levh-2.26.8/levh.egg-info/PKG-INFO +677 -0
- levh-2.26.8/levh.egg-info/SOURCES.txt +233 -0
- levh-2.26.8/levh.egg-info/dependency_links.txt +1 -0
- levh-2.26.8/levh.egg-info/entry_points.txt +2 -0
- levh-2.26.8/levh.egg-info/requires.txt +25 -0
- levh-2.26.8/levh.egg-info/top_level.txt +1 -0
- levh-2.26.8/pyproject.toml +54 -0
- levh-2.26.8/server/__init__.py +1 -0
- levh-2.26.8/server/api.py +1475 -0
- levh-2.26.8/server/cli.py +1666 -0
- levh-2.26.8/server/configs.py +210 -0
- levh-2.26.8/server/connectors/__init__.py +82 -0
- levh-2.26.8/server/connectors/base.py +58 -0
- levh-2.26.8/server/connectors/calendar.py +269 -0
- levh-2.26.8/server/connectors/email_connector.py +274 -0
- levh-2.26.8/server/connectors/github.py +307 -0
- levh-2.26.8/server/connectors/local_files.py +275 -0
- levh-2.26.8/server/connectors/notion.py +343 -0
- levh-2.26.8/server/connectors/obsidian.py +194 -0
- levh-2.26.8/server/connectors/transcript.py +204 -0
- levh-2.26.8/server/core/__init__.py +1 -0
- levh-2.26.8/server/core/admission.py +142 -0
- levh-2.26.8/server/core/answerer.py +111 -0
- levh-2.26.8/server/core/backup.py +76 -0
- levh-2.26.8/server/core/benchmark.py +113 -0
- levh-2.26.8/server/core/conflict.py +137 -0
- levh-2.26.8/server/core/conflict_service.py +203 -0
- levh-2.26.8/server/core/crypto.py +104 -0
- levh-2.26.8/server/core/database.py +1145 -0
- levh-2.26.8/server/core/demo_data.py +287 -0
- levh-2.26.8/server/core/dogfood.py +287 -0
- levh-2.26.8/server/core/embedder.py +209 -0
- levh-2.26.8/server/core/engine_provider.py +41 -0
- levh-2.26.8/server/core/entities.py +123 -0
- levh-2.26.8/server/core/entity_index_service.py +112 -0
- levh-2.26.8/server/core/episodic.py +65 -0
- levh-2.26.8/server/core/evaluation.py +374 -0
- levh-2.26.8/server/core/hscore.py +227 -0
- levh-2.26.8/server/core/memory_engine.py +2542 -0
- levh-2.26.8/server/core/onboarding.py +222 -0
- levh-2.26.8/server/core/organizations.py +180 -0
- levh-2.26.8/server/core/people.py +145 -0
- levh-2.26.8/server/core/rate_limit.py +41 -0
- levh-2.26.8/server/core/runtime_config.py +179 -0
- levh-2.26.8/server/core/short_term.py +51 -0
- levh-2.26.8/server/core/summarizer.py +98 -0
- levh-2.26.8/server/core/trust.py +245 -0
- levh-2.26.8/server/core/trust_service.py +202 -0
- levh-2.26.8/server/core/types.py +126 -0
- levh-2.26.8/server/core/vector_store.py +99 -0
- levh-2.26.8/server/dashboard/.gitkeep +0 -0
- levh-2.26.8/server/dashboard/404/index.html +1 -0
- levh-2.26.8/server/dashboard/404.html +1 -0
- levh-2.26.8/server/dashboard/_next/static/EZcdmRBfcJ0DYaaVxZUoA/_buildManifest.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/EZcdmRBfcJ0DYaaVxZUoA/_ssgManifest.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/172-374e517eabaafcd5.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/248-0c9b0a583e391364.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/255-d19a68d5cdf61c74.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/344-3be46b3334d4bc18.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/354-9411c560837c5643.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/356-5550b6a9746410aa.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/4bd1b696-409494caf8c83275.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/546-53d4e5ffa0741b01.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/558-9f3c6f8ed16a6154.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/619-f072ac750404f9da.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/710-d525d6a7457e5361.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/850-f246cebe0acecdde.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/993-0d39fec9aa3922aa.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/_not-found/page-bb8623766fc272ad.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/briefing/page-431da3d802906b86.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/conflicts/page-f310caecd3370eab.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/decisions/page-506a20f430b2d7e1.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/graph/page-9342ca8482acab35.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/layout-0887bec82bd4e181.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/meeting-prep/page-960d2dddc5228bdf.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/memories/page-14785c77921a05f7.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/organizations/page-530f19e026dfd476.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/page-9070d4eaaebc7f50.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/people/page-35fc9df360827250.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/projects/page-c084863047d2a1a6.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/review/page-2f2ac3f22a8e3698.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/sessions/page-efdac681166a9439.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/settings/page-8c0c28a283f49875.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/timeline/page-9436e6fa22ee3645.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/app/visualize/page-0d25c2374a0b6fce.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/framework-f52ebcb9f26a1e11.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/main-875cb23dc0a1f18e.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/main-app-181ccbd6eeeceb1e.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/pages/_app-5addca2b3b969fde.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/pages/_error-022e4ac7bbb9914f.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/chunks/webpack-681601bcc1224fcd.js +1 -0
- levh-2.26.8/server/dashboard/_next/static/css/809d4951adcd5b63.css +3 -0
- levh-2.26.8/server/dashboard/brand/levh-mark.png +0 -0
- levh-2.26.8/server/dashboard/briefing/index.html +1 -0
- levh-2.26.8/server/dashboard/briefing/index.txt +24 -0
- levh-2.26.8/server/dashboard/conflicts/index.html +1 -0
- levh-2.26.8/server/dashboard/conflicts/index.txt +24 -0
- levh-2.26.8/server/dashboard/decisions/index.html +1 -0
- levh-2.26.8/server/dashboard/decisions/index.txt +24 -0
- levh-2.26.8/server/dashboard/graph/index.html +1 -0
- levh-2.26.8/server/dashboard/graph/index.txt +24 -0
- levh-2.26.8/server/dashboard/icon.svg +9 -0
- levh-2.26.8/server/dashboard/index.html +1 -0
- levh-2.26.8/server/dashboard/index.txt +24 -0
- levh-2.26.8/server/dashboard/meeting-prep/index.html +1 -0
- levh-2.26.8/server/dashboard/meeting-prep/index.txt +24 -0
- levh-2.26.8/server/dashboard/memories/index.html +1 -0
- levh-2.26.8/server/dashboard/memories/index.txt +24 -0
- levh-2.26.8/server/dashboard/organizations/index.html +1 -0
- levh-2.26.8/server/dashboard/organizations/index.txt +24 -0
- levh-2.26.8/server/dashboard/people/index.html +1 -0
- levh-2.26.8/server/dashboard/people/index.txt +24 -0
- levh-2.26.8/server/dashboard/projects/index.html +1 -0
- levh-2.26.8/server/dashboard/projects/index.txt +24 -0
- levh-2.26.8/server/dashboard/review/index.html +1 -0
- levh-2.26.8/server/dashboard/review/index.txt +24 -0
- levh-2.26.8/server/dashboard/sessions/index.html +1 -0
- levh-2.26.8/server/dashboard/sessions/index.txt +24 -0
- levh-2.26.8/server/dashboard/settings/index.html +1 -0
- levh-2.26.8/server/dashboard/settings/index.txt +24 -0
- levh-2.26.8/server/dashboard/timeline/index.html +1 -0
- levh-2.26.8/server/dashboard/timeline/index.txt +24 -0
- levh-2.26.8/server/dashboard/visualize/index.html +1 -0
- levh-2.26.8/server/dashboard/visualize/index.txt +24 -0
- levh-2.26.8/server/fixtures/__init__.py +0 -0
- levh-2.26.8/server/fixtures/evaluation/01_project_decision_superseded.json +30 -0
- levh-2.26.8/server/fixtures/evaluation/02_meeting_deadline_changed.json +31 -0
- levh-2.26.8/server/fixtures/evaluation/03_same_fact_independent_sources.json +41 -0
- levh-2.26.8/server/fixtures/evaluation/04_same_source_duplicate.json +24 -0
- levh-2.26.8/server/fixtures/evaluation/05_low_trust_imported_text.json +19 -0
- levh-2.26.8/server/fixtures/evaluation/06_confirmed_human_memory.json +31 -0
- levh-2.26.8/server/fixtures/evaluation/07_fading_important_memory.json +35 -0
- levh-2.26.8/server/fixtures/evaluation/08_redacted_secret.json +18 -0
- levh-2.26.8/server/fixtures/evaluation/09_conflict_false_positive_guard.json +28 -0
- levh-2.26.8/server/mcp_sse.py +55 -0
- levh-2.26.8/server/mcp_stdio.py +71 -0
- levh-2.26.8/server/routes/__init__.py +1 -0
- levh-2.26.8/server/tools/__init__.py +1 -0
- levh-2.26.8/server/tools/admission.py +74 -0
- levh-2.26.8/server/tools/ask.py +52 -0
- levh-2.26.8/server/tools/backup.py +87 -0
- levh-2.26.8/server/tools/briefing.py +57 -0
- levh-2.26.8/server/tools/clear_short_term.py +19 -0
- levh-2.26.8/server/tools/conflicts.py +90 -0
- levh-2.26.8/server/tools/connector_sync.py +86 -0
- levh-2.26.8/server/tools/connectors.py +126 -0
- levh-2.26.8/server/tools/consolidate.py +25 -0
- levh-2.26.8/server/tools/consolidate_memories.py +56 -0
- levh-2.26.8/server/tools/context_file.py +31 -0
- levh-2.26.8/server/tools/decisions.py +37 -0
- levh-2.26.8/server/tools/dedupe.py +50 -0
- levh-2.26.8/server/tools/entities.py +80 -0
- levh-2.26.8/server/tools/export_import.py +43 -0
- levh-2.26.8/server/tools/feedback.py +74 -0
- levh-2.26.8/server/tools/forget.py +30 -0
- levh-2.26.8/server/tools/get_context.py +35 -0
- levh-2.26.8/server/tools/list_memories.py +55 -0
- levh-2.26.8/server/tools/meeting_prep.py +61 -0
- levh-2.26.8/server/tools/organizations.py +78 -0
- levh-2.26.8/server/tools/people.py +69 -0
- levh-2.26.8/server/tools/pin.py +42 -0
- levh-2.26.8/server/tools/privacy.py +72 -0
- levh-2.26.8/server/tools/profiles.py +137 -0
- levh-2.26.8/server/tools/projects.py +42 -0
- levh-2.26.8/server/tools/recall.py +49 -0
- levh-2.26.8/server/tools/register.py +143 -0
- levh-2.26.8/server/tools/reinforce.py +35 -0
- levh-2.26.8/server/tools/related.py +28 -0
- levh-2.26.8/server/tools/review.py +80 -0
- levh-2.26.8/server/tools/search.py +41 -0
- levh-2.26.8/server/tools/session.py +48 -0
- levh-2.26.8/server/tools/set_importance.py +23 -0
- levh-2.26.8/server/tools/stats.py +26 -0
- levh-2.26.8/server/tools/store.py +65 -0
- levh-2.26.8/server/tools/summarize.py +27 -0
- levh-2.26.8/server/tools/timeline.py +34 -0
- levh-2.26.8/server/tools/trust.py +72 -0
- levh-2.26.8/server/tools/update.py +48 -0
- levh-2.26.8/setup.cfg +4 -0
- levh-2.26.8/tests/test_admission.py +252 -0
- levh-2.26.8/tests/test_admission_ingress.py +250 -0
- levh-2.26.8/tests/test_api_smoke.py +139 -0
- levh-2.26.8/tests/test_ask.py +156 -0
- levh-2.26.8/tests/test_backup.py +348 -0
- levh-2.26.8/tests/test_briefing.py +384 -0
- levh-2.26.8/tests/test_calendar_connector.py +225 -0
- levh-2.26.8/tests/test_cli.py +221 -0
- levh-2.26.8/tests/test_conflict_candidates.py +409 -0
- levh-2.26.8/tests/test_connector_sync.py +245 -0
- levh-2.26.8/tests/test_consolidation.py +233 -0
- levh-2.26.8/tests/test_decisions.py +228 -0
- levh-2.26.8/tests/test_demo_conflict_eval.py +88 -0
- levh-2.26.8/tests/test_demo_data_cleanup.py +47 -0
- levh-2.26.8/tests/test_dogfood_metrics.py +146 -0
- levh-2.26.8/tests/test_dogfood_wiring.py +181 -0
- levh-2.26.8/tests/test_email_connector.py +260 -0
- levh-2.26.8/tests/test_embedder_modes.py +20 -0
- levh-2.26.8/tests/test_entity_graph.py +293 -0
- levh-2.26.8/tests/test_integration.py +774 -0
- levh-2.26.8/tests/test_integrity_hardening.py +140 -0
- levh-2.26.8/tests/test_mcp_blackbox.py +126 -0
- levh-2.26.8/tests/test_mcp_profile_boundaries.py +75 -0
- levh-2.26.8/tests/test_mcp_profiles.py +137 -0
- levh-2.26.8/tests/test_meeting_prep.py +256 -0
- levh-2.26.8/tests/test_memory_evaluation.py +167 -0
- levh-2.26.8/tests/test_onboarding_api.py +61 -0
- levh-2.26.8/tests/test_onboarding_privacy.py +52 -0
- levh-2.26.8/tests/test_onboarding_status.py +65 -0
- levh-2.26.8/tests/test_operational_hardening.py +282 -0
- levh-2.26.8/tests/test_organizations.py +286 -0
- levh-2.26.8/tests/test_packaging.py +104 -0
- levh-2.26.8/tests/test_people.py +184 -0
- levh-2.26.8/tests/test_provenance_trust.py +413 -0
- levh-2.26.8/tests/test_redaction_audit.py +309 -0
- levh-2.26.8/tests/test_release_pipeline.py +159 -0
- levh-2.26.8/tests/test_review_fixes.py +161 -0
- levh-2.26.8/tests/test_robustness_hardening.py +105 -0
- levh-2.26.8/tests/test_runtime_config.py +92 -0
- levh-2.26.8/tests/test_runtime_config_integration.py +79 -0
- levh-2.26.8/tests/test_score_breakdown_api.py +226 -0
- levh-2.26.8/tests/test_seed_demo.py +145 -0
- levh-2.26.8/tests/test_setup_cli.py +72 -0
- levh-2.26.8/tests/test_spaced_repetition.py +263 -0
- levh-2.26.8/tests/test_timeline.py +169 -0
- levh-2.26.8/tests/test_transcript_connector.py +210 -0
- levh-2.26.8/tests/test_v2_features.py +707 -0
levh-2.26.8/.env.example
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# ── StackMemory Environment Variables ──
|
|
2
|
+
# Environment values override .stackmemory/config.json. This file is a
|
|
3
|
+
# template only; StackMemory does not load .env automatically. Export the
|
|
4
|
+
# variables in the process that starts the CLI/API/MCP server.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# SQLite
|
|
8
|
+
SQLITE_DB_PATH=./stackmemory.db
|
|
9
|
+
# File databases use WAL and a lock wait; tune only for unusual deployments.
|
|
10
|
+
# STACKMEMORY_SQLITE_BUSY_TIMEOUT_MS=5000
|
|
11
|
+
# Replace-mode restore writes an online SQLite safety copy here. Default:
|
|
12
|
+
# a safety-backups/ directory beside SQLITE_DB_PATH.
|
|
13
|
+
# STACKMEMORY_SAFETY_BACKUP_DIR=./safety-backups
|
|
14
|
+
|
|
15
|
+
# Embedding mode: "auto" (local-first; never selects OpenAI from an ambient
|
|
16
|
+
# key), "local", "openai", "ollama" (fully local via an Ollama server), or
|
|
17
|
+
# "hash" (offline fallback). Use openai explicitly for remote embeddings.
|
|
18
|
+
EMBEDDER_MODE=local
|
|
19
|
+
# OPENAI_API_KEY=sk-...
|
|
20
|
+
|
|
21
|
+
# Local model name (for sentence-transformers)
|
|
22
|
+
LOCAL_MODEL=all-MiniLM-L6-v2
|
|
23
|
+
|
|
24
|
+
# Ollama (EMBEDDER_MODE=ollama)
|
|
25
|
+
OLLAMA_URL=http://localhost:11434
|
|
26
|
+
OLLAMA_MODEL=nomic-embed-text
|
|
27
|
+
|
|
28
|
+
# Short-term memory max entries
|
|
29
|
+
SHORT_TERM_MAX=50
|
|
30
|
+
|
|
31
|
+
# Default decay half-life in hours (each memory starts here, then grows
|
|
32
|
+
# its OWN half-life every time it's recalled or reinforced)
|
|
33
|
+
DECAY_HALF_LIFE_HOURS=168
|
|
34
|
+
|
|
35
|
+
# H(x,ψ) Weights
|
|
36
|
+
HSCORE_ALPHA=0.4
|
|
37
|
+
HSCORE_BETA=0.2
|
|
38
|
+
HSCORE_GAMMA=0.3
|
|
39
|
+
HSCORE_DELTA=0.1
|
|
40
|
+
|
|
41
|
+
# Reinforcement (spaced-repetition style memory strengthening)
|
|
42
|
+
# Each recall multiplies a memory's stability by (1 + gain*(0.5+importance)).
|
|
43
|
+
REINFORCEMENT_GAIN=0.5
|
|
44
|
+
# Cap on how durable a memory can become (hours). Default: 1 year.
|
|
45
|
+
MAX_STABILITY_HOURS=8760
|
|
46
|
+
# Negative feedback (memory_feedback helpful=false) multiplies stability by this.
|
|
47
|
+
FEEDBACK_WEAKEN_FACTOR=0.5
|
|
48
|
+
|
|
49
|
+
# Auto-capture: summarize a session's memories into one durable memory when the
|
|
50
|
+
# session ends. Uses an LLM if OPENAI_API_KEY is set, else a deterministic
|
|
51
|
+
# offline (extractive) summary. Off by default.
|
|
52
|
+
# AUTO_SUMMARIZE_SESSIONS=false
|
|
53
|
+
# SUMMARY_MODEL=gpt-4o-mini
|
|
54
|
+
|
|
55
|
+
# Retroactive interference: a new memory this similar to an older one weakens it.
|
|
56
|
+
# 0.97 is safe in every embedder mode (fires only on near-duplicates);
|
|
57
|
+
# with a semantic embedder (local/openai/ollama), 0.88-0.92 also catches
|
|
58
|
+
# contradictions ("deploy branch is main" vs "deploy branch is prod").
|
|
59
|
+
# Set to 1.0 to disable.
|
|
60
|
+
INTERFERENCE_THRESHOLD=0.97
|
|
61
|
+
INTERFERENCE_FACTOR=0.6
|
|
62
|
+
|
|
63
|
+
# API
|
|
64
|
+
API_HOST=127.0.0.1
|
|
65
|
+
API_PORT=8000
|
|
66
|
+
|
|
67
|
+
# Optional shared-secret gate. When set, every /api/* request (except
|
|
68
|
+
# /api/health) and the WebSocket must present it via the X-StackMemory-Token
|
|
69
|
+
# header (or ?token= for the socket). Unset = zero-config, local use only.
|
|
70
|
+
# STACKMEMORY_TOKEN=change-me
|
|
71
|
+
# In-process limits apply only when STACKMEMORY_TOKEN is enabled. They slow
|
|
72
|
+
# brute-force attempts on one process; use a reverse proxy for distributed
|
|
73
|
+
# deployments.
|
|
74
|
+
# STACKMEMORY_AUTH_RATE_LIMIT=10
|
|
75
|
+
# STACKMEMORY_API_RATE_LIMIT=120
|
|
76
|
+
# STACKMEMORY_RATE_LIMIT_WINDOW_SECONDS=60
|
|
77
|
+
|
|
78
|
+
# Allowed CORS origins (comma-separated). Defaults to localhost only so a
|
|
79
|
+
# random website can't read your local memory store from the browser.
|
|
80
|
+
# Set to "*" to allow any origin (not recommended for a local tool).
|
|
81
|
+
# STACKMEMORY_CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://localhost:8000,http://127.0.0.1:8000
|
|
82
|
+
|
|
83
|
+
# Optional local dogfood metrics. Disabled by default. When enabled, only
|
|
84
|
+
# whitelisted aggregate events are appended locally; raw memory/query content
|
|
85
|
+
# is rejected and nothing is sent over the network. Processes must be restarted
|
|
86
|
+
# after changing the flag.
|
|
87
|
+
# STACKMEMORY_DOGFOOD_ENABLED=false
|
|
88
|
+
# DOGFOOD_JOURNAL_PATH=./dogfood_events.jsonl
|
|
89
|
+
|
|
90
|
+
# Optional privacy-safe local onboarding receipt path.
|
|
91
|
+
# STACKMEMORY_ONBOARDING_RECEIPT_PATH=.stackmemory/onboarding-receipt.json
|