Package com.tnsai.server.audit
Class AuditService
java.lang.Object
com.tnsai.server.audit.AuditService
Thread-safe audit trail for tool call decisions within a session.
Keeps at most 500 entries, dropping the oldest on overflow.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordImmutable audit entry for a tool call decision. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all entries.Returns all entries in chronological order.getEntries(int limit) Returns the most recentlimitentries in chronological order.voidrecord(AuditService.AuditEntry entry) Record an audit entry.intsize()Returns the current number of entries.
-
Constructor Details
-
AuditService
public AuditService()
-
-
Method Details
-
record
Record an audit entry. If the trail exceeds 500, the oldest entry is dropped. -
getEntries
Returns all entries in chronological order. -
getEntries
Returns the most recentlimitentries in chronological order. -
clear
public void clear()Removes all entries. -
size
public int size()Returns the current number of entries.
-