A bounded, portable sequence of declared semantic contract operations.
Scenario documents contain data, never callbacks, module names, commands, or ambient authority. A live contract must be resolved from an explicit module allowlist before execution.
Summary
Functions
Resolves the pinned contract from an explicit bounded module allowlist.
Builds a canonical scenario from an ordered, nonempty subset of existing step IDs.
Types
Functions
@spec canonical_binary(term()) :: {:ok, binary()} | {:error, Insider.Protocol.Error.t()}
@spec decode(binary()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec decode_map(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec descriptor(term()) :: {:ok, map()} | {:error, Insider.Protocol.Error.t()}
@spec new(map(), keyword()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec resolve(term(), term(), atom()) :: {:ok, module()} | {:error, Insider.Protocol.Error.t()}
Resolves the pinned contract from an explicit bounded module allowlist.
@spec retain_steps(term(), term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
Builds a canonical scenario from an ordered, nonempty subset of existing step IDs.
@spec validate(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}