Theory of Mind/Metacognition/Sense of Agency is well defined in the literature based on decades of research:
https://aeon.co/essays/is-there-a-symmetry-between-metacogni...
For the latest in consciousness research - look at: https://arxiv.org/abs/2109.12798 Here (p14) they make artificial consciousness testable by making mental models of action, and the conscious 'thought' is the difference between what the action that was expected vs the action that occurred.