The workload descriptor — the public contract a workflow step presents to a routing oracle. Pure validation: no persistence, no process state.
quality_bar is reserved for eval-scored routing; a non-nil value is
REJECTED (not ignored) until scorecards exist.
agent is optional correlation identity for the caller: a content digest
plus an optional display name/version, carried through as plain data (e.g.
into decision records) without the descriptor needing to know what an
"agent" is beyond that shape.
max_outcome_iterations is a budget hint for outcome-evaluated sessions —
an outcome session may revise its answer up to that many times before
settling, so budget-scaling layers can widen ceilings for it the same way
they do for fan-out hints.
Summary
Functions
Validate and build a t() from a plain map. Accepts atom or string keys.
Rejects a non-nil quality_bar and any unknown capability/runtime-preference
value rather than silently dropping it.
Types
@type capability() :: :tools | :vision | :long_context
@type runtime_preference() :: :any | :managed | :local
@type t() :: %Mimir.Descriptor{ agent: agent_identity() | nil, budget_ceiling_microdollars: pos_integer(), capabilities: [capability()], expected_tokens: %{in: non_neg_integer(), out: non_neg_integer()} | nil, latency_tolerance_ms: pos_integer(), max_outcome_iterations: pos_integer() | nil, quality_bar: nil, runtime_preference: runtime_preference(), task_class: String.t() }
Functions
@spec parse(map()) :: {:ok, t()} | {:error, {:invalid_descriptor, atom(), String.t()}} | {:error, :quality_bar_unsupported}
Validate and build a t() from a plain map. Accepts atom or string keys.
Rejects a non-nil quality_bar and any unknown capability/runtime-preference
value rather than silently dropping it.