Mastra 发布持久化 Agent 运行所有权与原子记忆合并等更新
原标题:October 11, 2026
AI 摘要
Mastra 发布 @mastra/core 1.76.0 等多项更新,重点包括:为持久化 agent 运行引入所有权声明与存储层 run fencing,避免多实例崩溃恢复时重复执行导致状态损坏;PostgreSQL 上支持行锁事务内的原子工作记忆深合并,并可通过 HTTP 显式指定 merge 模式;新增文件处理容错与沙箱优先的文件工作流;Observational Memory 默认改用 model: 'auto' 自动跟随主模型;可观测性支持嵌套 span 与更丰富的 trace 搜索。同时包含若干破坏性变更,如 playground-ui 旧 Metrics 组件移除、OM 默认模型变更。
正文节选
## Highlights ### Durable agent run ownership + storage-level run fencing Crash recovery is now safe across multiple instances: runs are _claimed_ by the execution driving them, recovery skips live-claimed runs (or can `force` take over), and storage adapters can enforce “run fences” to reject writes from an execution that lost ownership—preventing message/thread/workflow state corruption. ### Atomic working-memory merges on PostgreSQL (and explicit merge mode over HTTP) Concurrent s