RoomAuditSink
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. Rows older than retention are pruned after a write, at most once per minute.
Writes run in a child job of scope, so close cancels only this sink's own pending writes — never a host-supplied scope such as lifecycleScope. Call flush first to wait for in-flight writes.
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).