Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic_audit.cpp File Reference

C API facade for audit log operations. More...

#include "engine_handle.h"
#include <entropic/entropic.h>
#include <entropic/mcp/utf8_sanitize.h>
#include <entropic/types/logging.h>
#include "json_serializers.h"
#include <fstream>
#include <string>
Include dependency graph for entropic_audit.cpp:

Go to the source code of this file.

Functions

ENTROPIC_EXPORT entropic_error_t entropic_audit_flush (entropic_handle_t handle)
 Flush the audit logger to disk.
 
ENTROPIC_EXPORT entropic_error_t entropic_audit_count (entropic_handle_t handle, size_t *count)
 Get the number of audit log entries this session.
 
ENTROPIC_EXPORT entropic_error_t entropic_audit_read (entropic_handle_t handle, const char *path, const char *, char **result_json)
 Read audit log entries from a JSONL file.
 

Variables

static auto logger = entropic::log::get("facade.audit")
 

Detailed Description

C API facade for audit log operations.

Stubs for v1.9.5. Real implementations require engine wiring (Phase 8, deferred). Validates inputs and returns appropriate errors until the facade has a live AuditLogger.

Version
2.0.0

Definition in file entropic_audit.cpp.

Function Documentation

◆ entropic_audit_count()

ENTROPIC_EXPORT entropic_error_t entropic_audit_count ( entropic_handle_t  handle,
size_t *  count 
)

Get the number of audit log entries this session.

Get the number of audit log entries recorded this session.

Returns
ENTROPIC_OK on success.

Definition at line 47 of file entropic_audit.cpp.

◆ entropic_audit_flush()

ENTROPIC_EXPORT entropic_error_t entropic_audit_flush ( entropic_handle_t  handle)

Flush the audit logger to disk.

Flush the audit logger to disk immediately.

Returns
ENTROPIC_OK on success.

Definition at line 32 of file entropic_audit.cpp.

◆ entropic_audit_read()

ENTROPIC_EXPORT entropic_error_t entropic_audit_read ( entropic_handle_t  handle,
const char *  path,
const char *  filter_json,
char **  result_json 
)

Read audit log entries from a JSONL file.

Parameters
pathFilesystem path to the JSONL audit log file.
result_jsonOut-param: newly allocated JSON string (caller owns; free with entropic_free).
Returns
ENTROPIC_OK on success.

Definition at line 67 of file entropic_audit.cpp.

Variable Documentation

◆ logger

auto logger = entropic::log::get("facade.audit")
static

Definition at line 22 of file entropic_audit.cpp.