Synapse.Orchestrator.Runtime (Synapse v0.1.1)
View SourceGenServer responsible for keeping declaratively defined agents running.
The runtime watches a configuration source (file or module), validates each
entry into a %Synapse.Orchestrator.AgentConfig{} struct, and reconciles that
desired topology against currently running processes. Missing agents are
spawned through Synapse.Orchestrator.AgentFactory, stale ones are retired,
and crashed processes are respawned on the next reconciliation pass.
Summary
Functions
Dynamically adds an agent to the runtime.
Returns the status information for a specific agent.
Returns a specification to start this module under a supervisor.
Returns the configuration for a specific agent.
Gets skill metadata by ID (without loading the body).
Returns overall health information about the orchestrator.
Returns information about currently running agents.
Lists all available skills (metadata only).
Loads the full skill body for a given skill ID.
Triggers an immediate reconciliation cycle.
Removes an agent from the runtime.
Returns a metadata summary of discovered skills.
Types
Functions
Dynamically adds an agent to the runtime.
@spec agent_status(pid(), atom()) :: {:ok, %{ pid: pid(), alive?: boolean(), config: Synapse.Orchestrator.AgentConfig.t(), running_agent: Synapse.Orchestrator.Runtime.RunningAgent.t() }} | {:error, :not_found}
Returns the status information for a specific agent.
@spec child_spec([option()]) :: Supervisor.child_spec()
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get_agent_config(pid(), atom()) :: {:ok, Synapse.Orchestrator.AgentConfig.t()} | {:error, :not_found}
Returns the configuration for a specific agent.
@spec get_skill(pid(), String.t()) :: {:ok, Synapse.Orchestrator.Skill.t()} | {:error, :not_found | :no_registry}
Gets skill metadata by ID (without loading the body).
@spec health_check(pid()) :: %{ total: non_neg_integer(), running: non_neg_integer(), failed: non_neg_integer(), reconcile_count: non_neg_integer(), last_reconcile: DateTime.t() | nil }
Returns overall health information about the orchestrator.
@spec list_agents(pid()) :: [Synapse.Orchestrator.Runtime.RunningAgent.t()]
Returns information about currently running agents.
@spec list_skills(pid()) :: [Synapse.Orchestrator.Skill.t()] | {:error, :no_registry}
Lists all available skills (metadata only).
@spec load_skill_body(pid(), String.t()) :: {:ok, Synapse.Orchestrator.Skill.t()} | {:error, term()}
Loads the full skill body for a given skill ID.
@spec reload(pid()) :: :ok
Triggers an immediate reconciliation cycle.
Removes an agent from the runtime.
Returns a metadata summary of discovered skills.
@spec start_link([option()]) :: GenServer.on_start()