using `writer.custom()` for UI framework integration - Mastra