Private Readonly _agentPrivate Readonly _createPrivate Readonly _nodesReadonly enabledReturns a new LDGraphTracker for this graph invocation.
Call this once per invocation. Each call produces a tracker with a fresh runId
that groups all events for that invocation.
Returns the children of the node identified by nodeKey.
The agent config key of the parent node.
Returns the underlying raw graph configuration from LaunchDarkly.
Returns the node with the given key, or null if not found.
The agent config key to look up.
Returns all nodes that have a direct edge to the node identified by nodeKey.
The agent config key of the child node.
Traverses the graph from terminal nodes up to the root.
Uses BFS upward via parent edges so that each node is processed only after
all of its reachable descendants have been processed. The root is always
visited last. Cyclic graphs are handled safely — each node is visited at
most once; if the graph has no terminal nodes, this method returns without
invoking fn.
Ordering note: Within a single BFS level (nodes at the same depth from a terminal) the visit order is not strictly guaranteed. The guarantee is only that a node is visited before any of its ancestors — not that siblings at the same depth are visited in a specific order relative to each other.
The value returned by fn is stored in the mutable executionContext under
the node's key.
Callback invoked for each node. Its return value is added to
executionContext keyed by the node's config key.
Optional initial context to seed the traversal.
Returns the root node of the graph.
Returns all terminal nodes (nodes with no outgoing edges).
Traverses the graph breadth-first from the root to all terminal nodes.
Nodes at the same depth are processed before advancing to the next depth.
The value returned by fn is stored in the mutable executionContext under
the node's key, making upstream results available to downstream nodes.
Cyclic graphs are handled safely — each node is visited at most once.
Callback invoked for each node. Its return value is added to
executionContext keyed by the node's config key.
Optional initial context to seed the traversal.
Static buildBuilds a node map from a raw agent graph flag value and a map of pre-fetched agent configs.
Raw graph flag value from LaunchDarkly.
Map of agent config key to resolved LDAIAgentConfig.
Record mapping agent config keys to AgentGraphNode instances.
Static collectCollects every unique node key referenced in the graph (root + all edge sources and targets).
Generated using TypeDoc
Encapsulates an agent graph configuration and its pre-built node collection.
Provides graph-level orchestration including relationship queries (parent/child), breadth-first traversal in both forward and reverse directions, and graph tracker creation.
Obtain an instance via LDAIClient.agentGraph. When the graph is disabled or invalid, the returned instance has enabled set to
falseand an empty node collection.