Class AuditService

java.lang.Object
com.tnsai.server.audit.AuditService

public final class AuditService extends Object
Thread-safe audit trail for tool call decisions within a session. Keeps at most 500 entries, dropping the oldest on overflow.
  • Constructor Details

    • AuditService

      public AuditService()
  • Method Details

    • record

      public void record(AuditService.AuditEntry entry)
      Record an audit entry. If the trail exceeds 500, the oldest entry is dropped.
    • getEntries

      public List<AuditService.AuditEntry> getEntries()
      Returns all entries in chronological order.
    • getEntries

      public List<AuditService.AuditEntry> getEntries(int limit)
      Returns the most recent limit entries in chronological order.
    • clear

      public void clear()
      Removes all entries.
    • size

      public int size()
      Returns the current number of entries.