AG-UI Mastra 2.1 为 CopilotKit 2.x 增加独立入口并把运行指导移到模型边界
AG-UI 在 11 月 27 日发布 `@ag-ui/mastra` 2.1.0。新版增加 `@ag-ui/mastra/copilotkit-2` 入口,改从 `@copilotkit/runtime` 导入 CopilotKit 2.x 运行时,并继续让旧入口与新入口共享同一路由实现;可选 peer dependency 同时接受 CopilotKit `^1.76.0` 与 2.x。
为什么值得关注
这次发布把前端运行时的大版本迁移与 AG-UI 路由语义分离,减少应用为了适配 CopilotKit 2.x 而复制适配层的需要。适配器还在 capabilities identity 中声明自身版本,并加入逐次运行的指导与能力发现,让模型边界知道当前代理可用的界面能力。
技术细节
在支持的 Mastra 版本上,进程内代理默认启用 run guidance。适配器在模型边界处理 `OpenBot standing role` 与 `OpenBot granted tools guidance` 两个保留上下文项;普通上下文仍会到达回调。新旧 CopilotKit 入口共用一个路由实现,因此发布说明承诺路由行为一致。
适合哪些读者
维护 Mastra、AG-UI 与 CopilotKit 集成,正在迁移 CopilotKit 2.x,或依赖 requestContext、自定义工具与提示回调的前端和代理平台团队。
原始来源
修订与更正记录 (1)
— Official AG-UI release notes document a distinct compatibility and model-boundary behavior change with an explicit migration caveat.