# `Jidoka.Operation.Source.Local`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/operation/source/local.ex#L1)

Local operation source backed by Elixir functions.

This source is primarily for deterministic tests, examples, and lightweight
in-process operations. It is deliberately normalized through the same
operation contract as Jido actions.

# `handler`

```elixir
@type handler() :: Jidoka.Runtime.LocalOperations.handler()
```

# `operation_def`

```elixir
@type operation_def() :: %{
  name: String.t(),
  handler: handler(),
  description: String.t() | nil,
  idempotency: Jidoka.Agent.Spec.Operation.idempotency(),
  kind: atom(),
  metadata: map()
}
```

# `t`

```elixir
@type t() :: %Jidoka.Operation.Source.Local{operations: [operation_def()]}
```

# `new`

```elixir
@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}
```

Builds a local operation source from handler definitions.

# `new!`

```elixir
@spec new!(keyword() | map()) :: t()
```

Builds a local operation source and raises if the definitions are invalid.

---

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