I'd like to place a node at some position along a path, e.g.
\tikz (a)node[pos=0.5,left]{x}{b};
But instead of shifting it 'left', 'right', 'above' or 'below' in absolute coordinates, I would like to have it left or right of the path relative to the direction of the path. E.g. if the path goes horizontally from the right to the left side of the canvas, 'right' should place it above the line. The node should not be rotated, and it should work not only for straight lines but for curved paths also.
What is the easiest solution for this in Tikz?
auto
option I below.