Jido.AgentServer.ParentRef
(Jido v2.2.0)
View Source
Reference to a logical parent agent in Jido hierarchy tracking.
ParentRef models Jido's logical parent-child relationship, which is layered
on top of OTP supervision. Parent and child agents are still OTP peers under
a supervisor; the parent relationship is represented explicitly with this
struct, child-start signals, and process monitors.
While a child is attached, the runtime injects this value into
agent.state.__parent__ so child actions can use Directive.emit_to_parent/3.
If the child becomes orphaned, the current parent ref is cleared and the former
parent is moved to agent.state.__orphaned_from__.
Summary
Functions
Creates a new ParentRef from a map of attributes.
Creates a new ParentRef from a map, raising on error.
Validates that a value is a valid ParentRef.
Types
Functions
Creates a new ParentRef from a map of attributes.
Returns {:ok, parent_ref} or {:error, reason}.
Creates a new ParentRef from a map, raising on error.
Validates that a value is a valid ParentRef.