/** * Sensitive Data Filter * * Automatically detects and redacts sensitive information before * saving to memory. Applied globally to all memory write paths * (vector memory, memory blocks, auto-capture). * * Configurable via agent_hive.json → memoryFilter. * * Patterns supported: * - API keys (sk-*, pk-*, github personal tokens, etc.) * - AWS access keys + secret keys * - Private keys (RSA, ECDSA, ED25519, etc.) * - JWT tokens * - Generic bearer tokens * - Connection strings (postgres://, mysql://, mongodb://, etc.) * - Email addresses (optional, configurable) * - URLs containing credentials * - Environment variable assignments with sensitive values */ export interface MemoryFilterConfig { enabled?: boolean; /** Custom additional regex patterns (each with name and pattern string) */ customPatterns?: Array<{ name: string; pattern: string; }>; /** Whether to redact email addresses (default: false) */ redactEmails?: boolean; } /** * Redact sensitive data from content before saving to memory. * * @param content - Raw content to sanitize * @param config - Optional config object * @returns Sanitized content with sensitive data replaced */ export declare function filterSensitiveData(content: string, config?: MemoryFilterConfig): string; /** * Quick check if content likely contains sensitive data (for logging/audit). */ export declare function containsSensitiveData(content: string): boolean;