# `Squidie.Workflow.ActionRegistry`
[🔗](https://github.com/dark-trench/squidie/blob/main/lib/squidie/workflow/action_registry.ex#L2)

Host-owned trust boundary for runtime-authored workflow actions.

Runtime-authored specs should reference stable action keys rather than raw
module atoms. The host application owns the registry and maps those keys to
approved `Squidie.Step` or explicit `Jido.Action` modules before a spec can
be activated.

# `action_key`

```elixir
@type action_key() :: atom() | String.t()
```

# `action_validation_error`

```elixir
@type action_validation_error() ::
  :missing_action_key
  | :invalid_action_key
  | :unknown_action_key
  | :disabled_action_key
  | :incompatible_action_module
```

# `catalog_entry`

```elixir
@type catalog_entry() :: %{
  key: action_key(),
  display_name: String.t(),
  category: String.t() | nil,
  description: String.t(),
  enabled?: boolean(),
  input_contract: term(),
  output_contract: term(),
  credential_requirements: term()
}
```

# `catalog_error`

```elixir
@type catalog_error() :: %{
  path: [atom() | action_key()],
  code: atom(),
  message: String.t(),
  details: map()
}
```

# `registry`

```elixir
@type registry() ::
  %{optional(action_key()) =&gt; registry_entry()} | keyword(registry_entry())
```

# `registry_entry`

```elixir
@type registry_entry() ::
  module()
  | keyword()
  | %{optional(:module) =&gt; module(), optional(:enabled?) =&gt; boolean()}
  | %{optional(String.t()) =&gt; term()}
```

# `validation_error`

```elixir
@type validation_error() :: Squidie.Workflow.Spec.validation_error()
```

# `catalog`

```elixir
@spec catalog(term()) ::
  {:ok, [catalog_entry()]}
  | {:error, {:invalid_action_catalog, [catalog_error()]}}
```

Projects a host-owned action registry into editor-safe catalog metadata.

The catalog intentionally omits executable modules and credential values. It
exposes stable action keys, display metadata, contracts, and credential
requirements so editor clients can build palettes while `validate_action/2`
and `resolve_action/2` remain the execution trust boundary.

# `resolve_spec`

```elixir
@spec resolve_spec(Squidie.Workflow.Spec.t() | map() | term(), registry()) ::
  {:ok, Squidie.Workflow.Spec.t() | map()}
  | {:error, {:invalid_workflow_spec, [validation_error()]}}
```

Resolves `:action` step keys in a workflow spec to approved executable modules.

The resolved spec preserves the stable action key in both `:action` and step
`:metadata` so later planner and inspection surfaces can expose identity
without trusting user-provided module values.

# `validate_spec`

```elixir
@spec validate_spec(Squidie.Workflow.Spec.t() | map() | term(), registry()) ::
  :ok | {:error, {:invalid_workflow_spec, [validation_error()]}}
```

Resolves action keys and validates the resulting executable spec shape.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
