Spectre.Stack.Effects (Spectre v0.4.0)

Copy Markdown View Source

Versioned, immutable effect registrations returned by Stack packages.

This additive contract is separate from tool helper descriptors. It declares an execution adapter for a closed operation; registration grants no authority. Version 1 tool descriptors and manual GAM bindings remain supported.

Summary

Functions

Validates effect registration data without loading or invoking adapters.

Types

descriptor()

@type descriptor() :: %{
  contract: 1,
  adapter: module(),
  operation: atom() | binary(),
  side_effect: :none | :idempotent | :reconcilable | :non_idempotent,
  material: :arguments,
  partition: [atom()],
  schema_hash: binary() | nil,
  config: map()
}

t()

@type t() :: %{optional(atom() | binary() | tuple()) => descriptor()}

Functions

validate!(effects)

@spec validate!(term()) :: t()

Validates effect registration data without loading or invoking adapters.