Cyclium.LogProjector (Cyclium v0.2.0)

Copy Markdown View Source

Materializes human-readable logs from episode steps.

Verbosity levels:

  • :none — skip entirely
  • :summary_only — one-line summary at completion
  • :timeline — step-by-step rendered log (default)
  • :full_debug — timeline with raw args/results

The level is the expectation's render_log_strategy when set, otherwise it falls back to the episode's log_strategy. This lets the rendered log's verbosity be controlled independently of what step data is journaled — e.g. journal full step data for a chat UI but render only a summary (or the reverse). log_strategy still drives journaling (EpisodeRunner); this only governs rendering.

Called from EpisodeRunner.post_converge/2 and available on-demand via project/1.

Summary

Functions

Project (or update) the log for an episode. Reads steps since last_step_no_rendered and appends to the log.

Pure rendering function. Transforms a list of episode steps into a human-readable string based on the given strategy.

Functions

project(episode_id)

Project (or update) the log for an episode. Reads steps since last_step_no_rendered and appends to the log.

Returns {:ok, log} or :skip if log_strategy is :none.

render_steps(steps, strategy, episode \\ nil)

Pure rendering function. Transforms a list of episode steps into a human-readable string based on the given strategy.