Structured error used by the shared AgentBook helpers.
@type kind() :: :invalid_argument | :unsupported | :io | :internal
@type t() :: %AgentWorld.Error{ __exception__: true, details: map(), kind: kind(), message: String.t() }
@spec internal(String.t(), map()) :: t()
@spec invalid_argument(String.t(), map()) :: t()
@spec io(String.t(), map()) :: t()
@spec new(term()) :: t()
@spec unsupported(String.t(), map()) :: t()