#[non_exhaustive]pub enum GraphDiff {
AddNode {
node: TaskNode,
},
RemoveNode {
id: NodeId,
},
SplitNode {
id: NodeId,
into: Vec<TaskNode>,
},
RerouteEdge {
node_id: NodeId,
old_dep: NodeId,
new_dep: NodeId,
},
SetRole {
id: NodeId,
role: Option<RoleId>,
},
SetTools {
id: NodeId,
tool_allowlist: Vec<String>,
},
WrapInTeam {
ids: Vec<NodeId>,
team_id: NodeId,
team_goal: String,
},
}Expand description
A single mutation to apply to a TaskGraph at runtime.
Produced by the steering LLM (gglib_agent::council::steering) and
applied via TaskGraph::apply_diff. Each variant mutates the graph and
then triggers re-validation to ensure the graph stays well-formed.
The #[non_exhaustive] attribute allows new variants to be added in future
minor versions without breaking match arms in external crates.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AddNode
Add a new node.
The node’s depends_on carries all its incoming edges.
RemoveNode
Remove a node and strip all edges that pointed to it.
Any node whose depends_on contains id will have that entry removed.
SplitNode
Replace one node with multiple nodes.
The original is removed; each entry in into is inserted. Any node
that depended on the original will be updated to depend on all
replacements.
Fields
RerouteEdge
Redirect one dependency edge.
In node_id’s depends_on list, replaces old_dep with new_dep.
Fields
SetRole
Set or clear a node’s specialist role.
SetTools
Replace a node’s entire tool allowlist.
Fields
WrapInTeam
Wrap a set of nodes into a new TaskNodeKind::Team node.
The wrapped nodes become the team’s subgraph. The team_id node
inherits all external in-edges (from nodes NOT in ids) and any
node outside ids that depended on a wrapped node will be updated
to depend on team_id instead.