cadrumo.adapters.outbound.aeat.operator_progress module

Lightweight operator-progress channel shared by AEAT operations and frontends.

Keeping this ContextVar outside the concrete auth implementations lets CLI metadata and local configuration commands start without browser-auth settings. The CLI installs a stderr sink for headless operation; a full-screen frontend may replace it within its worker context so progress stays inside the TUI.

operator_progress_sink(sink)[source]

Route operator progress to sink within this context.

Return type:

Generator[None]

Parameters:

sink (Callable[[OperatorProgress], None])

emit_operator_progress(progress)[source]

Send an already-redacted operator progress update when a sink is armed.

Return type:

None

Parameters:

progress (OperatorProgress)