How to subscribe to events and access messages?

Hello,

I am developing my own VS Code extension and would like to integrate it with Cursor. Specifically, I want to:

  • Subscribe to events (e.g., to know when it has finished its work and is waiting for user input).
  • Access the messages.
    Is it possible to subscribe to such events or retrieve chat history?
    If not, are there any plans to expose this functionality in the future?

Any guidance or suggestions would be greatly appreciated!