# `Planck.Headless.ResourceStore`
[🔗](https://github.com/alexdesousa/planck/blob/v0.1.0/lib/planck/headless/resource_store.ex#L1)

GenServer started at application boot that holds the loaded resources —
the single source of truth for skills, teams, and available models.

Resources are loaded once at startup from the directories configured in
`Planck.Headless.Config`. New sessions pick up whatever is in the store
at the time they start; in-flight sessions are not affected by reloads.

## Reload

    Planck.Headless.ResourceStore.reload()

Triggers a synchronous reload of tools, skills, and teams from disk.
Available models are also re-resolved.

# `t`

```elixir
@type t() :: %Planck.Headless.ResourceStore{
  available_models: [Planck.AI.Model.t()],
  skills: [Planck.Agent.Skill.t()],
  teams: %{required(String.t()) =&gt; Planck.Agent.Team.t()},
  tools: [Planck.Agent.Tool.t()]
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `clear_tools`

```elixir
@spec clear_tools() :: :ok
```

Clear all sidecar tools. Called by SidecarManager on nodedown.

# `get`

```elixir
@spec get() :: t()
```

Return the full resource store state.

# `put_tools`

```elixir
@spec put_tools([Planck.Agent.Tool.t()]) :: :ok
```

Replace the sidecar tool list. Called by SidecarManager on nodeup.

# `reload`

```elixir
@spec reload() :: :ok
```

Reload tools, skills, and teams from disk.

In-flight sessions keep their original resources. Only new sessions
created after this call will see the updated resources.

# `start_link`

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

Start the ResourceStore under its supervisor.

---

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