instead of making users code the diagram using the implemented DSL, it may be better to just let them use plain text:
// direct links are the same
a -> b
// # full mediator #
c mediates a -> b
// removes a->b and compiles to :
a -> c -> b
// # partial mediation
C partially mediates A -> B
// compiles to:
A->B A->C B->C
// #moderator #
b moderates a -> c
// compiles to:
A->C B->[A-C link]
instead of making users code the diagram using the implemented DSL, it may be better to just let them use plain text: