Package com.tnsai.agents.hierarchy
Class AgentHierarchyMapper
java.lang.Object
com.tnsai.agents.hierarchy.AgentHierarchyMapper
Maps an Agent hierarchy tree to a flat list of node maps
suitable for
AgentHierarchyEvent.
This class decouples the event representation from the Agent class, keeping the events package free of agent dependencies.
-
Method Summary
-
Method Details
-
toNodeList
Converts an Agent hierarchy starting from the given root into a flat list of node maps.Each node map contains:
id- Agent IDname- Agent namerole- First role name or "No Role"status- Agent health state namechildren- List of child agent IDs
- Parameters:
rootAgent- the root agent of the hierarchy- Returns:
- flat list of agent node maps
-