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.
23 lines
524 B
C++
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
|