黄奕彬

外部精选

Pi 0.84.0

本文来自外部来源,不是黄奕彬的原创文章。本站提供原文入口,并在采集端生成 AI 结构化摘要、解读与中文翻译(如有),一切以原文为准。

阅读原文(pi.dev)
来源
Pi Changelog ↗
作者 / 署名
未标注
发布日期
本站收录时间
原文域名
pi.dev

以上时间均为北京时间;来源更新时间由来源提供,不代表首次发布时间。

结构化摘要 AI 生成

背景与问题

Pi 是一款终端 AI 编程代理(CLI/TUI 工具)。本篇为 0.84.0 版本的官方发布说明,面向 Pi 使用者与扩展开发者,回答『这个版本新增了什么、哪些是破坏性变更、修了哪些缺陷』。其隐含背景是:既有 TUI 交互能力有限、会话与凭据在并发/多进程场景存在稳定性问题、多个模型 provider 的兼容性需持续维护。

方法或内容

发布 Pi 0.84.0,按 New Features / Breaking Changes / Added / Changed / Fixed 组织条目。主要动作:

  • 新增全屏 TUI 模式与 Mermaid/LaTeX 渲染
  • 引入 AGENTS.override.md 目录级上下文覆盖
  • 支持任意 OpenAI 兼容 samplingParams 与 opt-in vLLM thinking_token_budget
  • 内置 Baseten provider
  • 对扩展 API(ModelRegistry、refreshModels、会话 v4 等)做破坏性重构
  • 修复大量终端、Windows、凭据与 provider 兼容问题

