RoomAuditSink
class RoomAuditSink(context: Context, retention: Duration = Duration.ofDays(7), scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.IO)) : AuditSink
Room-backed AuditSink persisting every HTTP tools/call to a private on-device database.
Wire it into the server with DroidMcp.Builder.withAuditSink(...). Writes are fire-and-forget on a background scope, so record returns immediately and a DB hiccup can never fail a tool call. Each write also prunes rows older than retention.
Privacy note: the persisted ToolCallAudit.argumentsJson contains whatever the LLM passed — message text, contact names, file paths, coordinates. The database lives in the host app's private storage; the host owns its retention, export, and deletion. Set retention to Duration.ZERO to keep rows indefinitely (pruning is then skipped).