lean-ctx 3.9.5

Context Runtime for AI Agents with CCP. 71 MCP tools, 10 read modes, 95+ compression patterns, cross-session memory (CCP), persistent AI knowledge with temporal facts + contradiction detection, multi-agent context sharing, LITM-aware positioning, AAAK compact format, adaptive compression with Thompson Sampling bandits. Supports 24+ AI tools. Reduces LLM token consumption by up to 99%.
Documentation
name = "eu-ai-act-deployer"
version = "0.1.0"
description = "EU AI Act deployer alignment: Art. 26(6) retention, Art. 10(5) regulated-identifier redaction, Art. 14(4)(e) budget cap, egress denied (framework pin: OJ L 2024/1689; mapping: compliance/mappings/eu-ai-act.toml)"
extends = "strict-redaction"

[context]
# Art. 14(4)(e): a hard cap is the technical intervention point — runaway
# context assembly stops here, with budget_warning fired before exhaustion.
max_context_tokens = 12000
# Art. 26(6): deployers keep logs >= 6 months; one year covers annual audits.
audit_retention_days = 365
# Art. 15(5): web fetches are the exfiltration sink for deployer codebases.
deny_tools = ["ctx_url_read"]

[redaction]
# Art. 10(5): special-category and regulated personal identifiers must not
# enter model context. Labeled DOB (label anchors the match across formats).
date_of_birth = '(?i)\b(dob|date[ _-]?of[ _-]?birth)\b[ :=#]*\d{1,4}[-/.]\d{1,2}[-/.]\d{1,4}'
# National identifiers: US SSN shape (grouped).
national_id = '\b\d{3}-\d{2}-\d{4}\b'
# Financial identifiers tied to natural persons.
iban = '\b[A-Z]{2}\d{2}[A-Z0-9]{11,30}\b'
payment_card = '\b\d{4}[ -]?\d{4}[ -]?\d{4}[ -]?\d{1,7}\b'

[filters]
# Art. 10(5) (GL #675): special-category/regulated identifiers are filtered out
# of inbound context. Art. 15(5): prompt-injection in retrieved content is an
# integrity attack and is refused.
pii = "redact"
injection = "block"

[egress]
# Art. 15(5) cybersecurity (GL #676): secrets/PII must not leave via agent
# writes/actions; the write/action rate is bounded.
block_secrets = true
max_writes_per_min = 120