Backplane.AgentRuntime.Outbox (backplane_agent_runtime v1.6.0)

Copy Markdown

Sender-intent outbox with idempotency and bounded replay.

The same submission ID with the same payload returns the existing receipt. A changed payload conflicts. Replay never evicts live idempotency state.

Summary

Types

t()

@type t() :: map()

Functions

new(limit)

@spec new(non_neg_integer()) ::
  {:ok, t()} | {:error, Backplane.AgentRuntime.Error.t()}

replay(outbox, cursor)

@spec replay(t(), non_neg_integer()) ::
  {:ok, list()} | {:error, Backplane.AgentRuntime.Error.t()}

submit(outbox, submission_id, payload)

@spec submit(t(), String.t(), map()) ::
  {:ok, t(), %{status: :submitted | :duplicate}}
  | {:error, Backplane.AgentRuntime.Error.t()}