Raxol.Agent.Contract.Event (Raxol Journal v2.8.0)

Copy Markdown View Source

The contract envelope. One struct per observable step; id is a per-run monotonic sequence (the future journal offset).

Summary

Types

Who emitted the event; absent (nil) folds as %{kind: :system} by rule.

Provenance — grow-only; later keys (e.g. :model_family) are additive.

t()

Types

actor()

@type actor() :: %{kind: :human | :agent | :system, id: String.t()} | nil

Who emitted the event; absent (nil) folds as %{kind: :system} by rule.

provenance()

@type provenance() :: %{source: atom(), trust: :trusted | :tainted}

Provenance — grow-only; later keys (e.g. :model_family) are additive.

t()

@type t() :: %Raxol.Agent.Contract.Event{
  actor: actor(),
  branch_id: String.t(),
  family: :loop | :meta,
  id: non_neg_integer(),
  payload: map(),
  provenance: provenance(),
  scope: :session | :global | atom(),
  session_id: String.t(),
  tier: :ephemeral | :durable,
  ts: integer(),
  turn_id: String.t() | nil,
  type: atom(),
  v: non_neg_integer()
}