Files
moloapp/src/cli/ai/redactor.hpp
T
retoor 3c4334cec9 feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security,
data, app, realtime, supervisor, clients, CLI, example plus
enterprise tenancy, audit, operability, governance,
supplychain. Postgres via docker compose for tests.
2026-10-23 18:20:04 +02:00

23 lines
524 B
C++

#pragma once
#include <string>
namespace molo::ai {
// Redacts secrets before prompt construction. Keys matching *_KEY,
// *_SECRET, *_TOKEN (case-insensitive) and .env.json-style assignments
// are masked. Redaction failures abort the request (caller checks ok()).
class Redactor {
public:
struct Result {
std::string text;
unsigned long redacted = 0;
bool ok = true;
};
static Result redact(const std::string& text);
static bool key_is_secret(const std::string& key);
};
} // namespace molo::ai