Exposes the provided flow (or any action) as a Fastify route handler.
Fastify is not Web Fetch native, so this handler bridges Fastify's
request/reply to the Genkit action protocol that runFlow/streamFlow
clients expect: it reads { data } from the parsed JSON body, runs the
action, and streams chunks back as Server-Sent Events when the caller asks
for them (Accept: text/event-stream or ?stream=true).
Exposes the provided flow (or any action) as a Fastify route handler.
Fastify is not Web Fetch native, so this handler bridges Fastify's
request/replyto the Genkit action protocol thatrunFlow/streamFlowclients expect: it reads{ data }from the parsed JSON body, runs the action, and streams chunks back as Server-Sent Events when the caller asks for them (Accept: text/event-streamor?stream=true).