Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
audit_entry.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
13#pragma once
14
15#include <nlohmann/json_fwd.hpp>
16
17#include <string>
18
19namespace entropic {
20
30struct AuditEntry {
31 std::string caller_id;
32 std::string tool_name;
33 std::string params_json;
34 std::string result_status;
35 std::string result_content;
36 double elapsed_ms = 0.0;
37 std::string directives_json;
39 int iteration = 0;
41};
42
54nlohmann::json audit_entry_to_json(const AuditEntry& entry);
55
68bool audit_entry_from_json(const nlohmann::json& j, AuditEntry& entry);
69
70} // namespace entropic
Activate model on GPU (WARM → ACTIVE).
bool audit_entry_from_json(const nlohmann::json &j, AuditEntry &entry)
Deserialize AuditEntry fields from a JSON object.
nlohmann::json audit_entry_to_json(const AuditEntry &entry)
Serialize AuditEntry fields to a JSON object.
A single audit log entry for one MCP tool call.
Definition audit_entry.h:30
int delegation_depth
Current delegation depth (0 = lead)
Definition audit_entry.h:38
std::string result_content
Tool result text (full, never truncated)
Definition audit_entry.h:35
double elapsed_ms
Tool execution duration in milliseconds.
Definition audit_entry.h:36
std::string parent_conversation_id
Parent conversation ID (empty for lead)
Definition audit_entry.h:40
int iteration
Engine loop iteration number.
Definition audit_entry.h:39
std::string params_json
Tool parameters as JSON string (never truncated)
Definition audit_entry.h:33
std::string tool_name
Fully-qualified tool name (e.g., "filesystem.write_file")
Definition audit_entry.h:32
std::string result_status
"success", "error", or "timeout"
Definition audit_entry.h:34
std::string caller_id
Identity/tier name (e.g., "eng", "qa", "lead")
Definition audit_entry.h:31
std::string directives_json
Directives array as JSON string ("[]" if none)
Definition audit_entry.h:37