关键发现 / 结果

  • 新功能 5 项:全屏 TUI、Mermaid/LaTeX 渲染、AGENTS.override.md、高级采样参数、Baseten provider(BASETEN_API_KEY 认证,默认模型 zai-org/GLM-5.2)
  • 破坏性变更:ModelsStreamTransforms 改名 ModelsRequestTransforms;message_update 事件只发 delta,移除累计字段(#7290);getApiKeyAndHeaders() 返回可含 null 的 ProviderHeaders(#7030);refresh() 改为接受 ModelsRefreshOptions 并返回 ModelsRefreshResult;会话模型替换为 v4 lane-based Session/SessionStorage/SessionRepo,移除旧 JSONL/内存仓库,新增必需的 FileSystem.renameFile()(#7707)
  • Added:实验性 remote-session 客户端(PiClient、CBOR 协议、Unix-socket 传输)、pi.registerMarkdownTransformer()、CredentialSynchronizationError 等
  • Fixed:数十条,含 Windows 路径、并发凭据、Kitty/iTerm2 图像、模型目录刷新阻塞;依赖升级 undici 8.9.0、brace-expansion 5.0.9(涉及多个 GHSA 编号);x64 独立二进制改按 Bun 基线编译,不再要求 AVX2/BMI2(#7390)
  • 模型目录更新:GPT-5.6 Terra/Luna 定价、qwen3.8-max 替换 qwen3.8-max-preview 等

结论与意义

结论:0.84.0 是功能与稳定性并重的版本。扩展开发者必须按 Breaking Changes 迁移(事件 delta 组装、provider refresh 事务化、会话 v4 API);普通用户升级后可获得全屏 TUI 与更多 provider/渲染能力。

边界:部分能力为实验性或 opt-in(remote-session 客户端、vLLM thinking_token_budget、流式 Mermaid 渲染等);原文未说明性能数据与迁移完成情况。

AI 解读 AI 生成

方法:按「时空变量」分析(时间 / 空间 / 变量,严格区分包含、相关与因果),对象包括原文作者、署名人员与关键技术及其实际原理;结论用「元反空」(元思考、反思考、空思考、综合)整理。

时间:何时发生,现在是否仍成立

版本发布于 2026 年 8 月 6 日(来源日期,即北京时间 2026-08-06 08:00)。

内容是该时间点的快照:行为类修复与 API 变更在 0.84.x 内应稳定;但文中模型目录与定价(如 GLM-5.2、GPT-5.6、Grok 4.5、Kimi K3、qwen3.8-max)可能随后续版本变化,现在是否仍成立需以最新 changelog 为准。原文未说明后续维护计划。

空间:谁的环境 / 场景

适用于 Pi 编程代理 0.84.0 的使用者与扩展开发者,涵盖 CLI、TUI、JSON/RPC 与扩展 API 等形态。特别涉及:

  • Windows 用户(含 Git Bash/MSYS/Cygwin/WSL)
  • Wayland、Kitty/iTerm2 终端用户
  • 使用 GitHub Copilot、Baseten、Fireworks、Groq、Google/Vertex、Anthropic、OpenAI Codex 等 provider 的用户
  • 自建 OpenAI 兼容服务与 vLLM 用户

原文仅给出 GitHub release 与 npm 入口,未说明具体安装渠道细节。

变量:实际改变了什么

相对此前的实际变更:

  • 交互:新增可运行时切换的全屏 TUI(粘性编辑器/页脚、独立滚动 transcript、可拖动滚动条、翻页与标记导航快捷键)
  • 行为:message_update 从累计消息改为仅发 delta,消除平方级输出增长;鼠标滚轮默认步长从 3 行降为 1 行
  • 结构:provider refresh 改为只读 context.stored 快照 + 代数校验的 context.publish() 事务;会话层换为 v4 lane-based API
  • 环境:CLI 与 RPC 子进程新增 AI_AGENT=pi
  • 依赖/安全:undici 升至 8.9.0、brace-expansion 升至 5.0.9;x64 独立二进制改按 Bun 基线编译

区分:包含 ≠ 相关 ≠ 因果

有明确因果证据的:

  • 接口改名 ModelsRequestTransforms 的原因是 header 转换应用于所有认证请求
  • 移除累计字段是因为造成平方级输出增长(#7290)
  • ProviderHeaders 保留 null 是为防止占位 OpenAI 凭据经 Cloudflare AI Gateway 发送(#7030)
  • 重编译基线是为消除 AVX2/BMI2 硬件要求(#7390)

各 Fixed 条目均为『问题→修复』的因果描述。只是包含/相关的:GitHub release 与 npm 链接与版本并存;各 See ... 文档引用为指向关系,不构成因果;不同功能条目(如 Baseten 与 Mermaid)仅为同版本共现。

对象:作者/署名与关键技术原理

作者/署名:结构化作者字段为空,原文未标注作者。正文以 (#编号 by @用户) 形式致谢部分贡献者(如 @davidbrai、@xl0、@muyiyr、@petrroll、@mrexodia 等),这属于条目级致谢,不等同于署名。关键技术按原文描述:

  • 全屏 TUI:粘性 dock + 独立滚动 transcript + 可拖动滚动条
  • Mermaid/LaTeX 的终端友好 Unicode 渲染(支持流式渲染)
  • AGENTS.override.md:替换同目录 AGENTS.md/CLAUDE.md,保留其他目录上下文
  • OpenAI 兼容 samplingParams 与 opt-in vLLM thinking_token_budget(为最终答案预留输出 token)
  • Baseten 认证(BASETEN_API_KEY)
  • remote-session 客户端:传输无关的 PiClient、CBOR 协议、Unix-socket 传输
  • v4 lane-based Session/SessionStorage/SessionRepo:持久操作记录、全局 facts、共享序列号、树作用域 lane 视图;FileSystem.renameFile() 用于原子 JSONL 发布

元反空综合结论

元:本条目本质在解决『版本演进时的变更透明与迁移指引』问题——用结构化 changelog 区分新增可用、必须迁移、已修复三类信息,服务升级决策。

反:最可能失效或有边界的部分——实验性 API(remote-session 客户端、早期全屏形态、vLLM thinking_token_budget)后续可能变更;模型目录与定价随上游变动;破坏性变更意味着旧扩展在 0.84.0 上可能直接不兼容。

空:去掉叙事后剩下的必要事实是——一个版本号、若干可启用的功能、一组必须遵守的 API 契约变更、数十条带编号的缺陷修复与安全依赖升级。

综合:这是一份信息密度高、面向升级决策的发布说明;对普通用户主要是增量体验改进与稳定性修复,对扩展开发者则是强制迁移节点,应先核对 Breaking Changes 再升级。原文未说明性能基准数据与作者署名。

中文译文 AI 生成

更新日志 发布说明 2026年8月6日 Pi 0.84.0 GitHub release npm

新特性

  • 全屏 TUI 模式 —— 在运行时于常规模式与全屏模式之间切换,编辑器与页脚保持固定,transcript 可独立滚动,并支持可拖动的滚动条。参见 UI & Display。
  • Mermaid 与 LaTeX 渲染 —— 在交互式 transcript 中渲染 Mermaid 图表与对终端友好的 Unicode 数学公式。参见 Markdown settings 与 TUI Markdown。
  • 按目录覆盖上下文 —— 使用 AGENTS.override.md 为特定目录替换上下文文件。参见 Context Files。
  • 高级自定义模型采样 —— 配置任意 OpenAI 兼容的 samplingParams,以及可选启用的 vLLM thinking_token_budget 值。参见 Sampling Parameters。
  • Baseten 提供商 —— 使用内置的 Baseten 认证与模型支持。参见 API Keys。

破坏性变更

将继承自 pi-ai 的 ModelsStreamTransforms 接口重命名为 ModelsRequestTransforms,因为其头部变换现在应用于所有经过认证的提供商请求。

变更了 JSON 与 RPC 的 message_update 事件,使其仅发出 assistantMessageEvent 增量,并移除了导致输出二次方级增长的累计 message 与 assistantMessageEvent.partial 字段。需要部分消息的客户端必须在 message_start 与 message_end 之间自行组装增量;后者仍然是权威来源(#7290)。

ModelRegistry.getApiKeyAndHeaders() 现在返回值为 string | null 的 ProviderHeaders,并保留 null 的头部删除标记。检查返回头部的扩展必须处理 null;将头部转发到 pi-ai 流的扩展应原样透传。这可防止占位符 OpenAI 凭据经由 Cloudflare AI Gateway 发送(#7030)。

变更了 ModelRegistry.refresh(),使其接受 ModelsRefreshOptions 并返回 ModelsRefreshResult,不再丢弃取消操作与提供商错误。

变更了 ModelRuntime.setRuntimeApiKey(),使其接受认证取消选项而非目录刷新选项。在需要远端数据新鲜度时,请单独调用 refresh({ providers: [providerId], signal })。

要求 config-form 扩展的 OAuth refreshToken(credentials, signal) 回调接受并遵守具体的 abort signal。

将动态的提供商刷新 context store 访问,替换为只读的 context.stored 快照与带代数(generation)校验的 context.publish() 事务。

使用 createProvider({ fetchModels }) 构建的提供商:无需进行目录发布迁移。变更前后,都是返回获取到的模型并注册生成的提供商;createProvider() 负责恢复、持久化与内存内发布。

// Before const beforeProvider = createProvider({ // ... fetchModels: async ({ signal }) => { const response = await fetch(catalogUrl, { signal }); return parseModels(await response.json()); }, }); pi.registerProvider(beforeProvider); // After: unchanged const afterProvider = createProvider({ // ... fetchModels: async ({ signal }) => { const response = await fetch(catalogUrl, { signal }); return parseModels(await response.json()); }, }); pi.registerProvider(afterProvider);

手写的原生 Provider.refreshModels():用带代数保护(generation-guarded)的发布,替换直接的 store 访问与发布前变更。

// Before refreshModels: async (context) => { const stored = await context.store.read(); if (stored) currentModels = stored.models; if (!context.allowNetwork) return; const refreshed = await fetchModels(context.signal); currentModels = refreshed; await context.store.write({ models: refreshed, checkedAt: Date.now() }); }, // After refreshModels: async (context) => { if (context.stored) { const restored = context.stored.models; if (!(await context.publish({ update: () => { currentModels = restored; }, }))) return; } if (!context.allowNetwork) return; const refreshed = await fetchModels(context.signal); if (context.signal.aborted) return; await context.publish({ persist: { models: refreshed, checkedAt: Date.now() }, update: () => { currentModels = refreshed; }, }); },

对于 config-form 的 pi.registerProvider(name, { refreshModels }),仅返回模型的回调保持不变;pi 会发布返回的列表。如果此类回调此前使用 context.store 进行自定义持久化,请改为读取 context.stored 并调用 context.publish({ persist: entry })。在 publish() 中,省略 persist 表示保持存储不变,传入 ModelsStoreEntry 表示写入,传入 persist: null 表示删除。

用 v4 基于 lane 的 Session、SessionStorage 与 SessionRepo API,替换了继承自 pi-agent-core 的 harness 会话模型,其中包括持久的操作记录、全局事实、共享序列号,以及树作用域的 lane 视图。

将继承自 pi-agent-core 的 v2 会话与 AgentHarness API 从其实验性入口提升为默认导出,并移除了实验性子路径。

移除了继承的旧版 JSONL 与内存内 repository API。请改用 pi-agent-core 的 v4 JsonlSessionRepo 或 InMemorySessionRepo,二者均实现了新的 SessionRepo 契约。

新增了继承的必需的 pi-agent-core FileSystem.renameFile() 操作,用于原子化的 JSONL 发布;自定义 harness 文件系统实现必须提供同一文件系统内的替换语义(#7707,由 @davidbrai 贡献)。

用持久的 SessionMetadata 替换了实验性的远程会话列表摘要;RemoteSession.sessions 不再暴露运行时阶段、模型、thinking、附件或锁状态,这些状态仍可从已获取的 SessionSnapshot 值中获得(#7708)。

新增

新增了内置 Baseten 提供商支持,采用 BASETEN_API_KEY 认证,默认模型为 zai-org/GLM-5.2。

新增了实验性的远程会话客户端 API:传输无关的 PiClient、CBOR 协议、Unix-socket 传输,以及 @earendil-works/pi-coding-agent/client 的 RemoteSession 控制器(带 transcript reducers)。参见 Pi Client 与 Remote Protocol(#7344、#7348、#7371、#7409)。

新增了 CredentialSynchronizationError,用于凭据变更成功提交但未能同步本地模型状态的情况。

  • 新增可链式调用的 pi.registerMarkdownTransformer() 钩子,用于对用户和助手 Markdown 进行仅用于显示的转换。参见 pi.registerMarkdownTransformer()(#7231,由 @xl0 贡献)。
  • 新增实验性全屏 TUI 模式,可通过 --tui-mode fullscreen 或 /settings 选择(#7304)。
  • 新增通过 /settings 在常规与全屏 TUI 模式之间进行运行时切换。
  • 为全屏模式新增固定式编辑器、状态、组件与底部停靠栏,同时保持对话记录可独立滚动。
  • 为全屏模式新增可拖动的对话记录滚动条,可通过 /settings 配置 auto、always 和 hidden 模式;always 模式始终保留最右侧一列。
  • 为全屏模式新增页面滚动与标记消息导航快捷键。
  • 为全屏滚动条滑块新增可选的 scrollbarThumb 主题色,缺省回退到 selectedBg。
  • 为交互消息中受支持的 Mermaid 图表新增可配置的主题化 Unicode 渲染,包括可选的流式传输期间渲染。参见 Markdown 设置(#7624,由 @xl0 贡献)。
  • 新增可选择启用的 Ctrl+P/Ctrl+N 提示历史导航;当编辑器获得焦点时,显式的历史绑定优先于应用快捷键。
  • 新增按目录生效的 AGENTS.override.md 上下文文件,它会替换同一目录中的 AGENTS.md 或 CLAUDE.md,同时保留来自其他目录的上下文。参见 Context Files(#7681,由 @Marvae 贡献)。
  • 在 CLI 和 RPC 子进程环境中新增 AI_AGENT=pi,用于通用的 agent 归属标识。参见 Environment Variables(#7493,由 @renaudhartert-db 贡献)。
  • 新增继承的、针对 Markdown 中 LaTeX 表达式的终端友好 Unicode 渲染。参见 TUI Markdown。
  • 在全屏模式中新增堆叠的临时通知。
  • 新增通过 models.json、模型覆盖、扩展提供者和流选项中的 samplingParams 传入任意 OpenAI 兼容模型采样参数。参见 Sampling Parameters(#7568,由 @mrexodia 贡献)。
  • 新增继承的、可选择启用的面向 OpenAI 兼容模型的 vLLM thinking_token_budget 支持,为最终回答保留输出 token(#7638,由 @bnsd55 贡献)。
  • 新增继承的对省略 finish_reason 的 OpenAI 兼容流的支持,在流结束时使用 compat.supportsFinishReason 推断正常停止与工具调用停止。参见 OpenAI Compatibility。
  • 新增继承的延迟提供者请求契约、持久响应句柄、经认证的 fetch/cancel 分发,以及对 pending、ready、failed 和 cancelled 响应的 faux-provider 支持(#7339,由 @davidbrai 贡献)。
  • 新增继承的厂商中立遥测契约,以及 agent 自有的类型化 AI 请求与 harness schema、可组合的 span 启动器和回调辅助函数。参见 agent telemetry schema 参考。
  • 新增继承的结构化 Amazon Bedrock 故障诊断,包含 HTTP 状态码、建模的错误代码以及可用时的 AWS 请求 ID(#7286,由 @brianstanley 贡献)。
  • 新增继承的 AgentOptions.shouldStopAfterTurn,用于在一个轮次完成后、处理排队消息或另一次模型调用之前优雅停止。参见 Agent Options(#7367,由 @acmerfight 贡献)。
  • 新增继承的 v4 JsonlSessionRepo 对仅追加(append-only)JSONL harness 会话的支持(#7611,由 @davidbrai 贡献)。
  • 向 v4 会话 API 新增继承的有界分支条目查询和带索引的打开操作恢复查询(#7448、#7646)。
  • 新增继承的编译完整的 AgentHarness v2 脚手架;在持久执行实现完成之前,未完成的操作路径会以 HarnessNotImplemented 拒绝。

变更

  • 为 pi-ai ModelsStore 的读取、写入和删除新增继承的可选取消;目录编排将这些等待绑定到提供者刷新信号。
  • 将继承的全屏模式默认鼠标滚轮步长从三行减少为一行,以实现更精细的滚动。

修复

  • 修复底部栏在无已知订阅的通用 OAuth/OpenID 登录时显示 (sub) 的问题;扩展 OAuth 提供者可通过 isSubscription 选择启用。
  • 修复继承的 OAuth token 刷新,使停滞的请求释放凭据存储锁(#7508)。
  • 修复继承的工具参数验证,在强制转换之前保留已匹配 anyOf/oneOf 联合分支的值,避免可空联合将 null 转换为其他原始值(#7328)。
  • 修复继承的 Fireworks GLM 5.2 请求在启用长缓存保留时发送不支持的 prompt_cache_retention 字段的问题,并为自动提示缓存启用会话亲和性(#7676)。
  • 修复继承的 JsonlSessionRepo 跨工作目录全局强制会话 ID 唯一的问题;现在 ID 在每个工作目录内唯一。
  • 修复继承的 JSONL 会话分叉与 torn-tail 修复以原子方式发布,避免写入中断后出现部分写入或损坏的会话(#7707,由 @davidbrai 贡献)。
  • 修复在 Windows 上包含路径的 find glob 不返回任何结果的问题(#6817)。
  • 修复手动 /compact 期间排队的消息失败、而未在压缩完成后发送的问题。
  • 修复传递给内置文件工具的 Git Bash、MSYS、Cygwin 和 WSL 驱动器路径被按当前 Windows 驱动器解析而非其原生驱动器的问题(#7064、#7547)。
  • 修复项目级嵌套提供者重试设置覆盖未修改的全局提供者重试设置的问题(#7572)。
  • 修复继承的 GitHub Copilot Grok 4.5 请求,改用受支持的 Responses API(#7560)。
  • 修复全屏模式关闭时终端能力查询回复泄漏到父 shell 提示符的问题。
  • 修复被多个提供者共享的裸精确 --model ID 选择第一个目录条目、而非唯一已认证提供者或明确歧义错误的问题(#7327)。
  • 通过将发布版可执行文件基于 Bun 的基线运行时编译,修复独立 x64 二进制文件需要 Haswell 时代 AVX2/BMI2 指令的问题(#7390,由 @davidbrai 贡献)。
  • 修复全屏模式下 Ctrl+X 复制确认添加对话记录状态行、而非显示临时 Copied! 标记的问题。
  • 修复全屏模式下 Kitty 图像预览在滚动时与固定式编辑器和底部停靠栏重叠的问题。
  • 修复了布局变更会重新传输可见的 Kitty 图像负载并每帧渲染两次转录,导致图像密集的全屏会话卡顿的问题。
  • 修复了在 /settings 搜索中输入诸如 TUI mode 或 Quiet startup 等多词查询时,空格会切换高亮设置的问题。
  • 修复了自定义编辑器未继承默认编辑器自动补全下拉列表条目数上限的问题(#7333)。
  • 修复了包清单中格式错误的资源数组导致会话启动崩溃的问题(#7187)。
  • 修复了 DOOM overlay 示例从失效 URL 下载其共享软件 WAD 的问题。
  • 修复了 setToolsExpanded(false),使其在工具输出已折叠时成为空操作,避免扩展产生冗余的 Tool output: collapsed 启动通知(#7292)。
  • 修复了自定义压缩、交接和 Q&A 示例中由扩展驱动的模型调用,使其经由 coding-agent 模型运行时分发,从而保留自定义提供程序和已解析的认证选项(#7325)。
  • 修复了另一个进程更新 auth.json 后长时间运行的会话使用过期凭据的问题,方法是串行化并发凭据读取且不延迟启动(#7319)。
  • 修复了并发读取 models-store.json 形成文件锁连环阻塞并延迟启动的问题。
  • 将打包的 brace-expansion 依赖更新至 5.0.8,以解决 GHSA-mh99-v99m-4gvg(#7316)。
  • 修复了强制模型可用性刷新仍被此前停滞的刷新阻塞的问题(#7301、#7421,由 @a-yeyang 完成)。
  • 修复了 /model 目录刷新失败时未逐一指出失败目录的问题。
  • 通过将本地凭据一致性与有界的后台新鲜度检查分离,修复了模型目录刷新停滞时提供程序登录在保存凭据后仍卡住的问题(#7027、#7113、#7418)。
  • 修复了 /scoped-models 在渲染前等待远程目录,而不是显示缓存模型并在关闭时取消刷新的问题(#7153)。
  • 修复了 /model <name> 在检查缓存模型匹配之前等待目录刷新的问题(#7443)。
  • 修复了过期的可用性快照和错误在更新的可用性检查轮次之后发布的问题。
  • 修复了过期的 pi.dev、Radius、llama.cpp 和扩展目录刷新在更新的提供程序刷新之后发布的问题。
  • 修复了等待基于文件的凭据锁或模型目录锁期间的取消操作,防止已取消的变更稍后被执行或提交。
  • 修复了并发的内存内凭据变更丢失无关提供程序更新的问题,方法是串行化其读-改-写区段。
  • 将 undici 更新至 8.9.0,并将打包的 brace-expansion 更新至 5.0.9,以解决 GHSA-8xcm-r25x-g524、GHSA-4cwx-7wf7-3272、GHSA-m8rv-5g2x-5cg5、GHSA-jr45-8vmc-qm54、GHSA-v3r7-h72x-cjcm 以及 GHSA-rgw5-rvv9-x895。
  • 修复了 GitHub Copilot 压缩和分支摘要使用 Individual 端点而非凭据解析出的 Business 或 Enterprise 端点的问题(#6768)。
  • 修复了扩展模型调用在转发请求认证时丢弃凭据解析端点的问题,包括使用 GitHub Copilot Business 和 Enterprise 账户的自定义压缩(#7579)。
  • 修复了全屏转录导航缺少编辑器可访问的 Home、End、PageUp 或 PageDown 变体的问题,方法是添加带 Ctrl 修饰的编辑器键绑定(#7574)。
  • 修复了扩展事件总线监听器在会话重载和销毁后仍残留的问题(#7656,由 @tudoroancea 完成)。
  • 修复了在没有可用 X11 剪贴板时,/copy 无法在 Wayland 上读取剪贴板文本的问题(#7387)。
  • 修复了慢速连接在初始连接尝试期间失败的问题,方法是增加连接超时(#7435,由 @muyiyr 完成)。
  • 修复了扩展和内置工具返回的超大图像绕过自动图像大小调整的问题。参见 Image settings(#7330,由 @tizmagik 完成)。
  • 修复了会话发现遗漏通过符号链接目录存储的会话的问题(#7552,由 @muyiyr 完成)。
  • 修复了手动压缩与阈值自动压缩发生竞态的问题(#7370,由 @davidbrai 完成)。
  • 修复了响应在低于预期输出上限处被截断时直接结束运行,而非压缩并重试一次的问题(#7540,由 @davidbrai 完成)。
  • 修复了当 git clean 无法移除被忽略的依赖目录时,Git 包更新导致依赖缺失的问题(#7570,由 @mrexodia 完成)。
  • 修复了来自 POSIX 和 Windows 文件系统根目录的查找结果丢失第一段路径或出现重复尾部分隔符的问题(#7569,由 @petrroll 完成)。
  • 修复了版本检查、目录、托管工具和包管理的瞬时 HTTP 失败未被重试的问题(#7632,由 @petrroll 完成)。
  • 修复了交互式错误忽略已配置的输出填充的问题。
  • 修复了继承的 OpenCode Go 提供程序显示名称。
  • 修复了继承的提供程序错误归一化将数组和类实例当作结构化响应体处理,而非保留其原始错误的问题(#7205,由 @erikogenvik 完成)。
  • 修复了继承的 Anthropic 流丢弃初始 content-block 事件中包含的 text 或 thinking 的问题(#7358,由 @davidbrai 完成)。
  • 修复了继承的 Google 历史转换丢弃重放所需的已签名空 text 和 thinking 块的问题(#7362,由 @jingtao-wisdomgraph 完成)。
  • 修复了继承的 OpenAI Codex 缓存 WebSocket 会话在不同账户凭据之间共享的问题(#7364)。
  • 修复了继承的 Google Generative AI 和 Vertex AI 提供程序瞬时错误绕过自动重试的问题(#7471,由 @vish-pr 完成)。
  • 修复了继承的 Gemini 3 工具调用 ID 在历史转换期间被丢弃、导致已签名多轮重放失效的问题(#7494,由 @muyiyr 完成)。
  • 恢复了通过账户专属策略响应返回的继承 GitHub Copilot 模型(#7672,由 @muyiyr 完成)。
  • 将继承的已退役 Qwen Token Plan qwen3.8-max-preview 模型替换为 qwen3.8-max(#7670,由 @QuintinShaw 完成)。
  • 修复了继承的终端宽度计算未考虑 Indic 连写字素簇的问题(#6987,由 @petrroll 完成)。
  • 修复了继承的嵌套全屏堆栈布局忽略子项最小尺寸的问题。
  • 修复了继承的批量终端配色方案报告被解析为一条格式错误响应的问题(#7550)。
  • 修复了继承的终端进度清除操作未发出完整 OSC 9;4 序列的问题(#7581)。
  • 修复了继承的 iTerm2 图像负载缺少 xterm.js 图像插件所需大小元数据的问题(#7612)。
  • 修复了继承的宽度截断问题,该问题会导致 OSC 8 超链接未正确终止(#7657,作者 @xXJSONDeruloXx)。
  • 更新了继承的 GPT-5.6 Terra 与 Luna 定价,覆盖 OpenAI 与 passthrough 模型目录。
  • 修复了继承的 Fireworks Kimi K3 模型,改用 OpenAI 兼容 API,并支持原生 reasoning-effort 级别与延迟工具(deferred tools)(#7199、#7230,作者 @XBeg9)。
  • 更新了继承的 Groq Qwen 推理覆盖设置,以适配替代后的 qwen/qwen3.6-27b 模型。
  • 修复了继承的 Windows Shift+Enter 检测问题,改为从原生 Win32 助手读取修饰键状态。
  • 修复了继承的 pi-tui npm 包缺失源码与构建脚本的问题,这些脚本是其重建 Windows 与 Darwin 原生扩展所必需的。
  • 修复了继承的 Windows 控制台真彩检测问题,该问题发生在 Windows Terminal 未向子 shell 提供 WT_SESSION 时。
  • 修复了继承的幻影全屏文本选区问题,该问题由切换终端面板焦点时未匹配的鼠标事件导致。
  • 修复了继承的 Windows 键盘输入渲染延迟问题,做法是让输入优先于节流渲染计时器。
  • 修复了继承的 agent harness 在 Windows 上的路径处理问题,涉及文件 basename、递归技能加载与 prompt 模板名称。
展开原文提取正文(采集端自动提取,可能有缺失)

ChangelogRelease notesAug 6, 2026Pi 0.84.0GitHub releasenpmNew Features

Fullscreen TUI mode — Switch between regular and fullscreen modes at runtime, with a sticky editor and footer, independently scrollable transcript, and draggable scrollbars. See UI & Display. Mermaid and LaTeX rendering — Render Mermaid diagrams and terminal-friendly Unicode math in interactive transcripts. See Markdown settings and TUI Markdown. Per-directory context overrides — Use AGENTS.override.md to replace context files for a specific directory. See Context Files. Advanced custom model sampling — Configure arbitrary OpenAI-compatible samplingParams and opt-in vLLM thinking_token_budget values. See Sampling Parameters. Baseten provider — Use built-in Baseten authentication and model support. See API Keys.

Breaking Changes

Renamed the inherited pi-ai ModelsStreamTransforms interface to ModelsRequestTransforms because its header transformation now applies to all authenticated provider requests.

Changed JSON and RPC message_update events to emit only assistantMessageEvent deltas, removing the cumulative message and assistantMessageEvent.partial fields that caused quadratic output growth. Clients that need partial messages must assemble deltas between message_start and message_end; the latter remains authoritative (#7290).

ModelRegistry.getApiKeyAndHeaders() now returns ProviderHeaders with string | null values and preserves null header-deletion markers. Extensions that inspect returned headers must handle null; extensions forwarding them to pi-ai streams should pass them through unchanged. This prevents placeholder OpenAI credentials from being sent through Cloudflare AI Gateway (#7030).

Changed ModelRegistry.refresh() to accept ModelsRefreshOptions and return ModelsRefreshResult instead of discarding cancellation and provider errors.

Changed ModelRuntime.setRuntimeApiKey() to accept auth cancellation options rather than catalog refresh options. Call refresh({ providers: [providerId], signal }) separately when remote freshness is required.

Required config-form extension OAuth refreshToken(credentials, signal) callbacks to accept and honor a concrete abort signal.

Replaced dynamic provider refresh context store access with the read-only context.stored snapshot and generation-checked context.publish() transaction. Providers built with createProvider({ fetchModels }): no catalog-publication migration is required. Before and after, return the fetched models and register the resulting provider; createProvider() owns restoration, persistence, and in-memory publication.

// Before const beforeProvider = createProvider({ // ... fetchModels: async ({ signal }) => { const response = await fetch(catalogUrl, { signal }); return parseModels(await response.json()); }, }); pi.registerProvider(beforeProvider);

// After: unchanged const afterProvider = createProvider({ // ... fetchModels: async ({ signal }) => { const response = await fetch(catalogUrl, { signal }); return parseModels(await response.json()); }, }); pi.registerProvider(afterProvider); Handwritten native Provider.refreshModels(): replace direct store access and pre-publication mutation with generation-guarded publications.

// Before refreshModels: async (context) => { const stored = await context.store.read(); if (stored) currentModels = stored.models; if (!context.allowNetwork) return;

const refreshed = await fetchModels(context.signal); currentModels = refreshed; await context.store.write({ models: refreshed, checkedAt: Date.now() }); },

// After refreshModels: async (context) => { if (context.stored) { const restored = context.stored.models; if (!(await context.publish({ update: () => { currentModels = restored; }, }))) return; } if (!context.allowNetwork) return;

const refreshed = await fetchModels(context.signal); if (context.signal.aborted) return; await context.publish({ persist: { models: refreshed, checkedAt: Date.now() }, update: () => { currentModels = refreshed; }, }); }, For the config-form pi.registerProvider(name, { refreshModels }), callbacks that only return models remain unchanged; pi publishes the returned list. If such a callback previously used context.store for custom persistence, read context.stored and call context.publish({ persist: entry }). In publish(), omit persist to leave storage unchanged, pass a ModelsStoreEntry to write it, or pass persist: null to delete it.

Replaced the inherited pi-agent-core harness session model with the v4 lane-based Session, SessionStorage, and SessionRepo APIs, including durable operation records, global facts, shared sequence numbers, and tree-scoped lane views.

Promoted the inherited v2 session and AgentHarness API from pi-agent-core's experimental entrypoint to its default export and removed the experimental subpaths.

Removed the inherited legacy JSONL and in-memory repository APIs. Use pi-agent-core's v4 JsonlSessionRepo or InMemorySessionRepo, both implementing the new SessionRepo contract.

Added the inherited required pi-agent-core FileSystem.renameFile() operation for atomic JSONL publication; custom harness file-system implementations must provide same-filesystem replacement semantics (#7707 by @davidbrai).

Replaced experimental remote-session list summaries with durable SessionMetadata; RemoteSession.sessions no longer exposes runtime phase, model, thinking, attachment, or lock state, which remains available from acquired SessionSnapshot values (#7708).

Added

Added built-in Baseten provider support with BASETEN_API_KEY authentication and zai-org/GLM-5.2 as the default model. Added experimental remote-session client APIs: the transport-neutral PiClient, CBOR protocol, Unix-socket transport, and @earendil-works/pi-coding-agent/client RemoteSession controller with transcript reducers. See Pi Client and Remote Protocol (#7344, #7348, #7371, #7409). Added CredentialSynchronizationError for credential changes that commit successfully but fail to synchronize local model state. Added chainable pi.registerMarkdownTransformer() hooks for display-only transformation of user and assistant Markdown. See pi.registerMarkdownTransformer() (#7231 by @xl0). Added an experimental fullscreen TUI mode, selectable through --tui-mode fullscreen or /settings (#7304). Added runtime switching between regular and fullscreen TUI modes through /settings. Added a sticky editor, status, widget, and footer dock to fullscreen mode while keeping the transcript independently scrollable. Added a draggable transcript scrollbar to fullscreen mode with configurable auto, always, and hidden modes through /settings; always reserves the rightmost column. Added page scrolling and marked-message navigation shortcuts to fullscreen mode. Added an optional scrollbarThumb theme color for fullscreen scrollbar thumbs, falling back to selectedBg. Added configurable themed Unicode rendering for supported Mermaid diagrams in interactive messages, including optional rendering while streaming. See Markdown settings (#7624 by @xl0). Added opt-in Ctrl+P/Ctrl+N prompt history navigation, with explicit history bindings taking precedence over application shortcuts while the editor is focused. Added per-directory AGENTS.override.md context files, which replace AGENTS.md or CLAUDE.md in the same directory while preserving context from other directories. See Context Files (#7681 by @Marvae). Added AI_AGENT=pi to CLI and RPC child-process environments for generic agent attribution. See Environment Variables (#7493 by @renaudhartert-db). Added inherited terminal-friendly Unicode rendering for LaTeX expressions in Markdown. See TUI Markdown. Added stacked transient notifications in fullscreen mode. Added arbitrary OpenAI-compatible model sampling parameters through samplingParams in models.json, model overrides, extension providers, and stream options. See Sampling Parameters (#7568 by @mrexodia). Added inherited opt-in vLLM thinking_token_budget support for OpenAI-compatible models, reserving output tokens for the final answer (#7638 by @bnsd55). Added inherited support for OpenAI-compatible streams that omit finish_reason, using compat.supportsFinishReason to infer normal and tool-use stops when the stream ends. See OpenAI Compatibility. Added inherited deferred provider request contracts, durable response handles, authenticated fetch/cancel dispatch, and faux-provider support for pending, ready, failed, and cancelled responses (#7339 by @davidbrai). Added inherited vendor-neutral telemetry contracts plus agent-owned typed AI-request and harness schemas, composed span starters, and callback helpers. See the agent telemetry schema reference. Added inherited structured Amazon Bedrock failure diagnostics with HTTP status, modeled error code, and AWS request id when available (#7286 by @brianstanley). Added inherited AgentOptions.shouldStopAfterTurn for gracefully stopping after a completed turn before queued messages or another model call are processed. See Agent Options (#7367 by @acmerfight). Added inherited v4 JsonlSessionRepo support for append-only JSONL harness sessions (#7611 by @davidbrai). Added inherited bounded branch-entry and indexed open-operation recovery queries to the v4 session API (#7448, #7646). Added the inherited compile-complete AgentHarness v2 scaffold; unfinished operation paths reject with HarnessNotImplemented while durable execution is implemented.

Changed

Added inherited optional cancellation to pi-ai ModelsStore reads, writes, and deletions; catalog orchestration binds these waits to the provider refresh signal. Reduced the inherited default fullscreen mouse wheel step from three lines to one for finer scrolling.

Fixed

Fixed the footer showing (sub) for generic OAuth/OpenID sign-ins without a known subscription; extension OAuth providers can opt in with isSubscription. Fixed inherited OAuth token refreshes so stalled requests release the credential-store lock (#7508). Fixed inherited tool argument validation to preserve values that already match an anyOf/oneOf union arm before coercion, avoiding nullable unions converting null to another primitive value (#7328). Fixed inherited Fireworks GLM 5.2 requests sending the unsupported prompt_cache_retention field when long cache retention is enabled, and enabled session affinity for automatic prompt caching (#7676). Fixed inherited JsonlSessionRepo enforcing session IDs globally across working directories; IDs are now unique within each working directory. Fixed inherited JSONL session forks and torn-tail repairs to publish atomically, avoiding partially written or corrupted sessions after interrupted writes (#7707 by @davidbrai). Fixed path-containing find globs returning no results on Windows (#6817). Fixed messages queued during manual /compact failing instead of being sent after compaction completes. Fixed Git Bash, MSYS, Cygwin, and WSL drive paths passed to built-in file tools resolving against the current Windows drive instead of their native drive (#7064, #7547). Fixed project-level nested provider retry settings replacing unmodified global provider retry settings (#7572). Fixed inherited GitHub Copilot Grok 4.5 requests to use the supported Responses API (#7560). Fixed fullscreen shutdown leaking terminal capability-query replies into the parent shell prompt. Fixed bare exact --model IDs shared by multiple providers choosing the first catalog entry instead of the sole authenticated provider or a clear ambiguity error (#7327). Fixed standalone x64 binaries requiring Haswell-era AVX2/BMI2 instructions by compiling release executables against Bun's baseline runtime (#7390 by @davidbrai). Fixed Ctrl+X copy confirmations in fullscreen mode adding a transcript status line instead of showing the transient Copied! marker. Fixed Kitty image previews in fullscreen mode overlapping the sticky editor and footer dock while scrolling. Fixed image-heavy fullscreen sessions lagging when layout changes retransmitted visible Kitty image payloads and rendered the transcript twice per frame. Fixed spaces in /settings searches toggling the highlighted setting while typing multi-word queries such as TUI mode or Quiet startup. Fixed custom editors not inheriting the default editor's autocomplete dropdown item limit (#7333). Fixed malformed resource arrays in package manifests crashing session startup (#7187). Fixed the DOOM overlay example downloading its shareware WAD from a dead URL. Fixed setToolsExpanded(false) to be a no-op when tool output is already collapsed, avoiding redundant Tool output: collapsed startup notices from extensions (#7292). Fixed extension-driven model calls in custom compaction, handoff, and Q&A examples to dispatch through the coding-agent model runtime so custom providers and resolved auth options are preserved (#7325). Fixed long-running sessions using stale credentials after another process updates auth.json without serializing concurrent credential reads and delaying startup (#7319). Fixed concurrent models-store.json reads forming a file-lock convoy and delaying startup. Updated the packaged brace-expansion dependency to 5.0.8 to address GHSA-mh99-v99m-4gvg (#7316). Fixed forced model availability refreshes remaining blocked behind a stalled earlier refresh (#7301, #7421 by @a-yeyang). Fixed /model catalog refresh failures to identify every catalog that failed. Fixed provider login remaining stuck after saving credentials when a model catalog refresh stalls by separating local credential consistency from bounded background freshness (#7027, #7113, #7418). Fixed /scoped-models waiting for remote catalogs before rendering instead of showing cached models and cancelling refresh on close (#7153). Fixed /model <name> waiting for catalog refresh before checking cached model matches (#7443). Fixed stale availability snapshots and errors publishing after a newer availability pass. Fixed stale pi.dev, Radius, llama.cpp, and extension catalog refreshes publishing after a newer provider refresh. Fixed cancellation while waiting for file-backed credential or model-catalog locks, preventing cancelled mutations from running or committing later. Fixed concurrent in-memory credential mutations losing unrelated provider updates by serializing their read-modify-write sections. Updated undici to 8.9.0 and the packaged brace-expansion to 5.0.9 to address GHSA-8xcm-r25x-g524, GHSA-4cwx-7wf7-3272, GHSA-m8rv-5g2x-5cg5, GHSA-jr45-8vmc-qm54, GHSA-v3r7-h72x-cjcm, and GHSA-rgw5-rvv9-x895. Fixed GitHub Copilot compaction and branch summaries using the Individual endpoint instead of the credential-resolved Business or Enterprise endpoint (#6768). Fixed extension model calls dropping credential-resolved endpoints when forwarding request authentication, including custom compaction with GitHub Copilot Business and Enterprise accounts (#7579). Fixed fullscreen transcript navigation leaving no editor-accessible Home, End, PageUp, or PageDown variants by adding Ctrl-modified editor bindings (#7574). Fixed extension event-bus listeners surviving session reloads and disposal (#7656 by @tudoroancea). Fixed /copy failing to read clipboard text on Wayland when no X11 clipboard is available (#7387). Fixed slow connections failing during the initial connection attempt by increasing the connect timeout (#7435 by @muyiyr). Fixed oversized images returned by extension and built-in tools bypassing automatic image resizing. See Image settings (#7330 by @tizmagik). Fixed session discovery missing sessions stored through symlinked directories (#7552 by @muyiyr). Fixed manual compaction racing with threshold auto-compaction (#7370 by @davidbrai). Fixed responses truncated below their intended output limit ending the run instead of compacting and retrying once (#7540 by @davidbrai). Fixed Git package updates leaving dependencies missing when git clean cannot remove an ignored dependency directory (#7570 by @mrexodia). Fixed find results from POSIX and Windows filesystem roots losing the first path segment or gaining duplicate trailing separators (#7569 by @petrroll). Fixed transient version-check, catalog, managed-tool, and package-management HTTP failures not being retried (#7632 by @petrroll). Fixed interactive errors ignoring the configured output padding. Fixed the inherited OpenCode Go provider display name. Fixed inherited provider error normalization treating arrays and class instances as structured response bodies instead of preserving their original errors (#7205 by @erikogenvik). Fixed inherited Anthropic streams dropping text or thinking included in the initial content-block event (#7358 by @davidbrai). Fixed inherited Google history conversion dropping signed empty text and thinking blocks required for replay (#7362 by @jingtao-wisdomgraph). Fixed inherited OpenAI Codex cached WebSocket sessions being shared across different account credentials (#7364). Fixed inherited transient Google Generative AI and Vertex AI provider errors bypassing automatic retries (#7471 by @vish-pr). Fixed inherited Gemini 3 tool call ids being discarded during history conversion, breaking signed multi-turn replay (#7494 by @muyiyr). Restored inherited GitHub Copilot models returned through account-specific policy responses (#7672 by @muyiyr). Replaced the inherited retired Qwen Token Plan qwen3.8-max-preview model with qwen3.8-max (#7670 by @QuintinShaw). Fixed inherited terminal width accounting for Indic conjunct grapheme clusters (#6987 by @petrroll). Fixed inherited nested fullscreen stack layouts ignoring child minimum sizes. Fixed inherited batched terminal color-scheme reports being parsed as one malformed response (#7550). Fixed inherited terminal progress clearing to emit the complete OSC 9;4 sequence (#7581). Fixed inherited iTerm2 image payloads omitting the size metadata required by the xterm.js image addon (#7612). Fixed inherited width truncation leaving OSC 8 hyperlinks unterminated (#7657 by @xXJSONDeruloXx). Updated inherited GPT-5.6 Terra and Luna pricing across OpenAI and passthrough model catalogs. Fixed inherited Fireworks Kimi K3 models to use the OpenAI-compatible API with native reasoning-effort levels and deferred tools (#7199, #7230 by @XBeg9). Updated the inherited Groq Qwen reasoning override for the replacement qwen/qwen3.6-27b model. Fixed inherited Windows Shift+Enter detection by reading modifier state from the native Win32 helper. Fixed the inherited pi-tui npm package omitting the source and build scripts needed to rebuild its Windows and Darwin native addons. Fixed inherited Windows console truecolor detection when Windows Terminal does not provide WT_SESSION to child shells. Fixed inherited phantom fullscreen text selection from unmatched mouse events when changing terminal pane focus. Fixed inherited keyboard input rendering latency on Windows by letting input preempt the throttled render timer. Fixed inherited agent harness path handling on Windows for file basenames, recursive skill loading, and prompt template names.

原文入口

阅读原文(pi.dev)

原文将在新窗口打开。收录时间不是内容更新时间;正文、译文与解读的版权归原作者/来源所有,本站仅作个人阅读辅助并保留原文入口;页面时间均为北京时间。

作者/署名来自原文结构化字段(Atom/RSS/HTML meta/JSON-LD;GitHub release 显示的是发布者账号),未经模型补充。

了解来源批准与收录规则