0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00

feat(server): detach plain Agent streams on disconnect and allow run-scoped abort

Registered agents now publish resumable streams by default, so a closed
HTTP reader should detach rather than kill the run. The stream routes now
gate on hasResumableStreams instead of isDurableAgentLike, the observe
route reads a plain agent's stream bus, and the abort-run route can stop a
plain run executing on this server after an ownership check (it is the
only HTTP stop path for thread-less runs now that disconnect detaches).

Cleanup timers move onto AgentStreamBus.scheduleCleanup so DurableAgent
and the plain publisher share one implementation.

Co-Authored-By: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
This commit is contained in:
mastra-platform[bot] 2026-10-26 14:23:46 +00:00
commit 92a5a320ca
8 changed files with 285 additions and 42 deletions