Skip to content

Commit 26a7344

Browse files
feat: 1.4.5 release - governed recall, schema v8, Smart gateway
Complete consolidation release review fixes, including rotating profile scans, safety repair coverage, transaction ownership hardening, and consolidation ranking evidence.
1 parent c50101b commit 26a7344

117 files changed

Lines changed: 9976 additions & 1047 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "engraphis-memory",
1010
"source": "./",
1111
"description": "Discipline for giving agents durable, scoped, explainable memory across sessions and repos with the Engraphis MCP tools.",
12-
"version": "1.4.0"
12+
"version": "1.4.5"
1313
}
1414
]
1515
}

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "engraphis-memory",
3-
"version": "1.4.0",
3+
"version": "1.4.5",
44
"description": "Give agents durable, scoped, explainable memory across sessions and repos via the Engraphis MCP tools. Use when you learn something worth keeping, need prior context before acting, or ask why/how a fact changed. Covers remember/recall, why/timeline, forget/pin/correct, sessions, and code search.",
55
"author": {
66
"name": "The Engraphis Authors",

.claude-plugin/skill-assets.sha256

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
b3122186525b688060558721dadf8ca4a20e192097556adb1daecca0649a4e28 .claude-plugin/marketplace.json
2-
5a870fabc9814e177a570a8878371d1c4c50a5b245076c2cfbb7ca659e41ebf6 .claude-plugin/plugin.json
3-
911c70ead2c5aa3de24a6c645a9e921382a149aba52b0a9582ecd5b560e5b8a8 skills/engraphis-memory/SKILL.md
1+
e7e4ecd111d9b04c290ddd60e0fadb90e3afd8c67e39dcb8fbce0b50b5e3ce42 .claude-plugin/marketplace.json
2+
65bff1596f3db2bc75b74c6970d87e806d46ef1cb3e612cd2002f19c3a8f6acb .claude-plugin/plugin.json
3+
56be8d078a2a8fc6e6cd1c2be5716605d8621dab953caa8cfcd20e2dce474305 skills/engraphis-memory/SKILL.md
44
45dd73ca6afdd9e12ecd38c48e4a612b7646c25a07a75a80ca0e68d0e0b85f0e skills/engraphis-memory/references/CONVENTIONS.md
55
529fff3bdbe73f83209087fd10055fad77c5e5224ad8a9e6b0254052aa50e109 skills/engraphis-memory/references/SCOPING.md
66
eecd861f0f8cc2a9def07a53387ca66d8cb68d8b62d9b048dcd1b0b250fa3fee skills/engraphis-memory/references/TOOLS.md

.dockerignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,59 @@ __pycache__
77
*.db
88
*.db-wal
99
*.db-shm
10+
*.db-journal
11+
*.bak
1012
.env
1113
.venv
1214
venv
1315
docs/_build
1416
*.egg-info
1517
build
1618
dist
19+
# Test and local tooling output.
20+
.coverage
21+
.coverage.*
22+
htmlcov
23+
.tox
24+
.nox
25+
.hypothesis
26+
.audit-venv
27+
models_cache
28+
.secrets
29+
internal
30+
.commandcode
31+
32+
# Machine-local runtime state and credentials.
33+
.engraphis_processed_webhooks
34+
undelivered_license_keys.tsv
35+
automation.json
36+
autosync.json
37+
.engraphis_update_check.json
38+
cookies.txt
39+
40+
# Private research and local demo material.
41+
/COMMERCIAL_AUDIT.md
42+
/COMPETITIVE_ANALYSIS.md
43+
/docs/COMMERCIAL_AUDIT.md
44+
/docs/COMPETITIVE_ANALYSIS.md
45+
/demo/generated/
46+
/demo/output/
47+
/demo/assets/
48+
/demo/*_killer.html
49+
/demo/*_social_demo.html
50+
51+
# Local QA/eval/automation state — never part of the build context.
52+
node_modules
53+
integrations/pi/node_modules
54+
test-results
55+
playwright-report
56+
.playwright
57+
.private-eval
58+
.hosted-eval-results
59+
/.tmp-*/
60+
/.tmp_*/
61+
/.release-full-tmp/
62+
/_to_delete/
63+
*.log
64+
*.whl
65+
*.tar.gz

.env.example

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ ENGRAPHIS_SERVICE_MODE=customer
2121
# Behind Traefik, use its LAN hostname instead:
2222
# ENGRAPHIS_DASHBOARD_URL=http://engraphis.local
2323

24-
# Update reminder. When on (default), the server checks for a newer Engraphis release
25-
# once a day and surfaces it in the dashboard banner, the startup log, and over MCP.
26-
# The check is fail-silent and cached; set to 0 to disable all update network activity.
24+
# Update reminder. It is OFF by default, so a local installation makes no update-related
25+
# network request. Set this to 1 to check for a newer Engraphis release once a day and
26+
# surface it in the dashboard banner, startup log, and over MCP. The check is cached
27+
# and fail-silent.
2728
# ENGRAPHIS_UPDATE_CHECK=1
2829
# Override the release source. Default: the GitHub releases/latest API for the project
2930
# repo. Accepts any HTTPS endpoint returning a GitHub-release, PyPI, or
@@ -32,6 +33,11 @@ ENGRAPHIS_SERVICE_MODE=customer
3233
# Point the default GitHub source at a different owner/repo (ignored when
3334
# ENGRAPHIS_UPDATE_URL is set). Default: Coding-Dev-Tools/engraphis.
3435
# ENGRAPHIS_UPDATE_REPO=Coding-Dev-Tools/engraphis
36+
# Which extras the self-updater installs on top of the base package. The installer
37+
# cannot see which extras the current install selected, so it defaults to the safe
38+
# superset `engraphis[all]`; set a comma-separated list (e.g. `server,mcp`) to pin
39+
# a smaller surface, or `none` for the base package only.
40+
# ENGRAPHIS_UPDATE_EXTRAS=
3541

3642
# Optional local API bearer. If set, supported protected routes accept
3743
# Authorization: Bearer <token>. Use a strong, independently revocable value and do not
@@ -70,10 +76,16 @@ ENGRAPHIS_API_TOKEN=
7076
ENGRAPHIS_EMBED_MODEL=sentence-transformers/all-MiniLM-L6-v2
7177
# Embedding dimension is auto-detected from the model. Override only if needed.
7278
# ENGRAPHIS_EMBED_DIM=384
79+
# Vector index backend for the v2 engine: "numpy" (default, deterministic reference
80+
# index), "sqlite-vec" (require the accelerated ANN backend; needs the sqlite-vec
81+
# package), or "auto" (use sqlite-vec when available, fall back to NumPy).
82+
# ENGRAPHIS_VECTOR_BACKEND=numpy
7383

7484
# ── LLM (external, you choose the provider) ─────────────────────────────────
7585
# Provider: openai | anthropic | google | openrouter | custom
7686
# Copy-ready provider setups and endpoint requirements: docs/LLM_PROVIDERS.md
87+
# Codex subscription users: connect Codex to this installation over MCP; the subscription
88+
# path does not use ENGRAPHIS_LLM_PROVIDER or an Engraphis LLM API key.
7789
# ── v2 write-path fact extraction (optional) ─────────────────────────────────
7890
# "none" (default): store text as given. "chunk": deterministic offline chunks.
7991
# "llm": free-form fact extraction. "llm_structured": schema-validated typed facts,
@@ -97,6 +109,9 @@ ENGRAPHIS_GRAPH_EXTRACTOR=regex
97109
# "llm" sends a bounded excerpt to the configured provider for an advisory
98110
# ephemeral/normal/critical signal. Writes are never discarded.
99111
ENGRAPHIS_RETENTION_SUPERVISOR=none
112+
# A remote retention supervisor is advisory: without this opt-in, its "critical"
113+
# recommendations keep normal retention strength. Set 1 to honor critical signals.
114+
# ENGRAPHIS_ALLOW_AUTOMATIC_CRITICAL_RETENTION=0
100115

101116
# Optional local resource adapters:
102117
# ENGRAPHIS_WHISPER_MODEL=/absolute/path/to/local-whisper-model
@@ -112,6 +127,19 @@ ENGRAPHIS_RETENTION_SUPERVISOR=none
112127
# ENGRAPHIS_GRAPH_HOST=127.0.0.1
113128
# ENGRAPHIS_GRAPH_PORT=8720
114129

130+
# Standalone MCP-over-HTTP server (`engraphis-mcp-http`). Loopback-only by default;
131+
# any non-loopback bind (via these or ENGRAPHIS_HOST) requires ENGRAPHIS_API_TOKEN.
132+
# ENGRAPHIS_HTTP_HOST=127.0.0.1
133+
# ENGRAPHIS_HTTP_PORT=8080
134+
# ENGRAPHIS_HTTP_TRANSPORT=streamable-http
135+
136+
# When running under Docker (auto-detected via /.dockerenv), the self-updater skips
137+
# in-place pip upgrades and prints a manual reinstall hint instead.
138+
# ENGRAPHIS_DOCKER=0
139+
140+
# Docker Compose host port mapping override for the dashboard (default 8700).
141+
# ENGRAPHIS_COMPOSE_PORT=8700
142+
115143
# ── Reverse proxy (TLS termination) ─────────────────────────────────────────
116144
# When behind a proxy that terminates TLS (Railway/Fly/nginx), trust its
117145
# X-Forwarded-Proto/-For headers so request.url.scheme is https and the session
@@ -135,6 +163,9 @@ ENGRAPHIS_RETENTION_SUPERVISOR=none
135163
# ENGRAPHIS_CSP="" # send no CSP at all
136164
# ENGRAPHIS_HSTS="max-age=31536000; includeSubDomains"
137165

166+
# Codex subscription users can use the local MCP connection documented in README.md and
167+
# docs/AGENT_CONNECT.md; leave the optional external LLM settings below disabled unless
168+
# Engraphis itself must call a separate provider.
138169
ENGRAPHIS_LLM_PROVIDER=openai
139170
# Model name (provider-specific):
140171
# openai: gpt-4o-mini, gpt-4o, gpt-4.1-mini, o4-mini ...
@@ -143,17 +174,12 @@ ENGRAPHIS_LLM_PROVIDER=openai
143174
# openrouter: anthropic/claude-3.5-sonnet, openai/gpt-4o-mini ...
144175
# custom: any model name your OpenAI-compatible endpoint accepts
145176
ENGRAPHIS_LLM_MODEL=gpt-4o-mini
146-
# API key for chat/synthesis, llm/llm_structured extraction, and structured consolidation:
147-
ENGRAPHIS_LLM_API_KEY=sk-your-key-here
177+
# API key for chat/synthesis, llm/llm_structured extraction, and structured consolidation.
178+
# Leave unset until you explicitly choose a provider and enable an LLM-backed feature.
179+
# ENGRAPHIS_LLM_API_KEY=<your-api-key>
148180
# For openrouter / custom: the base URL of the OpenAI-compatible endpoint.
149181
# openrouter: https://openrouter.ai/api/v1
150182
# custom: https://your-endpoint/v1
151-
# ollama: http://localhost:11434/v1
152-
# Ollama example (replace the model with one you have pulled):
153-
# ENGRAPHIS_LLM_PROVIDER=custom
154-
# ENGRAPHIS_LLM_MODEL=qwen2.5-coder:latest
155-
# ENGRAPHIS_LLM_API_KEY=ollama # must be non-empty; default local Ollama ignores it
156-
# ENGRAPHIS_LLM_BASE_URL=http://localhost:11434/v1
157183
# ENGRAPHIS_LLM_BASE_URL=https://openrouter.ai/api/v1
158184
# Optional: extra headers (JSON string) for custom providers.
159185
# ENGRAPHIS_LLM_EXTRA_HEADERS={"HTTP-Referer":"https://myapp.com","X-Title":"engraphis"}
@@ -277,6 +303,12 @@ ENGRAPHIS_LLM_API_KEY=sk-your-key-here
277303
# ENGRAPHIS_CHUNK_TOKENIZER_REVISION=<immutable model commit>
278304
# ENGRAPHIS_LOOP_INTERVAL=60
279305
# ENGRAPHIS_LOOP_TOP_K=20
306+
# Automatic local consolidation inside the background loop. OFF by default (0): the
307+
# sweep is a workspace-wide cluster scan, so it should be an explicit operator choice.
308+
# N > 0 runs it at most once every N loop ticks (e.g. 30 with a 60s interval ≈ every
309+
# 30 minutes). The sweep is deterministic/offline (never passes an LLM), archives
310+
# decayed transients, and distills recurring episodic memories into semantic digests.
311+
# ENGRAPHIS_LOOP_CONSOLIDATE=0
280312
# ENGRAPHIS_RERANK_MODEL=cross-encoder/ms-marco-MiniLM-L-6-v2
281313

282314
# Workspace allow-list: comma-separated names. Empty = all allowed.
@@ -286,6 +318,11 @@ ENGRAPHIS_LLM_API_KEY=sk-your-key-here
286318
# ENGRAPHIS_RELAY_URL=https://relay.example.com
287319
# ENGRAPHIS_SYNC_TOKEN=
288320
# ENGRAPHIS_SYNC_READ_ONLY=0
321+
# End-to-end encryption key for Cloud Sync bundles (relay transport). A single
322+
# immutable 32-byte URL-safe base64 value (43 chars, or 44 with one '=' pad) that
323+
# every authorized device shares; changing it makes previously stored ciphertext
324+
# unreadable. The folder transport does not encrypt at rest — see docs/SYNC.md.
325+
# ENGRAPHIS_SYNC_E2EE_KEY=
289326

290327
# Hosted plan upgrade URLs: override the default upgrade landing pages.
291328
# ENGRAPHIS_UPGRADE_URL=

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
2222
with:
2323
python-version: ${{ matrix.python-version }}
24+
cache: pip
25+
cache-dependency-path: pyproject.toml
2426
- name: Install (core + server/mcp/code extras; no torch or SQLCipher)
2527
run: |
2628
python -m pip install --upgrade pip
@@ -54,6 +56,8 @@ jobs:
5456
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
5557
with:
5658
python-version: ${{ matrix.python-version }}
59+
cache: pip
60+
cache-dependency-path: pyproject.toml
5761
- name: Install encryption integration gate
5862
run: |
5963
python -m pip install --upgrade pip
@@ -72,6 +76,8 @@ jobs:
7276
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
7377
with:
7478
python-version: "3.9"
79+
cache: pip
80+
cache-dependency-path: pyproject.toml
7581
- name: Install (numpy-only core — the minimum supported runtime)
7682
run: |
7783
python -m pip install --upgrade pip
@@ -83,6 +89,37 @@ jobs:
8389
- name: Ablation
8490
run: python -m eval.ablation
8591

92+
coverage:
93+
name: coverage gate (Python 3.11)
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
97+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
98+
with:
99+
python-version: "3.11"
100+
cache: pip
101+
cache-dependency-path: pyproject.toml
102+
- name: Install
103+
run: |
104+
python -m pip install --upgrade pip
105+
pip install -e ".[test]" pytest-cov
106+
- name: Coverage run (all extras-gated tests, tracked modules)
107+
run: python -m pytest -o addopts="" tests/ -q -rs --cov=engraphis --cov-report=term-missing --cov-fail-under=60
108+
109+
hygiene:
110+
name: repo hygiene gate (no stray DBs/logs)
111+
runs-on: ubuntu-latest
112+
steps:
113+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
114+
- name: Reject stray runtime artifacts at repo root
115+
run: |
116+
stray=$(find . -maxdepth 1 -type f \( -name '*.db' -o -name '*.db-wal' -o -name '*.db-shm' \
117+
-o -name '*.bak' -o -name '*.log' \) -print)
118+
if [ -n "$stray" ]; then
119+
echo "Refusing to commit stray runtime artifacts:"; echo "$stray"; exit 1
120+
fi
121+
echo "repo root clean"
122+
86123
pi-extension:
87124
name: Pi extension (${{ matrix.os }}, Python ${{ matrix.python-version }}, Node ${{ matrix.node-version }})
88125
runs-on: ${{ matrix.os }}

AGENTS.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ most common mistake here.
2020
| Status | Primary scoped, bi-temporal, interface-driven implementation. | Compatibility/reference implementation with flat namespaces. |
2121
| Model | Scoped + bi-temporal + typed; interface-driven. | Single flat `namespace` string per memory. |
2222
| Code | `engraphis/core/`, `engraphis/backends/`, `eval/`, `tests/`, `scripts/migrate_to_v2.py` | `engraphis/app.py`, `config.py`, `models.py`, `routes/`, `stores/`, `engines/`, `llm/`, `static/` |
23-
| Data | new v2 schema (`SCHEMA_VERSION = 7`) | `engraphis_v1.db` |
23+
| Data | new v2 schema (`SCHEMA_VERSION = 9`) | `engraphis_v1.db` |
2424
| Entry | `MemoryEngine.create()``core/engine.py` | Internal reference only; never a public launcher |
2525

2626
**Rule:** build new capability on **v2** (`core/` + `backends/`) behind the interfaces.
@@ -35,7 +35,7 @@ task is ambiguous, decide which side it belongs to *before* editing.
3535
# ── Install ──────────────────────────────────────────────────────────────────
3636
pip install numpy pytest # v2 core + tests, fully OFFLINE (this is what CI does)
3737
pip install -e ".[all,dev]" # full stack: FastAPI server, ST embeddings, ruff
38-
cp .env.example .env # only needed for the v1 server / LLM features
38+
cp .env.example .env # optional; configure server, LLM, encryption, or hosted client settings
3939

4040
# ── Quality gate (offline, no API key — KEEP THIS GREEN; mirrors .github/workflows/ci.yml) ──
4141
python -m pytest tests/ -q # unit tests (offline)
@@ -182,7 +182,7 @@ These are pure, unit-tested functions — change them only with a corresponding
182182

183183
---
184184

185-
## 5. Data model cheat-sheet (`core/interfaces.py`, `core/schema.py``SCHEMA_VERSION = 7`)
185+
## 5. Data model cheat-sheet (`core/interfaces.py`, `core/schema.py``SCHEMA_VERSION = 9`)
186186

187187
- **Scope hierarchy:** `workspace → repo → session → memory`. Scopes: `session|repo|workspace|user`.
188188
- **Bi-temporal validity on every record:** world-time `valid_from/valid_to` +
@@ -194,8 +194,7 @@ These are pure, unit-tested functions — change them only with a corresponding
194194
- **Tables:** `workspaces`, `repos`, `sessions`, `memories`, `mem_vectors`, `embedding_state`,
195195
`mem_fts` (FTS5 + plain-table fallback), `entities`, `edges` (bi-temporal), `mem_links`,
196196
`memory_entities`, `symbols`, `code_edges`, `code_files`, `code_memory_links`,
197-
`operation_receipts`,
198-
`events`, `audit`, `schema_migrations`.
197+
`operation_receipts`, `events`, `audit`, `memory_tombstones`, `schema_migrations`.
199198
- **Vectors are stored L2-normalized** so cosine similarity == dot product.
200199

201200
---
@@ -230,8 +229,6 @@ These are pure, unit-tested functions — change them only with a corresponding
230229
- **`docs/HOSTED_PLANS.md`** — concise pricing, plan contents, trial, and hosted-service boundary.
231230
- **`docs/MCP_TOOLS.md`** — standalone inventory of the public MCP surface; keep it synchronized
232231
with `engraphis/mcp_server.py`.
233-
- **`docs/OLLAMA.md`** — local Ollama configuration. Keep setup details here instead of
234-
duplicating them in the README.
235232
- **`docs/SYNC.md`** — cloud sync (Pro): architecture, the convergent merge, CLI usage, and the
236233
untrusted-bundle security model.
237234
- **`AGENTS.md`** (this file) + **`CLAUDE.md`** — how to work in the repo.

0 commit comments

Comments
 (0)