Synapse.Orchestrator.Runtime.RunningAgent (Synapse v0.1.1)
View SourceRuntime record representing a running agent process managed by the orchestrator.
The struct is intentionally lightweight but provides enough metadata for the reconciler to detect crashes, restart processes, and surface observability details.
Summary
Functions
Builds a %RunningAgent{} struct from a keyword list or map, validating
required runtime fields.
Returns the NimbleOptions schema for runtime agent records.
Types
@type t() :: %Synapse.Orchestrator.Runtime.RunningAgent{ agent_id: Synapse.Orchestrator.AgentConfig.agent_id(), config: Synapse.Orchestrator.AgentConfig.t(), last_error: term() | nil, metadata: map(), monitor_ref: reference(), pid: pid(), spawn_count: pos_integer(), spawned_at: DateTime.t() }
Normalised runtime state for an individual agent process.
Functions
@spec new(map() | keyword()) :: {:ok, t()} | {:error, NimbleOptions.ValidationError.t()}
Builds a %RunningAgent{} struct from a keyword list or map, validating
required runtime fields.
@spec schema() :: NimbleOptions.schema()
Returns the NimbleOptions schema for runtime agent records.