Interesting question, the answer is not that easy but for sure they appeared quite early, as can be seen from the following example from Sasano's book on early fittings
It seems they're around since koshigatana were in fashion, you'll probably won't find tsuba with kogai and kozuka ana before Nanbokucho period though as the use of uchigatana instead of koshigatana became popular in that period.
Here you can see an example of koshigatana koshirae with details of kozuka and kogai from Nanbokucho period
https://bunka.nii.ac.jp/heritages/detail/553930