# `Jido.RuntimeStore`
[🔗](https://github.com/agentjido/jido/blob/v2.3.0/lib/jido/runtime_store.ex#L1)

Instance-scoped runtime key/value store for mutable Jido coordination state.

`RuntimeStore` is an internal control-plane store owned by each Jido instance.
It backs ephemeral runtime data that needs a stable home outside individual
agent processes, such as logical parent-child relationship bindings.

The ETS table itself is owned by the Jido instance supervisor, while the
`RuntimeStore` process provides the logical API. That lets the table survive
`RuntimeStore` process restarts without making it durable beyond the life of
the owning Jido instance.

Values are organized into named hives so unrelated runtime concerns can share
the same store without colliding:

    :ok = Jido.RuntimeStore.put(MyApp.Jido, :relationships, "child-1", %{parent_id: "p-1"})
    {:ok, binding} = Jido.RuntimeStore.fetch(MyApp.Jido, :relationships, "child-1")
    :ok = Jido.RuntimeStore.delete(MyApp.Jido, :relationships, "child-1")

The store is intentionally ephemeral. It is reset when the owning Jido
instance stops or restarts.

# `hive`

```elixir
@type hive() :: term()
```

# `key`

```elixir
@type key() :: term()
```

# `state`

```elixir
@type state() :: %{table: atom()}
```

# `value`

```elixir
@type value() :: term()
```

# `delete`

```elixir
@spec delete(atom(), hive(), key()) :: :ok | {:error, term()}
```

Deletes a value from the given hive.

# `fetch`

```elixir
@spec fetch(atom(), hive(), key()) :: {:ok, value()} | :error
```

Fetches a value from the given hive.

Returns `{:ok, value}` when present, or `:error` when the key or store is
unavailable.

# `get`

```elixir
@spec get(atom(), hive(), key(), value()) :: value()
```

Returns a value from the given hive, or `default` when no value exists.

# `list`

```elixir
@spec list(atom(), hive()) :: [{key(), value()}]
```

Lists all `{key, value}` entries in the given hive.

# `put`

```elixir
@spec put(atom(), hive(), key(), value()) :: :ok | {:error, term()}
```

Stores a value in the given hive.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts a RuntimeStore process.

