angzarr_client.router.responses

Response types returned by saga / process-manager / rejection handlers.

Simple containers used by user code as the return value of @handles methods on sagas (SagaHandlerResponse), process managers (ProcessManagerResponse), and @rejected handlers (RejectionHandlerResponse). Kept separate from the dispatch / runtime modules so application code can import them without pulling in the dispatch machinery.

Mirrors the Rust router::responses module so cross-language users can reach the same types at the same logical path.

Classes

SagaHandlerResponse

Return value of a saga @handles method.

ProcessManagerResponse

Return value of a process-manager @handles method.

RejectionHandlerResponse

Return shape of a saga @rejected handler method.

Module Contents

class angzarr_client.router.responses.SagaHandlerResponse(commands: list[angzarr_client.proto.angzarr.types_pb2.CommandBook] | None = None, events: list[angzarr_client.proto.angzarr.types_pb2.EventBook] | None = None)

Return value of a saga @handles method.

Carries commands to forward to target domains and/or facts (events) to inject into other aggregates. Both are optional.

commands = []
events = []
class angzarr_client.router.responses.ProcessManagerResponse(commands: list[angzarr_client.proto.angzarr.types_pb2.CommandBook] | None = None, process_events: list[angzarr_client.proto.angzarr.types_pb2.EventBook] | None = None, facts: list[angzarr_client.proto.angzarr.types_pb2.EventBook] | None = None)

Return value of a process-manager @handles method.

  • commands: commands forwarded to target domains

  • process_events: list of EventBooks recorded into the PM’s own event stream (state). Multiple books concatenate into the wire’s single ProcessManagerHandleResponse.process_events (first non-empty book’s cover wins).

  • facts: facts injected into other aggregates without a command

Audit finding #56 (Option B — list[EventBook]): aligns with Rust’s Vec<EventBook> and matches the existing commands / facts list shapes for symmetry.

commands = []
process_events = []
facts = []
class angzarr_client.router.responses.RejectionHandlerResponse

Return shape of a saga @rejected handler method.

Carries compensation events to persist locally and an optional Notification to forward upstream. Mirrors Rust’s router::responses::RejectionHandlerResponse field-for-field.

Audit finding #56 (Option B — list[EventBook]): aligns with Rust’s Vec<EventBook>. Multiple books concatenate downstream; first non-empty book’s cover wins.

events: list[angzarr_client.proto.angzarr.types_pb2.EventBook] = []

Events to persist to own state (compensation).

notification: angzarr_client.proto.angzarr.types_pb2.Notification | None = None

Notification to forward upstream (rejection propagation).