Repository navigation
ZettelForge v2.9.0
Major feature & CTI hardening release introducing RFC-008 Memory Salience, Spacing Effects & Tiered Decay, Spec 002 CTI Memory Agent Hardening (Phases 1–3), opt-in Neo4j pathfinding, the npx zettelforge npm MCP wrapper, and security dependency updates. No manual database migration is required (SQLite columns and FTS5 index backfill automatically on open).
Highlights
CTI Memory Agent Hardening & Operational Reliability (Spec 002 — #227, #228, #229)
- End-to-End TLP 2.0 Governance & Cloud Egress Guard (#228):
- Enforces
max_tlp(TLP:CLEAR..TLP:RED, fail-closed on unknown ceilings/markings) acrossMemoryManager.recall(),recall_entity(),recall_actor(),get_context(),synthesize(),traverse_graph(),get_entity_relationships(),provenance_chain(), and MCP tools (zettelforge_recall,zettelforge_entity,zettelforge_synthesize,zettelforge_graph). - Fail-closed cloud-LLM TLP egress guard (
TLPEgressViolationError) blocksTLP:AMBER+STRICT/TLP:REDnotes on cloud providers (including fallback providers such aslitellm) unless explicitly overridden viaZETTELFORGE_CLOUD_MAX_TLP/governance.cloud_max_tlp. - Annotates synthesis responses with high-water-mark TLP markings.
- Enforces
- SQLite FTS5 BM25 3-Way Hybrid Retrieval (#229):
- Synchronized CTI-friendly SQLite FTS5 index (
notes_ftswithunicode61 tokenchars '._-:/\', O(1)notes_fts_maprowid mapping, sentence-boundary delimiter normalization, and automatic backfill on open). - Wired into 3-way fusion (
vector + graph + lexical BM25) inBlendedRetriever.blend()/blend_rrf()andMemoryManager.recall(), with automatic local FTS5 fallback when vector retrieval stalls or errors.
- Synchronized CTI-friendly SQLite FTS5 index (
- Crash-Safe Enrichment Startup Replay & Ledger Health (#229):
MemoryManager.replay_orphaned_enrichment_jobs()recovers abandonedqueued/runningRFC-018 enrichment jobs on startup (respectingenrichment.enabled, atomic durableowner_idclaims to prevent duplicate execution across concurrent managers, oldest-first paging across large backlogs, bounded retries ->dead_lettered, missing note ->cancelled).- Exposes
enrichment_ledgerandenrichment_queue_depthhealth stats inMemoryManager.get_stats().
- Bundled MITRE ATT&CK / MISP Aliases, IOC Refanging & Temporal Edges (#228):
- Bundled
src/zettelforge/data/cti_aliases.json(100+ actor/tool alias mappings) loaded beneath~/.amem/entity_aliases.jsonoverrides for zero-config SQLite deployments. - Non-mutating IOC refanging (
hxxp://,[.],[@],[:]), newipv6,cidr,asn, andyara_ruleextractors, and non-routable IP/CIDR hub suppression in the knowledge graph. - Temporal edge validity enforcement (
valid_from,valid_until,revoked) acrossSQLiteBackend,KnowledgeGraph,GraphRetriever, causal traversals, andMemoryManager.traverse_graph().
- Bundled
- Prompt-Injection Guard, RFC-008 Lifecycle, MCP & Citation Grounding (#227, #229):
- Tightened
prompt_injection_guard.pyto eliminate false positives on legitimate CTI bypass prose and bulleted TTP playbooks while keeping fail-closed injection blocking. - Wired RFC-008
spacing_strengthsinto retrieval blending, normalized UTC timestamps, vectorized salience similarity withnumpy, and capped authoritative/durable CTI notes (tier=="A",persistence_semantics=="knowledge", CISA KEV, detection rules) atMemoryTier.COLDso they never auto-freeze. - Updated MCP
zettelforge_recallto defaultexclude_superseded=Truewith full provenance metadata, expandedzettelforge_entityenum to 21 entity types with alias-aware actor routing, and hardened TypeQL string escaping. - Added strict citation grounding in
SynthesisValidator.verify_citations()/validate_response()checking both structured source lists and inline[note_...]text citations.
- Tightened
Memory Lifecycle, Graph & Ecosystem
- Memory Salience, Spacing Effects & Tiered Decay (RFC-008 Phases 1–5, 7) (#225): Von Restorff salience scoring (
memory_salience.py), spacing reinforcement/decay curves (memory_spacing.py), lifecycle tiers (tiered_decay.py), andMemoryManager.reinforce_note()/refresh_memory_tiers(). - Opt-in Neo4j Path-Query Backend & Sync Job (#224):
pip install zettelforge[neo4j],ZETTELFORGE_NEO4J_PATHFINDING=true, andpython -m zettelforge.scripts.neo4j_sync. - npm MCP Server Wrapper (#223): Run ZettelForge MCP directly via
npx --yes zettelforge, plusserver.jsonnpm registry entry and.github/workflows/publish-npm.yml. - Typed Detection Metadata & Sigma Rule Extraction (#182, #185):
DetectionMetaonMemoryNote.metadata.detectionandsigma_ruleextraction inEntityExtractor. - Documentation & Governance (#184, #186, #190, #193, #226): Updated docs for v2.9.0, ADRs 0001–0004, RFC-019, and Code Quality CI (
mypy+ruffSARIF).
Security & Breaking Changes
- Python 3.11+ required (Python 3.10 dropped; CI covers Python 3.11, 3.12, and 3.13) (#218).
- Raised minimum versions for patched dependencies (Requests, PyArrow, Pydantic, Jinja2, LangChain, LiteLLM, dnspython, Pillow, filelock, pytest, FastAPI 0.162.5) (#218).
- Temporarily disabled Maigret username discovery and removed its dependency due to SoupSieve CVE-2026-126190; see
docs/security-update-2.9.0.mdfor upgrade cleanup notes (#218). - Fixed CodeQL stack-trace-exposure and URL-sanitization findings (#192) and hardened OSINT WHOIS collector error handling (#183).
Full Changelog: v2.8.0...v2.9.0