lean-ctx 3.9.18

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 = "healthcare"
version = "1.0.0"
description = "HIPAA-aligned: strict redaction plus PHI identifiers, no web fetches, 6-year audit expectation"
extends = "strict-redaction"

[context]
deny_tools = ["ctx_url_read"]
max_context_tokens = 12000
# HIPAA documentation-retention expectation (6 years).
audit_retention_days = 2190

[redaction]
# US Social Security numbers (grouped or contiguous, with separators).
us_ssn = '\b\d{3}-\d{2}-\d{4}\b'
# Medical record numbers as commonly labeled in fixtures/logs.
mrn = '(?i)\b(mrn|medical[ _-]?record[ _-]?(no|number|id))\b[ :=#]*[A-Z0-9-]{5,}'
# US health-insurance member ids as labeled fields.
member_id = '(?i)\b(member|subscriber|policy)[ _-]?(no|number|id)\b[ :=#]*[A-Z0-9-]{5,}'
# Labeled dates of birth (date formats vary; the label anchors the match).
date_of_birth = '(?i)\b(dob|date[ _-]?of[ _-]?birth)\b[ :=#]*\d{1,4}[-/.]\d{1,2}[-/.]\d{1,4}'
# US National Provider Identifier as a labeled field.
npi = '(?i)\bnpi\b[ :=#]*\d{10}\b'

[filters]
# Inbound DLP (GL #675): PHI is redacted from tool output before it reaches the
# model (HIPAA minimum-necessary); prompt-injection in retrieved content is an
# attack on integrity and is refused.
pii = "redact"
injection = "block"

[egress]
# Output DLP (GL #676): block agent writes/actions that carry detected secrets
# or PHI, and bound the write/action rate.
block_secrets = true
max_writes_per_min = 120