BB.MCP.EventBuffer.Serializer (bb_mcp v0.3.3)

Copy Markdown View Source

Convert BB.MCP.EventBuffer entries into JSON-safe maps for tool replies.

Message payloads are rendered by BB.MCP.Json.encodable/1, which handles the tensors, binaries and other non-JSON values BB messages carry.

Summary

Functions

Serialise a buffer entry. now_ns is the reference monotonic time used to compute age_ms, so the agent can reason about how recent each event is.

Functions

serialise(entry, now_ns)

@spec serialise(BB.MCP.EventBuffer.entry(), integer()) :: map()

Serialise a buffer entry. now_ns is the reference monotonic time used to compute age_ms, so the agent can reason about how recent each event is.