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.
Summary
Functions
Returns a specification to start this module under a supervisor.
Clear all sidecar tools. Called by SidecarManager on nodedown.
Return the full resource store state.
Replace the sidecar tool list. Called by SidecarManager on nodeup.
Reload tools, skills, and teams from disk.
Start the ResourceStore under its supervisor.
Types
@type t() :: %Planck.Headless.ResourceStore{ available_models: [Planck.AI.Model.t()], skills: [Planck.Agent.Skill.t()], teams: %{required(String.t()) => Planck.Agent.Team.t()}, tools: [Planck.Agent.Tool.t()] }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec clear_tools() :: :ok
Clear all sidecar tools. Called by SidecarManager on nodedown.
@spec get() :: t()
Return the full resource store state.
@spec put_tools([Planck.Agent.Tool.t()]) :: :ok
Replace the sidecar tool list. Called by SidecarManager on nodeup.
@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.
@spec start_link(keyword()) :: GenServer.on_start()
Start the ResourceStore under its supervisor.