Mastra core 1.65.0 lands a portable advanced trace-query contract with tenant-scoped deletion, and breaks the Factory rules API
GitHub Releases·medium signal
Shipped 2026-09-09, Mastra 1.65.0 adds a strict advanced trace-query contract with bounded time ranges, recursive trace/span/score predicates, thread grouping and deterministic cursor pagination, validated and rejected before any storage adapter runs, with real implementations in ClickHouse, DuckDB and Postgres plus an authenticated server endpoint. Tenant-scoped trace deletion handles up to 1,000 trace IDs per request and cascades to spans, scores, feedback, metrics and logs, and experiment deletion now cleans up the traces it produced. Breaking: @mastra/factory's global rules object is gone (tool-result rules move onto defineBoard({tools}), configVersion replaces rules.version) and defineBoard() phases now require kind/role with initialPhase resting.