CouncilEx.Verbose (CouncilEx v0.1.0)

Copy Markdown View Source

Per-run verbose tracer. Subscribes to a single run's PubSub topic and prints a human-readable timeline to an IO device until the run reaches a terminal event (:run_completed or :run_failed).

Designed for ad-hoc debugging — opt in via CouncilEx.run(c, i, verbose: true) or CouncilEx.start(c, i, verbose: true). No telemetry attach, no global state, no production cost when disabled.

Modes

  • true (default) — timeline + per-member duration and token usage
  • :debug — adds the rendered system / user prompts and the response body (truncated to 800 chars per field). Useful for "why did the model say that?" debugging.

Output sink

Defaults to :stdio. Override via verbose_io: pid_or_device for capture in tests or redirection to a file.

Summary

Functions

Subscribe to run_id and print a timeline to io until terminal event. Returns the spawned (unlinked) task pid; the task exits normally on the terminal event or after timeout ms of silence. Unlinked so an IO sink closing prematurely does not propagate to the run caller.

Types

mode()

@type mode() :: true | :debug

Functions

attach(run_id, opts \\ [])

@spec attach(
  String.t(),
  keyword()
) :: pid()

Subscribe to run_id and print a timeline to io until terminal event. Returns the spawned (unlinked) task pid; the task exits normally on the terminal event or after timeout ms of silence. Unlinked so an IO sink closing prematurely does not propagate to the run caller.