Does ht interpret ANSI escape codes? There are many protocols that I think ht could interpret and transform into JSON messages. Or if not, then explicitly forward them further over getView API (or a new getUnsanitizedView / getRawView).
Some protocols that are somewhat important for modern terminal experience:
- colors,
- clickable links,
- mouse integration,
- clipboard copy/paste,
- setting title and cwd