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

refactor(core): share DurableAgent's run-segment cleanup guard

stream, resume, recover, generate and observe each hand-rolled the same
cleanedUp flag, timer and once-only guard. They now use createRunCleanup,
keeping each path's own release (including generate's lighter timer
release) and the mark-released-after-release ordering.

Co-Authored-By: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
This commit is contained in:
mastra-platform[bot] 2026-11-06 01:13:38 +00:00
commit 262c34adec
3 changed files with 211 additions and 128 deletions