AgentAuditLog class abstract
The append-only audit log.
append is synchronous: a tool call from an interpreted program may be
synchronous, and a trail that needed an await would either block that
call or be skipped by it. Persistence follows asynchronously, in append
order; flush waits for it.
Retention is by age: an entry older than retention is dropped from entries and from storage. There is no other way out of the log.
- Implementers
Constructors
- AgentAuditLog({Duration retention = defaultRetention, DateTime clock()?})
Properties
-
appended
→ Stream<
List< AgentAuditEntry> > -
Each appended batch, as it lands — what a viewer repaints from.
no setter
- clock → DateTime Function()
-
final
-
entries
→ List<
AgentAuditEntry> -
Every retained entry, oldest first.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- retention → Duration
-
How long an entry is kept.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
append(
Iterable< AgentAuditEntry> batch) → List<AgentAuditEntry> -
Appends
batchin order, numbering it after everything already in the log, and answers the entries as stored. -
applyRetention(
Duration value) → void - Adopts a new retention, dropping what it no longer covers — from entries at once and from storage as soon as earlier writes have landed. Settings are often read after the log is open, so this is how a configured value arrives.
-
dispose(
) → Future< void> -
flush(
) → Future< void> - Waits until every appended batch has been handed to storage.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
persist(
List< AgentAuditEntry> batch) → void -
Stores
batch. Called once per append, in order. -
pruneStorage(
) → void - Deletes from storage what retention no longer covers.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultRetention → const Duration