Documentation
¶
Overview ¶
Package redact scrubs secrets out of text before it's written to the database. Tool outputs routinely contain API keys (a Bash line that did `cat .env`), and a tool call's own input can contain one too (an agent writing a config file). Everything that lands in messages.content or messages.raw goes through Redact first — no exceptions, since we can't know in advance which sessions will have touched a secret.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Redact ¶
Redact replaces likely secrets in s with a fixed placeholder: named vendor-token patterns, .env-style KEY=VALUE assignments, and a generic high-entropy fallback. It over-redacts on purpose — a false positive blanks out a UUID or a git commit hash, a false negative leaks a key — so when in doubt, this redacts.
Types ¶
This section is empty.