Anchorage API reference
    Preparing search index...
    • Thread-state TTL cleanup: deletes thread-state rows from mastra_thread_state once their updatedAt is older than the TTL. Keys on updatedAt for the same reason purgeExpiredThreads does — thread state has no terminal status, so time-since-last-write is the only "done" signal. ISO-8601 TEXT encoding; missing table reads as zero; scheduling stays with the caller. Independent of the thread TTL (an orphan row is reaped here or at offboarding by purgeTenant), so it self-bounds without touching the delicate messages-before-threads ordering of purgeExpiredThreads.

      Returns Promise<number>