Pixir.Delegate.Progress (pixir v0.1.5)

Copy Markdown View Source

Shared progress-frame contract for Delegate attach observation.

pixir delegate attach --progress=stderr-jsonl has two producers: the ordinary snapshot path and the daemon-backed follow path. This module keeps their JSONL frame shape aligned so orchestrators can consume one stable contract while Pixir preserves the Log as the source of truth.

Summary

Functions

Attach progress metadata to the final Delegate payload.

Build a recoverable progress error frame.

Build a Delegate progress, terminal, or heartbeat frame from a payload.

Whether a source comes from a live owner.

Source vocabulary for a payload observation.

Whether a payload is terminal for attach observation.

Functions

annotate(payload, progress)

@spec annotate(map(), map()) :: map()

Attach progress metadata to the final Delegate payload.

error_frame(error, sequence, handle, opts \\ [])

@spec error_frame(map(), pos_integer(), map(), keyword()) :: map()

Build a recoverable progress error frame.

frame(payload, sequence, opts \\ [])

@spec frame(map(), pos_integer(), keyword()) :: map()

Build a Delegate progress, terminal, or heartbeat frame from a payload.

owner_backed_source?(source)

@spec owner_backed_source?(String.t() | nil) :: boolean()

Whether a source comes from a live owner.

source(payload, opts \\ [])

@spec source(
  map(),
  keyword()
) :: String.t()

Source vocabulary for a payload observation.

terminal?(arg1)

@spec terminal?(map()) :: boolean()

Whether a payload is terminal for attach observation.