AI SDK 7.0.158 修复负数开头的流式 JSON,并扩展实验沙箱文件操作
AI SDK 7.0.158 于 10 月 30 日发布,修复流式对象在数组首个负数仅收到 `[-` 时被重置为 undefined 的问题;实验 `SandboxSession` 同时新增文件状态、目录列举和删除接口。
为什么值得关注
生成式界面依赖部分 JSON 持续绘制。一个合法负数的短暂前缀若被当成无效状态,会让已显示界面闪退或丢失;沙箱文件接口则把代理生成、检查和清理工作区文件纳入统一运行时。
技术细节
修复覆盖 `processUIMessageStream` 输入以及 UI 框架的 `useObject` 路径,并增加回归测试。实验沙箱新增 `stat`、`listDirectory` 与 `deleteFile`,定义相对路径、符号链接和递归删除语义,并在 just-bash、Vercel Sandbox 与 Daytona 适配器上加入现场断言。版本还允许按请求异步解析 provider 凭据。
适合哪些读者
使用 AI SDK 构建流式生成界面、结构化输出、代码工作区和沙箱代理的 TypeScript 团队
原始来源
- Vercel AI SDK official release and implementation commits ↗github.com
- Experimental sandbox filesystem operations and adapter assertions ↗github.com
- Partial JSON negative-number regression fix and tests ↗github.com
- Asynchronous provider credential resolution ↗github.com
修订与更正记录 (1)
— Publish a verified official patch that directly affects streamed generative-interface state and adds bounded experimental sandbox filesystem operations, with untested credential paths preserved as a limitation.