Skip to main content

Module redaction

Module redaction 

Source
Expand description

Redaction/scrub filter for the personal → shared promotion boundary (D9 §2). Redaction filter for the personal → shared promotion boundary.

Per docs/discovery/memory-service-design.md §2 and D9, this is the one place content filtering happens. Personal memories are stored verbatim (“store everything”); when an author promotes a memory to a shared namespace, the redactor scrubs secrets and PII first. Never at auto-capture.

§Rules (v0, regex-based)

CategoryPattern
api_keyOpenAI sk-..., AWS AKIA..., generic 40+ hex/token
bearer_tokenBearer <token>
private_keyPEM -----BEGIN ... PRIVATE KEY----- blocks
emailRFC-ish email addresses
ipv4Dotted-quad addresses

Replaced with [REDACTED:<category>]. A richer detector (secret- scanning service, NER for PII) can swap in behind the same [Redactor] interface later.

Structs§

Redaction
One category of redaction that fired, with a count.
RedactionResult
The outcome of redacting a text.
Redactor
A rule-based content scrubber.