interface ConditionalEdgeRouterTypesType bag for ConditionalEdgeRouter that accepts schema types. Unlike GraphNodeTypes, conditional edges don't have separate input/output - they just read state and return routing decisions.
Schema for runtime context (uses ExtractStateType)
Schema for router state (uses ExtractStateType)
Union of valid node names that can be routed to
const router: ConditionalEdgeRouter<{
Schema: typeof StateSchema;
ContextSchema: typeof ContextSchema;
Nodes: "agent" | "tool";
}> = (state, config) => {
return state.done ? END : "agent";
};