Vibe.Agent.Streaming.Trace (vibe v0.2.0)

Copy Markdown View Source

Opt-in NDJSON trace for assistant streaming order diagnostics.

Tracing is enabled only when VIBE_STREAM_TRACE_DIR or config :vibe, :stream_trace_dir is set. The trace stores raw stream text for debugging order bugs, so callers should enable it only for local diagnostics.

Summary

Functions

Reconstructs comparable stream texts from a trace directory.

Reads trace events from stream.ndjson in arrival order.

Appends one stream diagnostic event when tracing is enabled.

Functions

compare!(dir)

Reconstructs comparable stream texts from a trace directory.

:runtime_text is ordered by runtime sequence, while :runtime_arrival_text preserves file/arrival order for detecting inversions.

read!(dir)

Reads trace events from stream.ndjson in arrival order.

record(kind, attrs \\ %{})

Appends one stream diagnostic event when tracing is enabled.