Markov cosurfaces and gauge fields