Effective, portable authority granted to one canonical Definition.
Requests and grants are deliberately separate. compose/2 intersects every
requested capability with a host-owned ceiling; a request can therefore
never create authority by itself. The resulting envelope contains grants
only and is safe to seal into a Spectre.Definition.Manifest.
Summary
Functions
Returns whether value is effectively granted in field.
Intersects requested authority with the host-owned authority ceiling.
Intersects authority or raises with its stable validation reason.
Returns the canonical SHA-256 digest of the effective grants.
Returns an envelope with no grants and no limits.
Restores an envelope from decoded canonical data.
Builds and validates an effective authority envelope.
Builds an envelope or raises with its stable validation reason.
Returns the Authority Envelope schema version.
Returns the portable data sealed into a Definition Manifest.
Types
@type t() :: %Spectre.Authority.Envelope{ actions: [term()], consents: [term()], effects: [term()], event_classes: [term()], external_data_refs: [term()], limits: %{optional(atom()) => term()}, model_profiles: [term()], model_purposes: [term()], open_capabilities: [term()], operations: [term()], prompt_budget_classes: [term()], prompt_phases: [term()], schema_version: pos_integer(), secret_refs: [term()], state_reads: [term()], state_writes: [term()] }
Functions
Returns whether value is effectively granted in field.
Intersects requested authority with the host-owned authority ceiling.
Capability lists use canonical value identity. Numeric limits are reduced to the stricter value; non-numeric limits, such as risk classes, are taken from the ceiling and only appear when both sides declared the limit.
Intersects authority or raises with its stable validation reason.
Returns the canonical SHA-256 digest of the effective grants.
@spec empty() :: t()
Returns an envelope with no grants and no limits.
Restores an envelope from decoded canonical data.
Builds and validates an effective authority envelope.
Builds an envelope or raises with its stable validation reason.
@spec schema_version() :: pos_integer()
Returns the Authority Envelope schema version.
Returns the portable data sealed into a Definition Manifest.