Repository navigation
Releases
v0.2.4
Pi for Android v0.2.4
安装包说明 / APK Variants
pi-android-0.2.4-sideload28-arm64.apk:面向侧载与常规日常使用(targetSdk = 28,PRoot / TAWCROOT / Proroot 全兼容,推荐绝大多数设备安装)。pi-android-0.2.4-modern36-arm64.apk:面向 Android 15/16 现代沙箱与权限行为验证(targetSdk = 36)。- 版本号:
versionName = 0.2.4·versionCode = 14
中文更新日志(v0.2.3 → v0.2.4)
1. 内核升级至 Pi 1.7.0 & 同步上游改动
- 内置引擎升级至
@earendil-works/pi-coding-agent1.7.0:同步刷新运行时锁文件、开源许可清单与 SDK 契约测试(361 项真实 SDK 检查全部通过)。 - 移除已下线的安装遥测(
enableInstallTelemetry):随官方 Pi 1.7.0 清理设置项、同步映射与旧文档。 - 支持图片输出 Token 计量与定价:协议层新增
TokenUsage.imageOutput,供应商自定义模型表单新增可选imageOutput单价字段。 - 适配新版凭据状态语义:正确区分
auth.json中已保存但未解析的凭据状态(Saved (unresolved)),并允许直接清除/退出登录。
2. 扩展交互全量对齐官方 Pi 1.7.0 & 通知进入聊天流
- 扩展通知(
ctx.ui.notify)改为纯聊天流呈现:100% 对齐官方interactive-mode行为——通知直接追加在当前对话流底部(不落盘.jsonl,切会话自动清空),连续info通知原地刷新防刷屏,warning/error逐条保留;超长通知默认折叠、支持一键展开和一键复制全文,彻底告别 4 秒消失与遮挡屏幕问题。 - 扩展 TUI / 浮层 / 输入交互全面修复与手机适配:修复扩展自定义组件、鼠标/滚轮回退、浮层焦点与尺寸、快捷键触发、自定义编辑器以及多处移动端触控与排版细节,并补齐
TranscriptReducer.reset()状态清理。
3. 供应商覆盖表单(models.json)防误导重构
- 内置供应商覆盖清晰引导:点进内置供应商覆盖页时自动展示默认
Base URL与默认协议参考;明确标注顶层接口协议 (api)仅作用于下方新增自定义模型、不会修改内置模型,且支持再次点击已选协议取消选择。 - 外层凭据状态联动提示:若该供应商已在上一层(
auth.json)保存密钥,表单内直接展示绿色状态提示“外层凭据已保存(优先级高于此处)· 留空即可自动沿用”,无需重复粘贴。 - 保存前校验与中文报错翻译:保存前对照 Pi 1.7.0 规则提前提示,清理 SDK 原始报错中的重复前缀并翻译高频报错(含恢复内置默认指引),同时补充
authHeader前提说明。
4. 扩展包 / 更新页与多处旧界面全面翻新
- 重做「扩展包与更新」页(
PackagesScreen):采用全新现代卡片与操作栏设计,将「已配置包列表 + 检查更新 / 全部更新」置顶,安装包收进独立底部弹窗并保留官方parseSource实时预览;修复官方 Pi 1.7.0 下固定版本(npm/git)与本地路径仍显示无效「更新」按钮的问题;操作进度升级为带加载环与等宽日志面板的实时状态卡。 - 重做「包与命令选项」页(
PackageCommandOptionsScreen):替代旧版零散设置分组,清晰管理包安装命令(npmCommand)、技能斜杠命令、扩展启动参数与隐私分析开关。 - 统一翻新资源枢纽、资源类型列表、设备能力与工具页:清理残余旧版
PiSettingsChip按钮,全面换装现代PiPrimaryButton/PiSecondaryButton与项目层三态语义开关,全 App 视觉风格彻底统一。
English Changelog (v0.2.3 → v0.2.4)
1. Pi SDK 1.7.0 Upgrade & Upstream Parity
- Upgraded embedded engine to
@earendil-works/pi-coding-agent1.7.0: Updated runtime lockfile, license manifests, and real-SDK contract tests (all 361 checks passing). - Removed deprecated
enableInstallTelemetry: Cleaned up setting entries and session sync mappings to match Pi 1.7.0. - Image output token & pricing support: Added
TokenUsage.imageOutputin protocol parsing and optional per-modelcost.imageOutputin the custom provider form. - Updated stored-credential status handling: Properly displays
{ configured: false, source: "stored" }asSaved (unresolved)with logout/clear support.
2. Official-Parity Extension UX & Chat-Stream Notifications
- Routed
ctx.ui.notifyinto the chat transcript: Matches official Pi 1.7.0interactive-mode— ephemeral in-memory notices append at the bottom of the chat stream (never persisted to.jsonl, cleared on session reset), consecutiveinfonotices replace in-place to prevent spam, whilewarninganderrorappend cleanly; long notices auto-collapse with 1-tap expand and copy. - Extension TUI & mobile interaction fixes: Polished extension surfaces, mouse/wheel fallbacks, overlay focus/bounds, shortcut dispatching, and mobile touch ergonomics, plus fixed
TranscriptReducer.reset()cleanup.
3. Provider Override Form (models.json) UX Fixes
- Built-in override clarity: Displays the built-in provider's default
Base URLandapias reference hints, clearly explains that top-levelapionly applies to custommodels[]entries (never built-in models), and lets users tap an active API chip again to clear it. - External credential awareness: Shows a clear green status banner when credentials are already saved in
auth.json(which takes precedence overmodels.json), letting users leaveAPI Keyblank confidently. - Pre-save validation & localized SDK errors: Validates Pi 1.7.0 override rules up front, strips duplicated SDK error prefixes, and translates common validation errors into actionable guidance.
4. Redesigned Packages Screen & App-Wide UI Harmonization
- Redesigned Packages & Updates screen (
PackagesScreen): Surfaced installed packages and update actions to the top, moved package installation into a clean modal sheet with liveparseSourceinspection, added spinner + monospace console progress cards, and disabled no-op Update buttons on pinned (npm/git) and local packages to match Pi 1.7.0. - New Package & Command Options screen (
PackageCommandOptionsScreen): Clean dedicated layout fornpmCommand, skill commands, extension startup flags, and analytics opt-in. - Harmonized remaining screens: Replaced legacy
PiSettingsChipcontrols acrossResourceTypeScreen,ResourcesHubScreen,DeviceCapabilityScreen, andToolsScreenwith modernPiPrimaryButton/PiSecondaryButtonand semantic 3-state project override pills.
Full Changelog: v0.2.3...v0.2.4
Pi Android v0.2.3
安装包说明 / APK Variants
pi-android-0.2.3-sideload28-arm64.apk(推荐日常侧载安装):兼容 Android 8.0–16,支持完整原生容器执行能力(targetSdk = 28)。pi-android-0.2.3-modern36-arm64.apk:面向 Android 15/16 现代沙箱与权限行为验证(targetSdk = 36)。- 版本号:
versionName = 0.2.3·versionCode = 13
中文更新日志(v0.2.2 → v0.2.3)
1. MCP 管理与 OAuth 授权全链路打通
- 一体化 OAuth 授权面板:重构 MCP OAuth 登录体验,支持实时读取
<agentDir>/mcp-auth.json登录状态(零额外网络请求)、安全取消授权、登出后即时刷新与令牌持久化。 - 重做 MCP 编辑与导入表单:提供三态 HTTP 鉴权切换(OAuth / Bearer Token / 供应商认证)、清晰字段分组与一键 JSON 格式化。
2. 模型与服务商配置体验升级
- 供应商与模型表单重构:修复修改模型 ID 时卡片意外折叠的问题;将单模型 API/URL 覆盖、四项价格与
compat开关收纳进可折叠进阶区;JSON 导入页新增一键「格式化」与触觉反馈。 - 恢复
defaultTools预设基线:确保工具默认集与设置项行为一致。
3. 运行环境引导、存储治理与设备能力精简
- 全新分阶段引导页:覆盖首次安装、增量更新、无损修复与重建场景,提供连续细粒度进度条、4 阶段里程碑清单、结构化失败诊断与完整安全区适配;修复/重建前自动优雅停机并回收旧进程树,防止覆写正在运行的容器。
- 运行环境存储与诊断页焕新:新增运行时各目录占用明细与统一清理入口。
- 手机设备能力页精简与加固:优化 Shizuku 与系统动作链路;彻底清理冗余历史迁移代码与内部路径诊断,仅保留简洁实时的桥接运行状态。
4. 对话流畅度、表格滚动防跳屏与空态修复
- 修复长消息与表格上滑跳屏及滑入卡顿:将定稿 Markdown 帧 0 同步解析阈值提升至 8 KiB(视口上方滑入提升至 64 KiB)并消除每行滑入时的二次重组与重测量开销;移除 HTML 表格
IntrinsicSize.Min双重测量;为视口上方离屏的 Mermaid / MathJax / SVG / 图片增加高度缓存与偏移补偿,滚过复杂长消息与表格不再整屏跳动。 - 修复空对话欢迎态闪退:改为依据实际可见消息行判定空态,避免扩展顶栏或隐藏条目导致欢迎徽标在引擎就绪后消失。
- 工作区文件操作补齐:完善工作区文件新建、重命名、删除、移动等常用操作与交互反馈。
5. 全应用视觉语言统一
- 彻底清零 M3 默认紫色残留:全仓替换为当前主题
accent,统一设置/工具/资源页的单色发丝边图标槽、矢量勾选与自适应方向图标、全宽分段控制器与统一搜索栏。 - 全新双语文档:重写中英文 README 并补充视觉画廊预览。
English Changelog (v0.2.2 → v0.2.3)
1. Complete MCP Management & Unified OAuth Flow
- Unified OAuth sheet & live auth state: Added live
<agentDir>/mcp-auth.jsonstatus inspection with zero network overhead, cancellable OAuth flow, instant post-logout state refresh, and persistent credential storage. - Redesigned MCP editor & JSON importer: Clear 3-mode HTTP auth switcher (OAuth / Bearer Token / Provider), structured fields, and 1-tap JSON formatting.
2. Models & Provider Configuration Polish
- Refined provider & model forms: Fixed card collapse while editing model IDs, grouped per-model API/URL overrides, pricing, and
compatflags into a collapsible advanced section, and added 1-tap JSON formatting in JSON import. - Restored
defaultToolspreset baseline for consistent default tool configuration.
3. Onboarding Boot, Runtime Storage & Clean Device Capabilities
- Contextual multi-stage Boot Screen: Unified First Install, Incremental Update, Repair, and Rebuild flows with smooth progress, 4-stage milestones, structured failure diagnostics, and full system bar insets; gracefully stops and reaps any active engine process tree before repair/rebuild.
- Runtime storage breakdown: Added disk usage breakdown and cleaner diagnostics in Runtime Engine settings.
- Streamlined Device Capabilities: Hardened Shizuku and system actions while removing legacy migration cleanup code and noisy internal path dumps from bridge diagnostics.
4. Chat Scroll Stability, Smoothness & Empty-State Fix
- Eliminated upward scroll jumps & per-row recomposition stutter on long/table messages: Raised frame-0 settled Markdown sync parsing to 8 KiB (64 KiB entering from above) and marked synchronously parsed rows ready on frame 0 to avoid wasted double recomposition; removed
IntrinsicSize.Minfrom HTML tables; added rich block height caching and above-viewport scroll-offset compensation for Mermaid / MathJax / SVG / images so scrolling back over tables stays rock-steady. - Fixed disappearing empty-state emblem: Base empty-state visibility on actual rendered transcript rows so extension headers or hidden entries never blank out the welcome canvas.
- Workspace file operations: Added full file management actions (create, rename, delete, move) with unit test coverage.
5. App-Wide Visual Harmonization
- Zero default M3 purple accents: Migrated all remaining
colorScheme.primaryusages to themeaccent, unified monochrome hairline icon wells, vector checkmarks &AutoMirroreddirectional icons, full-width segmented controls, and shared search bars across Models, Tools, and Resources. - Rewritten bilingual READMEs with updated visual galleries.
Full Changelog: v0.2.2...v0.2.3
Pi for Android v0.2.2
Pi for Android v0.2.2
安装包说明 / APK Variants
pi-android-0.2.2-sideload28-arm64.apk:面向侧载与常规日常使用(targetSdk = 28,PRoot / TAWCROOT / Proroot 全兼容,推荐绝大多数设备安装)。pi-android-0.2.2-modern36-arm64.apk:面向 Android 15/16 现代沙箱与权限行为验证(targetSdk = 36)。- 版本号:
versionName = 0.2.2·versionCode = 12
中文更新日志(v0.2.1 → v0.2.2)
1. 内核升级至 Pi 1.6.1 & 官方主题同步
- 内置引擎升至
@earendil-works/pi-coding-agent1.6.1:同步支持notices.*分项提示开关(cacheMisses/cacheWarming/compactionCosts/reasoningDrops)、warnings.anthropicExtraUsage、fullOutputError、httpIdleTimeoutMs禁用语义与模型切换零额外往返快照同步。 - 宿主主题桥接官方
sdk.Theme:App 当前主题色板实时同步到 Pi SDK 全局主题槽,扩展 TUI 组件、代码高亮与 diff 输出与 App 主题彻底一致。
2. 全新字体排版引擎 & 阅读级视觉体验
- 旗舰多字重字体套件:引入 Inter、Geist、JetBrains Mono、Geist Mono、思源宋体等完整字体族,实现全应用统一中英文混排;重建「字号 × 密度」双轴排版引擎。
- 中文排版与富媒体打磨:正文与标题开启严格中文避头尾(CJK Kinsoku),列表改用矢量圆点/方点绘制,竖屏图片自动限定合理展示比例并保留有意义的图注;全新自绘
PiSpinner、树状折叠箭头与语义化中止/截断/错误卡片。
3. 工具卡片升级与全新「专注折叠」模式
- Pi 原版工具卡对齐官方并针对手机优化:去除冗余圆圈对错号与无意义耗时/行数,
edit与 diff 合并为单张卡片并支持长行横向滚动,手机端采用保尾路径缩写(长按复制仍保留完整路径);恢复思考块「已思考 X 秒」耗时显示并修复结算态。 - 全新「专注折叠」模式(独立解耦):可将连续思考与多步工具调用折叠为克制的单行执行摘要,突出正文回复;运行中实时显示当前步骤与 Shell 命令预览,失败摘要与返回图片在折叠态依然直显,展开后以细线时间轴复用原版卡片。
- 对话顶部菜单即刻切换:移除对话右上角菜单中重复的「项目与文件」,替换为 Pi 原版 / 专注折叠 一键实时切换;精简「项目与文件」页右上角冗余菜单为一键刷新。
4. 悬浮双胶囊顶栏、重做输入框与队列托盘
- 悬浮双胶囊顶栏:对话顶部采用简洁悬浮双胶囊 + 柔和顶部羽化渐隐,不遮挡消息流并支持系统大字号防裁切。
- 输入框与队列托盘精修:顶部合并「模型 / 思考等级」一体胶囊与无边框上下文圆环仪表;恢复对齐官方 Pi 7 档思考色的柔和混色输入框边框(流式呼吸优先于聚焦、Bash 模式语义绿、不刺眼);同位 36dp 停止钮外环带流式
PiSpinner;全新极简单层待发队列托盘,支持一键查看投递模式与收回编辑。
5. 全新 OKHSL 主题工坊 & 设置体系重构
- Theme Studio 主题工坊:采用 Carbon Studio 中性碳黑默认主题,内置 12 套大师级浅/深预设与自由 OKHSL 调色,全自动保障 WCAG AA+ 与正文 >= 10:1 对比度,导出为与桌面端 Pi 100% 互通的标准主题 JSON;修复中文/非 ASCII 主题名与双版保存的文件名覆盖问题及大小写内置名冲突,「同步保存浅/深双版」默认关闭。
- 设置页全面焕新:独立拆分「对话与消息」「上下文压缩(带实时用量与一键压缩)」「网络与重试」页面,全面换装现代内联分段与预设控件,并补齐
defaultTools全局搜索索引。
English Changelog (v0.2.1 → v0.2.2)
1. Pi SDK 1.6.1 Upgrade & Official sdk.Theme Sync
- Upgraded embedded engine to
@earendil-works/pi-coding-agent1.6.1: Added full support for granularnotices.*toggles (cacheMisses,cacheWarming,compactionCosts,reasoningDrops),warnings.anthropicExtraUsage,fullOutputError,httpIdleTimeoutMsdisable handling, and zero-extra-RTT model/thinking state sync. - Native
sdk.Themehost bridge: Active Android theme palettes now sync directly into Pi SDK's globalsdk.Themeslot so extension TUI panels, code highlighting, and diff output match the app theme seamlessly.
2. Editorial Typography Engine & Refined Reading Experience
- Flagship multi-weight font suite: Bundled Inter, Geist, JetBrains Mono, Geist Mono, and Source Han Serif with unified CJK + Latin pairing and a rebuilt two-axis (font size × density) typography engine.
- Typography & media polish: Enabled strict CJK line-breaking (Kinsoku) for prose and headings, vector-drawn list bullets, portrait image framing with smart captions, custom zero-recomposition
PiSpinner, crisp tree chevrons, and semantic Aborted / Truncated / Error cards.
3. Official-Parity Tool Cards & Decoupled Compact Trace Mode
- Pi Original tool cards optimized for mobile: Removed cluttered status circle badges and redundant durations/line counts, merged
edit+ diff into a single horizontally scrollable card, added tail-preserving phone path shortening (full path preserved on copy), and restored thinking block elapsed duration & settlement accuracy. - New decoupled Compact Trace mode (
专注折叠): Folds consecutive thinking + tool calls into a single serene summary row so prose stays front and center; displays live active step and shell command previews while running, surfaces error snippets and tool images even while collapsed, and expands along a clean hairline timeline reusing native cards. - Instant switcher & menu cleanup: Replaced the duplicate "Project & Files" entry in the Chat command sheet with a live Pi Original / Compact segmented toggle, and streamlined the Project & Files top bar to a single-tap refresh action.
4. Floating Dual-Capsule Header, Refined Composer & Queue Dock
- Floating dual-capsule header: Replaced the heavy top bar with clean floating capsules and a mirrored top fade feather, supporting large Android font scales without vertical clipping.
- Composer & queue dock overhaul: Unified the Model + Thinking capsule and borderless context usage meter; restored official Pi 7-level soft-blended thinking-color composer border (streaming prioritized over focus, green for Bash mode, calm and unobtrusive); added a concentric
PiSpinnerring on the 36dp Stop button; rebuilt the pending steering/follow-up queue dock with direct delivery-mode access and 1-tap restore.
5. OKHSL Theme Studio & Modernized Settings
- OKHSL Theme Studio: Introduced Carbon Studio defaults, 12 distinct master light/dark presets, and free OKHSL tuning with automatic WCAG AA+ and >= 10:1 text contrast guarantees, exporting standard Pi-compatible theme JSON files. Fixed silent filename collisions for CJK/non-ASCII theme names and case-insensitive built-in name conflicts, and defaulted dual-pair export to off.
- Settings architecture overhaul: Dedicated modern screens for Chat & Messages, Compaction (with live context usage and 1-tap compact), and Network & Retry using inline segmented/preset controls, plus
defaultToolsindexed in global Settings search.
Full Changelog: v0.2.1...v0.2.2
Pi for Android v0.2.1
安装包选择(双变体签名 APK)
本次发布同时提供两个由同一侧载签名构建的 arm64 正式包,应用内更新器默认按当前变体精准匹配,不会跨变体误升或触发降级报错:
pi-android-0.2.1-sideload28-arm64.apk(推荐日常使用):targetSdk 28,面向 Android 侧载环境,完整兼容 proot / 内置 Node / 扩展运行与本地文件访问。pi-android-0.2.1-modern36-arm64.apk(现代沙箱测试版):targetSdk 36,用于 Android 15/16 现代沙箱与权限行为验证。
本次更新内容(v0.2.0 → v0.2.1)
1. 全面清理旧 RPC 遗留,SDK Host 协议彻底收口
- 扩展交互对话框(
ui.select/ui.confirm/ui.input/ui.editor)与界面通知/标题/编辑器同步事件(ui.notify/ui.reset/ui.title/ui.editorText/ui.paste)全部改由 Kotlin 直接消费 SDK Host 帧,删除历史遗留的requestToLegacy/eventToLegacy/PiEvent.ExtensionUiRequest双向翻译链路。 - 为阻塞型宿主对话框增加独立的
rescueRequests投递与超时兜底通道,避免界面短暂重建或缓冲拥塞导致扩展挂死。 PiResponses.sessionState原生支持 SDK Host 的messageCounts.total字段,移除HostEngineApi.getState()手工拼装逻辑;清理未使用的协议读取器与 444 行已废弃的PiPreSpawnConfig.kt。- 完整对齐 Pi 1.6.0 SDK(扩展
mode: "tui"绑定、项目信任机制、内置命令补全闭环、扩展错误诊断、MCP 与模型目录导入)。
2. 聊天页交互稳定性与列表防抖动门禁
- 彻底修复非触底静止状态下点击展开/折叠思考卡、工具卡时的列表微跳动,同时完整保留触底跟随状态下展开/折叠卡片不断开跟随的体验。
- 新增
TailFollowTest单元测试与tools/check-startup-perf.mjsCI 静态门禁,防止后续修改导致列表抖动回退。 - 重做消息文本自由选中与输入法过渡;聊天顶栏窄屏精简,指令面板补齐「项目与文件」直达入口;点击附件缩略图支持全屏大图预览,修复图片查看器首帧解码闪烁。
3. 全新「项目与文件」工作台与原生 PTY 终端重构
- 项目与文件:采用干净的
/root/projects目录结构;新增顶栏项目快速切换器、吸顶面包屑路径栏与快捷位置切换、统一的 StudioPiSheet操作面板及文件编辑/文件夹返回手势体验优化。 - 终端重构:基于原生 Termux PTY 引擎重写多标签持久终端,支持实时
SIGWINCH尺寸同步、单元格几何与 IME 光标对齐,以及官方 Pi CLI 快捷入口。
4. 原生渲染引擎升级(Markdown / 数学公式 / Mermaid 12 / 语法高亮)
- 替换旧渲染库为原生 JetBrains AST Markdown 渲染器、Chromium Skia 离屏 Mermaid 12 渲染管线(修复 1/3 角落缩放缩水、自动像素裁剪与高对比度图表配色)以及 35+ 语言原生语法高亮。
- 打包完整 MathJax 4.1.3 动态字体分片与离线回退,修复行内 LaTeX GFM 词法切分问题;流式增量节流并加入内存回收机制。
5. 全应用 Studio 质感精修(Chat / Sessions / Tree / Extensions / Models / Settings)
- 统一 Studio 表面层级、控件高度与
PiSheet卡片底色体系,清除残留的原生 Material 3 杂项阴影与默认控件。 - 扩展 UI 全面移动端化:支持 TUI Cell-Grid 表面自然触摸滚动、
onTerminalInput桥接、输入框角落扩展角标、Braille 加载指示器以及主题色theme.name实时同步。 - 会话页修复活跃会话删除拦截,优化会话列表加载速度;模型与供应商页统一整合,修复窄屏按钮溢出;外接设备页补齐 Shizuku 安装启用指引与整行切换;设置、外观、运行引擎与开源许可页全面打磨并新增应用内更新检查。
English Release Notes (v0.2.0 → v0.2.1)
APK Variants (Dual Signed arm64 Builds)
pi-android-0.2.1-sideload28-arm64.apk(Recommended):targetSdk 28build for daily sideloading with full proot/Node/extension runtime compatibility.pi-android-0.2.1-modern36-arm64.apk:targetSdk 36build for modern Android 15/16 sandbox testing.- Both builds share the same sideload signing key, and the in-app updater matches variants strictly to prevent accidental downgrade errors or one-way sandbox jumps.
Highlights
- Complete RPC-to-SDK-Host Cleanup: Removed legacy RPC translation helpers (
requestToLegacy/eventToLegacy/PiEvent.ExtensionUiRequest), unused response readers, and the obsoletePiPreSpawnConfig.kt. Kotlin now consumes SDK Hostui.*requests and events directly with a dedicatedrescueRequestsdeadlock guard, aligned with Pi 1.6.0. - Zero-Jitter Chat List & Regression Guard: Fixed stationary non-following card expand/collapse jitter while preserving tail-follow on bottom card toggles, locked in by
TailFollowTestand CI static guards. - Projects & Native PTY Terminal Overhaul: Clean
/root/projectslayout with top-bar project switcher, sticky breadcrumb/location bar, unifiedPiSheetchrome, and a rebuilt native Termux PTY multi-tab terminal with liveSIGWINCHand IME alignment. - Native Rich Rendering Pipeline: Native JetBrains AST Markdown renderer, bundled MathJax 4.1.3 fonts, viewport-locked Mermaid 12 rendering with auto-trim & high contrast, and 35+ language syntax highlighting.
- App-Wide Studio Polish: Unified Studio surfaces and controls across Chat, Sessions, Tree, Extensions (full mobile TUI surface & IME parity), Models & Providers, Appearance, Runtime Engine, Device Capabilities (Shizuku help dialog), Licenses, and In-App Updater.
Pi for Android v0.2.0
Pi for Android v0.2.0
从上一正式版 v0.1.8-2 到 v0.2.0,历经 74 次提交,是一次从底层引擎、扩展生态、视觉质感、核心工作流到全应用中英双语的跨代大升级——内核跃升至 Pi 1.6.0,同时通过深度瘦身将安装包体积从 153 MiB 降至 134 MiB。
核心重磅更新
1. 内核升级至 Pi 1.6.0 & 全面重构 :protocol 架构
- 内置引擎升至
@earendil-works/pi-coding-agent1.6.0:全面跟进 Pi 1.6.0 新特性、事件模型与设置项,建立升级审计与真 SDK 契约测试防线。 - 架构全面现代化:将历史遗留的
:rpc协议层全面重构迁移为强类型:protocolSDK Host 架构,消除冷启动阶段非必要的未打包模块加载,并新增 6 项冷启动性能 CI 守卫,启动更快更轻。 - 运行时底层加固:修复
tawcroot因PDEATHSIG导致的exit 137意外退出问题,并彻底重做「引擎与运行时」诊断页。
2. 移动端 Pi 扩展与完整 TUI 兼容引擎
- 把桌面端 Pi 扩展生态搬上手机:完整支持官方扩展 UI 协议,在手机上直接运行交互式扩展 TUI 面板,自动按手机屏幕计算视口宽/高并按实际列数回传
ui.resize。 - 完整移动端交互体验:支持扩展浮层一键最小化与恢复、1:1 SDK 工具卡与 ANSI 彩色输出、声音提示、
/reload一键热重载与ui.reset状态重置,以及会话切换时自动清空旧扩展投影。
3. 全新视觉语言、编辑部级阅读质感 & 真·矢量行内 LaTeX
- 全站 UI 焕新 & 100% Pi 主题兼容:重构整套亮/暗主题色阶、字体层级、圆角与 0.5dp 发丝边体系,完美兼容官方 Pi 主题;聊天悬浮输入框升级为柔光边缘羽化渐变与同心圆环边框。
- 真正 MathJax 矢量 SVG 行内 LaTeX:聊天正文正式支持
$...$与\(...\)行内矢量数学公式实时渲染(兼容中英混排紧邻、精准保护$5/$10货币符号不误伤、块级$$...$$/\[...\]自动隔离排版),并修正公式缩放比例,告别巨型错位公式。 - 富文本排版全面升格:
- 代码块:去掉外部多余的滚动切换胶囊,头部回归极简(语言/文件名 + 行数 + 复制 + 菜单),统一行号槽与卡片质感。
- GFM 表格:改用按内容长度智能分配的弹性列宽 + 动态右缘渐隐提示(去除遮挡表头文字的悬浮图标),手机横滑更顺眼。
- 引用块、标题与富卡片:全面优化引用块、标题层次、分割线、Mermaid 图表、HTML 卡片、CSV 表格、链接卡片与堆栈视图的视觉一致性。
4. 会话列表、命令面板 & 项目文件管理器全面重做
- 秒开会话列表(对照官方
/resume):彻底重写会话列表数据面与 UI——后台预读、增量索引、按工作区分组、新会话即时置顶、重读不闪白不清缓存。 - 命令面板官方对齐:支持
/model <引用>、按官方分组重排,不可用命令不再占位干扰。 - 像原生文件管理器一样好用的项目页:完全对齐 Pi
cwd语义,支持直接热切换手机本地外部存储目录作为工作区;新增子目录新建、文件导入、复制副本、系统分享、递归搜索与 Markdown 实时预览。
5. 模型与供应商、账号订阅登录 & 自定义端点全面重做
- 所有账号/OAuth 登录统一置顶:将全部支持订阅账号与网页 OAuth 授权的供应商(Claude Pro/Max、ChatGPT Plus/Pro、GitHub Copilot、Gemini CLI、OpenRouter 等)集中展示在顶部「账号与订阅登录」分区,登录前后不跳段、不重复,清晰区分「订阅」与「网页登录」。
- 重做供应商连接与粘贴 Key 面板:彻底告别简陋表单——清晰分层的 OAuth 授权卡(实时进度、高亮设备验证码一键复制并打开浏览器、手动回调链接粘贴)与 API Key 卡(一键剪贴板粘贴、密码明文切换、整宽主保存按钮、凭据来源徽标),退出登录/删除凭据增加二次确认。
- 重做自定义供应商(
models.json)表单:支持窄屏横向滚动选协议、API Key 粘贴与明文切换、折叠模型配置卡、内置供应商覆盖提示与吸底操作栏。 - 统一搜索体验:模型页、供应商目录、设置首页与开源许可页全面换装带搜索图标与一键清空(×)的统一搜索框。
6. 系统提示词、MCP 与零 Token 设备能力全面重做
- 系统提示词与上下文彻底重构:总览实时生效状态(清晰呈现全局/项目层
APPEND_SYSTEM.md追加与SYSTEM.md替换的继承关系与容量),提供直达AGENTS.md/CLAUDE.md的四槽位空白草稿编辑器,点击任意空白处即弹输入法,保存自动热重载生效。 - MCP 管理器对齐 SDK:移除非官方内置的 Sentry / GitHub 硬编码预设,回归 SDK 标准三大入口(远程 Streamable HTTP / 本地 STDIO / 粘贴导入 JSON,支持一键从剪贴板粘贴),全面优化状态展示与窄屏排版。
- 零 Token 设备能力桥接:移除冗余的 SAF 目录代理与
android_files(已支持直访本机目录),未开启时零 Token 上下文占用,2×2 系统权限与 Shizuku 状态面板一目了然。
7. 全应用中英双语原生支持
- 覆盖聊天、设置、模型、MCP、项目、资源、设备能力与会话树全场景(2,600+ 处界面文案),支持中英无缝切换并纳入 CI 自动校验。
稳定性与流畅度打磨
- 彻底根治「Pi 无响应(ANR)」:完成全代码库主线程审计,清零空转触底跟随死循环、会话树异常环路死循环、前台服务早退竞态、主线程阻塞 I/O 与配置读写锁护航,日常浏览与高强度对话均保持跟手流畅。
- 丝滑流式交互:消除流式输出上下抖动、思考内容闪烁丢失、错误工具卡无法收起、弹窗首帧暗幕闪烁及长表格卡顿。
- OAuth / MCP 细节修复:修复关闭登录面板未及时取消回调端口导致的
ERR.BUSY问题与多项边界交互问题。
安装与升级说明
- 下载
pi-android-0.2.0-sideload28-arm64.apk(versionName = 0.2.0,versionCode = 10,arm64-v8a单 ABI,内置 proot / proroot / tawcroot 与 Pi 1.6.0 运行时)。 - 沿用固定侧载签名,支持从
v0.1.8-2及更早版本直接覆盖安装,保留全部本地会话、工作区、模型凭据与配置。
English Release Notes
Pi for Android v0.2.0
A generational leap over v0.1.8-2 spanning 74 commits — upgrading the bundled engine to Pi 1.6.0, bringing the full desktop Pi extension & TUI ecosystem to Android, overhauling reading typography with real MathJax vector inline LaTeX, rebuilding Sessions, Project Explorer, Models/OAuth, System Prompts, and MCP, and shipping complete Chinese + English localization — all while slimming the signed APK from 153 MiB down to 134 MiB.
Major Highlights
1. Pi 1.6.0 Engine & Modern :protocol Architecture
- Upgraded bundled engine to
@earendil-works/pi-coding-agent1.6.0 with full SDK contract tests and upgrade audit coverage. - Migrated
:rpc→ typed:protocolSDK Host, eliminated unbundled cold-start imports, and added 6 cold-startup performance CI gates. - Runtime hardening: fixed
tawcrootexit 137(PDEATHSIG) unexpected exits and rebuilt the Engine & Runtime diagnostics screen.
2. Mobile Pi Extension & Full TUI Compatibility Engine
- Desktop Pi extensions on mobile: renders official interactive TUI extension surfaces with automatic viewport width/height adaptation and live
ui.resizereporting. - Complete mobile UX: minimizable extension overlays, 1:1 SDK tool cards with ANSI rendering, audio bell support, 1-tap
/reloadwithui.reset, and automatic state cleanup on session switch.
3. Editorial UI Overhaul & Real Vector Inline LaTeX
- Refreshed visual system & 100% Pi theme compatibility: refined light/dark palettes, typography rhythm, 0.5dp hairlines, and a floating composer dock with soft edge feathering and concentric ring border.
- Real MathJax Vector SVG Inline LaTeX: supports
$...$and\(...\)inline math with CJK adjacency,$5/$10currency protection, automatic blank-line isolation for display math ($$...$$/\[...\]), and accurateemWidth/emHeightsizing. - Upgraded rich blocks: minimalist code block headers (removed redundant outer scroll pill), content-proportional GFM tables with dynamic right-edge fade, and refined blockquotes, headings, Mermaid diagrams, HTML, CSV, Link, and StackTrace cards.
4. Rebuilt Sessions, Command Palette & Project File Manager
- Instant Session List (
/resumeparity): background preloading, incremental indexing, workspace grouping, instant new-session pinning, and zero-flash reloads. - Official Command Palette parity: supports
/model <ref>, official grouping, and hides unavailable entries. - Native-grade Project Explorer: aligned with Pi
cwdsemantics, hot-switching external Android storage folders as workspaces, plus subfolder creation, import, duplicate, share, recursive search, and Markdown preview.
5. Rebuilt Models, OAuth / Subscription Login & Custom Providers
- All OAuth & Subscription providers promoted to top: unified Account & Subscription Login section featuring Claude Pro/Max, ChatGPT Plus/Pro, GitHub Copilot, Gemini CLI, OpenRouter, and more — with clear Subscription vs. OAuth badges and no section-jumping.
- Redesigned Provider Connect & API Key Sheet: clean card hierarchy for OAuth sign-in (live progress, highlighted device-code Copy & Open Browser, manual callback paste), API Key (one-tap Clipboard Paste, show/hide toggle, full-width primary Save button, source badges), custom endpoint overrides, and Sign Out with confirmation.
- Redesigned Custom Provider (
models.json) form: scrollable protocol chips, API key paste & visibility toggle, collapsible model cards, delete confirmation, and sticky action footer. - Unified search bars with search icon and clear (
×) button across Models, Provider catalog, Settings Home, and Licenses.
6. Rebuilt System Prompts & Context, MCP & Zero-Token Device Bridge
- System Prompt & Context: live active status overview (
APPEND_SYSTEM.mdvs.SYSTEM.mdinheritance + compact KB sizing), direct 4-slot editor (AGENTS.md/CLAUDE.md) with full-area IME tap focus and automatic hot-reload on save. - SDK-Aligned MCP Manager: removed non-SDK hardcoded Sentry & GitHub presets in favor of standard SDK transports (Remote Streamable HTTP, Local STDIO, Import JSON with one-tap clipboard paste).
- Zero-Token Device Bridge: removed redundant SAF /
android_fileslayers in favor of direct storage access, zero token overhead when disabled, and a crisp 2×2 readiness dashboard.
7. Full Chinese & English Localization
- Complete bilingual UI coverage (2,600+ localized strings) with automated CI parity checks.
Stability & Polish
- Eradicated ANR ("Pi Not Responding") freezes across idle browsing, Session Tree, Foreground Service lifecycle, settings lock convoys, engine restarts, and large Markdown tables/messages.
- Smooth streaming: eliminated streaming scroll jitter, thinking flicker, uncollapsible error tool cards, and dialog first-frame dim flashes.
- OAuth & MCP reliability: fixed lingering callback ports (
ERR.BUSY) when dismissing active login sheets.
Version & Installation
pi-android-0.2.0-sideload28-arm64.apk(versionName = 0.2.0,versionCode = 10,arm64-v8a, bundled proot / proroot / tawcroot + Pi 1.6.0).- Signed with the fixed sideload key — supports seamless in-place upgrade over
v0.1.8-2without losing sessions or configuration.
0.1.8-2 — 会话树对照 pi /tree 重做、工具卡折叠回退
核心更新
1. 会话树(/tree)对照 pi 重做
原来那套是自己拼的树;现在整块换成 pi 官方 TreeSelectorComponent 的逐项移植:
- 5 种过滤:默认 / 只看用户消息 / 只看带标签 / 去掉工具结果 / 全部。默认档隐藏设置类条目(标签、上下文编辑、模型切换、思考等级等);
usage在任何档位都不显示;只有工具调用、没有文字的助手消息也不显示(除非出错、被中止,或它就是当前位置)。 - 布局按"可见树"重算:被过滤掉的条目,它的孩子挂到最近的可见祖先上;缩进和连线按可见树算,所以单链永远在同一列,只有分叉点才多一级。
- 活动分支排在最前,其余按时间旧→新。
- 折叠:只有"有可见孩子、且是根或分叉点下一支的开头"的节点能折叠。
- 搜索:空白分词、全部命中;搜索时自动清空折叠。
- 显示与复制:工具结果显示成
[read: 路径]这样的调用,而不是"工具完成";路径按 pi 家目录缩成~/;复制按 pi 的规则取文字。 - 新设置
treeFilterMode:树打开时用哪一档过滤。 - 对照标准答案:210 个场景由 pi 官方组件真实生成并录成夹具,Kotlin 侧逐行比对 960 项,CI 里还有"标准答案是否过期"的检查。
2. 会话导航
- 已经在该节点时,给出提示而不是再跳一次;
- 回合进行中要跳转时,先停止当前回合并收回排队消息;
- 摘要被中止后回到树;
editorText只在输入框为空时填入,不覆盖用户正在写的内容。
3. 跨项目新会话:不再多出空会话
改用 SDK 公开的 switchSession(不存在的路径, {cwdOverride}) 开"懒落盘"的新会话,不再预写一个壳文件 —— 修的是"切项目后会话列表多出空会话"。
4. 工具卡的折叠回到 RPC 版
- bash:运行中不再自动露出输出尾部,失败不再自动露原因(都要点开);
- read / write / edit:失败时也要点开才看到正文/提示;
- diff:不再默认展开,回到默认折叠;
- 通用卡(扩展 / MCP 工具)的专属渲染保留不动。
其他改进
- 文件树:收起时给出提示行。
- 宿主:
session.navigate带回aborted,导航结果走真 SDK 并加了测试。 - CI:增加会话树标准答案的新鲜度检查。
版本说明
versionName0.1.8,versionCode8。- 上一个 Release 的包内部仍是
0.1.0;这个包是这一版源码真实构建的,内部版本号就是 0.1.8。两个包同名,因此本次用-2后缀区分。 - 架构未变:
arm64-v8a单 ABI,内含 proot / proroot / tawcroot 三套运行时。
English
Highlights
1. Session tree (/tree) rebuilt against pi
The previous tree was hand-assembled; it is now a rule-by-rule port of pi's official TreeSelectorComponent:
- Five filters: default / user-only / labeled-only / no-tools / all. The default one hides bookkeeping entries (labels, context edits, model changes, thinking-level changes);
usageentries never show; an assistant message with tool calls but no text never shows either (unless it errored, was aborted, or is the current position). - Layout recomputed over the visible tree: children of filtered-out entries attach to their nearest visible ancestor, so a single chain stays in one column and only a branch point adds a level.
- The active branch comes first, the rest in chronological order.
- Folding: only a node with visible children that is either the root or the head of a branch below a fork can fold.
- Search: whitespace-separated terms, all must match; folding is cleared while searching.
- Display and copy: tool results render as a call such as
[read: path]rather than "tool finished"; paths shorten to~/under pi's home; copy uses pi's text. - New setting
treeFilterMode: which filter the tree opens with. - Against a golden answer: 210 scenarios recorded from pi's real component, compared line by line in Kotlin (960 assertions), plus a CI check that the fixtures are still fresh.
2. Session navigation
- Navigating to where you already are reports it instead of moving;
- A jump during a running turn stops that turn first and reclaims queued messages;
- After a summarisation is aborted, the tree is shown again;
editorTextis filled only when the input box is empty.
3. Cross-project new session no longer leaves an empty session
Now uses the SDK's switchSession(nonexistent path, {cwdOverride}) to open a lazily-persisted session instead of pre-writing a shell file — this fixes the extra empty session that appeared after switching projects.
4. Tool-card collapsing is back to the RPC-era behaviour
- bash: no longer auto-reveals the output tail while running, nor the reason on failure (both require expanding);
- read / write / edit: failures also require expanding;
- diff: no longer expanded by default;
- The generic card (extension / MCP tools) keeps its custom rendering.
Other
- File tree: a hint line while collapsed.
- Host:
session.navigatereturnsaborted; navigation results are tested against the real SDK. - CI: a freshness check for the session-tree fixtures.
Version
versionName0.1.8,versionCode8.- The previous release shipped a binary that still reported
0.1.0; this one is built from this source and reports 0.1.8. Same version number, so this release is suffixed-2. - Architecture unchanged:
arm64-v8aonly, with proot / proroot / tawcroot bundled.
0.1.8 — SDK Host 架构升级、三运行时支持与多项功能重构
本次更新围绕底层引擎架构、运行时系统、模型管理、资源管理、会话系统和聊天交互进行了大规模调整。
核心更新
1. SDK Host 架构升级
- 引入独立的 Node.js SDK Host,开始从传统 RPC 通信方式迁移至官方 Pi Coding Agent SDK。
- 新增 Kotlin 宿主客户端,支持命令调用、事件接收、请求响应和会话状态同步。
- 引入 JSONL 通信协议,增加事件序号、会话代号、错误码和状态快照机制。
- 增加 SDK 通用调用接口,为后续接入官方 SDK 能力提供更灵活的扩展方式。
- 重构引擎与扩展之间的交互基础,逐步减少 App 自行实现和维护的重复逻辑。
2. 新增第三种运行时:TAWCROOT
- 运行时选择升级为三选一:PRoot、Proroot、TAWCROOT。
- 新增 TAWCROOT 原生运行时构建与 APK 集成。
- 增加运行时独立探针、组件检查、失败计数和自动回退机制。
- 完善不同运行时的启动参数、目录映射和进程回收逻辑。
- 增加运行时实际生效状态展示。
注意: Proroot 和 TAWCROOT 目前仍属于实验性运行时,具体稳定性可能因设备和系统环境而异。
3. 模型与供应商管理重做
- 重构模型管理页面和供应商配置界面。
- 增加自定义供应商表单。
- 支持供应商名称、认证 Header 和模型费用等配置。
- 改进 OAuth 登录、凭证管理和模型列表刷新。
- 增加跨供应商模型浏览、搜索和选择。
- 增加默认模型设置和思考等级管理。
- 改进模型设置持久化,区分当前会话使用与设为默认。
4. 资源管理中心重做
- 将原有资源管理入口整合为统一资源枢纽。
- 集中管理 Extensions、Skills、Prompt Templates 和 Themes。
- 增加上下文文件和系统提示词管理。
- 重构扩展包安装、卸载、更新和检查更新流程。
- 增加项目级信任状态管理。
- 改进 MCP 服务器管理、连接检测、OAuth 登录和热重载。
- 逐步将资源与扩展管理逻辑迁移至 SDK Host。
5. 会话系统升级
- 新增独立会话库数据层。
- 支持会话搜索、读取、重命名、删除和标签管理。
- 重做会话树界面,采用主干与分支结构。
- 增加会话树过滤、搜索和操作面板。
- 增加摘要选择与停止摘要。
- 改进会话导航和分支管理方式。
6. 聊天与扩展交互升级
- 消息长按统一操作面板,支持复制、选择、引用、分叉、继续、标签和隐藏。
- 增加命令参数提示与补全。
- 增加更多内置命令的原生操作入口。
- 改进模型和思考等级切换交互。
- 增加压缩进行中的状态提示和中止入口。
- 调整工具卡折叠、展开和失败状态的展示。
- 接入 Pi 官方工具执行渲染组件和自定义消息渲染组件。
- 增加扩展会话条目渲染器和 Markdown 转换器支持。
- 改进扩展 UI 与 Android 原生界面的通信。
其他改进
- 项目创建支持直接命名。
- 项目切换列表显示信任状态。
- 文件树支持在对话中引用文件。
- 文件树按规则收起
.git和node_modules。 - 改进工作区与会话切换时的目录同步。
- 优化运行时首次安装和载荷解包流程。
- 增加运行时载荷解包进度显示。
- Node.js 升级至 24.22.1。
- 增加 SDK Host、协议、运行时、模型与资源管理相关的测试和 CI 检查。
说明
本次更新包含较大规模的底层架构迁移。SDK Host 已具备独立宿主、协议、客户端及多项 SDK 能力接入,但部分旧通信代码和服务迁移工作仍在继续。实验性运行时也仍需更多设备验证。
English
This release is a large-scale change across the engine architecture, the runtime system, model management, resource management, sessions, and the chat interface.
Highlights
1. SDK Host architecture
- Introduced a standalone Node.js SDK Host; the app is moving from the legacy RPC transport to the official Pi Coding Agent SDK.
- Added a Kotlin host client that handles command calls, event delivery, request/response and session-state synchronisation.
- Introduced a JSONL protocol with event sequence numbers, session generation, error codes and state snapshots.
- Added a general SDK call path, so new upstream capabilities can be adopted without inventing another bespoke layer.
- Reworked the foundation of the engine↔extension interaction, gradually removing logic the app used to implement and maintain twice.
2. A third runtime: TAWCROOT
- Runtime selection is now three-way: PRoot, Proroot, TAWCROOT.
- Added native TAWCROOT build and APK integration.
- Added per-runtime probes, component checks, failure counting and automatic fallback.
- Completed each runtime's launch arguments, directory mappings and process reaping.
- The settings screen now shows which runtime is actually in effect.
Note: Proroot and TAWCROOT are still experimental runtimes; stability may vary by device and system environment.
3. Model and provider management, rebuilt
- Reworked the model management page and the provider configuration screen.
- Added a custom-provider form.
- Provider name, auth headers and per-model pricing are now configurable.
- Improved OAuth login, credential handling and model-list refresh.
- Added cross-provider model browsing, search and selection.
- Added default-model selection and reasoning-effort management.
- Model settings now persist correctly, distinguishing "use for this session" from "set as default".
4. Resource management, rebuilt
- Consolidated the previous resource entry points into a single hub.
- Extensions, Skills, Prompt Templates and Themes are managed in one place.
- Added context-file and system-prompt management.
- Reworked extension package install, uninstall, update and update-check flows.
- Added project-level trust state.
- Improved MCP server management, connection checks, OAuth login and hot reload.
- Resource and extension management is gradually moving into the SDK Host.
5. Sessions
- Added a standalone session-library data layer.
- Sessions can be searched, read, renamed, deleted and tagged.
- Rebuilt the session tree around a trunk-and-branch structure.
- Added session-tree filtering, search and an actions panel.
- Added summary selection and the ability to stop summarisation.
- Improved session navigation and branch handling.
6. Chat and extension interaction
- Long-press on a message opens one unified actions panel: copy, select, quote, fork, continue, tag, hide.
- Added command-argument hints and completion.
- More built-in commands now have native entry points.
- Improved model and reasoning-effort switching.
- Added an in-progress indicator for compaction, with a way to stop it.
- Adjusted how tool cards collapse, expand and render failures.
- Integrated Pi's official tool-execution renderer and custom message renderer.
- Added an extension session-entry renderer and Markdown converter support.
- Improved the channel between extension UI and the native Android interface.
Other improvements
- Projects can be named at creation time.
- The project switcher shows each project's trust state.
- The file tree can reference a file into the conversation.
- The file tree collapses
.gitandnode_modulesby rule. - Improved directory synchronisation when switching workspace or session.
- Streamlined first-run runtime installation and payload extraction.
- Added progress display for runtime payload extraction.
- Node.js upgraded to 24.22.1.
- Added tests and CI checks covering the SDK Host, protocol, runtimes, models and resource management.
Notes
This update carries a large-scale migration of the underlying architecture. The SDK Host now has its own process, protocol, client and a number of upstream SDK capabilities wired in, but part of the legacy transport code and some services have yet to be migrated. The experimental runtimes also need more device validation.
PI 0.1.7.1(pi 1.5.0)· 真机启动热修
v0.1.7 在真机上启动失败的热修。
引擎 @earendil-works/pi-coding-agent 1.5.0(与 v0.1.7 相同)。
修了什么
v0.1.7 装到真机上,第一次启动解包运行时就会崩:
运行时解包失败
No static method of(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
in class Ljava/nio/file/Path; or its super classes
java.nio.file.Path.of(String, String...) 是 Java 11 才加的方法,Android 的 core-oj.jar 里没有它。compileSdk 37 编译期能过(Kotlin 对着 JDK 签名编译),真机上走到那行就是 NoSuchMethodError;而 minSdk 26 意味着不能依赖它。
三处改成 Paths.get(...)(API 26 起就有,语义相同):
| 位置 | 用途 |
|---|---|
RuntimeProvisioner.createLink |
符号链接的目标路径——解包时每条链接都走这里,所以必崩 |
TarExtractor |
tar 里的符号链接条目 |
RuntimeTreeAudit |
修复 /usr merge 链接 |
加了一道闸
新增 tools/check-android-apis.sh,并在 CI 里跑:Path.of / Files.readString / List.of 这类"编译过、真机炸"的 JDK API,出现即红。
这属于我们自己的疏漏——上一个版本已经在真机上过了「运行时解包」这一关,这次却因为一个不在 Android 里的方法整条链崩掉,所以把检查做成了机械的。
与 v0.1.7 的关系
只改这三处 + 那道检查,其余与 v0.1.7 完全一致:pi 1.5.0、MCP 服务器管理页、设置「全局 / 本项目」两层、工作区与对话列表重排、富渲染。
如果你装 v0.1.7 时卡在「运行时解包失败」,这一版直接覆盖安装即可,不需要先卸载,也不用动「重建运行时」。
构建信息
| 引擎 | @earendil-works/pi-coding-agent 1.5.0 |
| 变体 | sideload28(targetSdk 28,默认选这个) |
| 架构 | arm64 |
| 安装包 | 152,575,592 字节(145.5 MiB) |
| sha256 | bc389edc9c264d5a64eb4261fbf5ab1266101ce569645d3481d47cf49dcff821 |
| 来源 | CI run #642,commit e6dfd1aa |
同一密钥签名,可以覆盖安装,升级不丢数据。
这是 RPC 协议(pi --mode rpc)下的最后一个版本。
PI 0.1.7(pi 1.5.0)· RPC 协议最终版
引擎:@earendil-works/pi-coding-agent 1.5.0(上一包是 1.3.0)。
从 v0.1.6(506d2b70)到这里共 66 笔提交。这一版的主线:引擎跨到 1.5.0、MCP 服务器管理页、设置分「全局 / 本项目」两层、工作区与对话列表重排。
引擎升到 pi 1.5.0
- 上游的信任语义、缩图候选序、LaTeX 表格保护、新设置键全部随包到位
- 契约检查加了设置行逐键对照:设置里的默认值、枚举、最小值全部对着引擎校验,不再靠注释里写的
file:line - 运行时:Termux 侧删掉旧包,
proot与libtalloc一起换到镜像里的现存版本 - 许可证清单按 pi 1.5.0 与 proot / talloc 新版本重新生成
MCP 服务器管理页
以前只能手改 mcp.json,现在有页面:
- 点选编辑:表单覆盖
command/args/env/cwd,以及url/headers/ 令牌 / OAuth 的全部子项、exposure/toolExposure、timeout、description - 全局 / 本项目两级:项目内可以覆盖全局服务器的启用状态;
autoEnableCodemode开关 - 连接检查与状态:每台服务器的连接状态、工具列表、错误信息都在编辑页里
- App 内 OAuth 登录(含登录按钮与取消)
- 模板与粘贴导入:常用模板,以及从 Claude / Cursor / VS Code / OpenCode 的配置转换
- 读写是纯逻辑 + 原子写:保留未知键,损坏的文件不会被覆盖
设置:全局 / 本项目 两层
- 分组页顶部有了切换;项目视图只列可覆盖的行
- 全局视图下被项目覆盖的行标「· 本项目」
- 显式写入、覆盖标记、恢复继承
- 全局独有键单独成名单,用
pi-contract守着,不会漂
设置分组重排
按 pi 自己的分区重排:网络并入重试,会话并入对话,首页分四段;首页加搜索。
模型页
- 导入改成三步(厂商 / 连接 / 模型),概览三格数字
- 「新建自定义厂商」链路补齐:可命名、可重复添加、按名字生成不冲突的 id
- 模型能力编辑表单可滚动、按组两列、非法数字直接禁用保存、底部固定实心保存按钮
- 重启卡改成醒目横幅;订阅账号移到厂商之后并显示已登录数
工作区重排
- 主屏:路径条合并芯片与面包屑、工具行(筛选 / 排序 / 实心新建)、文件行带相对时间与大小、最近改动细条
- 文件列表排序:名称 / 最近修改 / 大小 / 类型,目录始终在前,默认按最近修改
- 路径条
↑改成上层目录菜单,一次点开直达任意上层直到根 - 编辑器:撤销重做、键盘辅助行、自动缩进、查找 / 行号 / 换行开关;HTML 文件可进编辑态,空 HTML 给提示而不是白屏
- 新建工作区时直接起名,建好后回到切换面板
- 圆角统一成三档:小 8 / 中 12 / 胶囊
对话列表
- 去掉整块卡片,行直接铺在页面上,当前会话用圆角淡底点亮
- 组标题可折叠、带文件夹图标与计数药丸,标出当前工作区
- 长按加「重命名」
- 多数模型不再逐行重复,时间并入第二行
消息与卡片
- 消息类卡统一成身份药丸标题:扩展消息、技能、压缩(状态着色)、分支摘要
- 错误卡压成一行标题加三行正文
- 思考卡:展开箭头、思考中笔画呼吸、展开后正文左侧竖线;
thinking_end就收口并记时,不再等整条消息结束
Mermaid
- 画布高度一次算死、离屏图层裁剪(图不再画出卡片、盖住标题)、高度上限跟屏幕走
- 留白随图大小放大,允许缩到 0.5×,缩放与平移边界分开
其他
- 资源:用 pi 自己的包管理器给清单与逐条开关,不再靠 App 自己解析
- 扩展包页:信任选项直接摆出来点选(含「忘掉记录」),顺序改成 信任 → 已装 → 安装 → 引擎
- 发图:缩略图一排可横滑,缩放改分步减半,去掉旁边的说明文字
- README 重写:先说是什么与亮点,安装与常见问题前置,架构 / 升级 / 编译折叠
构建信息
| 引擎 | @earendil-works/pi-coding-agent 1.5.0 |
| 变体 | sideload28(targetSdk 28,默认选这个) |
| 架构 | arm64 |
| 安装包 | 152,575,532 字节(145.5 MiB) |
| sha256 | 29bda27c288c09516dd336c22b59f3e3bc96040ad0ab25cf17f01d84a5121639 |
| 来源 | CI run #623,commit 00fe3958 |
同一密钥签名,可以覆盖安装,升级不丢数据。
这是 RPC 协议(pi --mode rpc)下的最后一版。 下一个大版本换成官方 SDK 自建宿主,界面会整体重做。
PI 0.1.6(pi 1.3.0)· 富渲染
引擎:@earendil-works/pi-coding-agent 1.3.0(与上一包相同)。
从 v0.1.5 到这里共 99 笔提交。这一版是一个大功能:富渲染。代码块不再只是等宽文字——Mermaid、公式、JSON/XML/YAML 树、CSV、堆栈、HTML、SVG、动图都能画出来。
富渲染
聊天里的围栏代码块按内容分派到对应的渲染器,源码随时可切回来看。
Mermaid 图表。 在离屏 WebView 里跑 mermaid 12.2.0,输出 SVG 经清洗后由 AndroidSVG 画成矢量图,可 1×–8× 缩放。共享一个宿主、串行有界队列、同 cacheKey 合并请求、LRU 缓存、超时后重建,渲染进程被杀也不带崩 App。旧版的 ASCII 降级路径保留为运行时回退。
数学公式。 MathJax 真排版,显示式与行内式都走它。渲染结果 LRU 缓存、状态可保存、占位固定高度——不会因为公式落笔而跳版。
JSON / XML / YAML 树。 后台解析并缓存,整行点击展开,缩进参考线,子节点分页,深层缩进封顶保证深嵌套仍有内容宽度。展开状态可保存,不随流式重置。
CSV / TSV 表格。 RFC 4180 解析(引号、字段内换行、CRLF 全认),表头冻结、横滑、数值列右对齐、隔行淡底、单元格可复制。
堆栈跟踪。 识别常见语言格式,函数名可换行,库帧调淡,消息可展开,分页。
安全 HTML 块。 jsoup 解析 + 白名单重建:危险标签整棵子树丢弃、URL 协议校验、三层上限。流式、拒绝或超限时原样回退源码。<details> 状态可保存,<hr> 变淡,引用去掉合成斜体。
SVG。 独立围栏、HTML 里夹的 <svg>、以及裸 SVG 链接都交给 SVG 渲染器;动画 SVG(SMIL / CSS)可播放。
脚注与链接卡片。 脚注保留未引用的定义;链接渲染成卡片,长按复制,流式末段不画卡片。
围栏别名与内容嗅探。 mmd / latex / geojson / rss 等别名认了;没标语言的块按内容猜 svg / xml / mermaid / json。
公共卡片语言
所有富内容共用一套卡片:胶囊标题 + 复制图标 + 右上角 ⋮ 菜单,统一的卡片头、分隔线、折叠条、状态位。工具栏不再摊在正文里,低频动作收进 ⋮。树与 CSV 的「源码 ↔ 视图」切换也并入卡片头。
动图与媒体
- URL 动图(GIF / WebP / APNG)与动画 SVG 可播放,随生命周期暂停,限制并发
- 图片查看器支持动图播放与 SVG 打开
- 音频、视频链接渲染成播放卡片
- 远程图片带常规 UA 与 Accept,手动跟跳转(含 http→https),认 SVG 与 AVIF 并栅格化
- 图片加载失败时用共用卡片占位(破图图标 + alt + 缩短来源,点按复制地址),Markdown 与 HTML 一致
流式光标
回复生成时 ▍ 光标接在 Markdown 末尾,紧跟最后一个字,不占布局宽度。
排版重做
舒适档重做为母版 16/27,紧凑 15/25、宽松 17/28 按同一组比例推出;标题行高固定按比例走,不再随行距档时变时不变。
- 用户气泡右对齐、贴内容宽度(非经典档)——单行短句不再撑满整行
- 标题贴近正文,代码块上下对称,表格圆角与内边距统一
- 代码块边线 100% → 28% 并铺 6% 同色淡底;分割线 100% → 35%;行内代码加 14% 淡底;h1 去掉下划线(金色 + 下划线像链接)
- 思考块与引用去掉伪斜体(中文斜体是假斜体)
- 经典档全部保持原样
阅读字体瘦身
从官方 SourceHanSerifCN 可变字体(25 MB,APK 内约 15 MB)裁出 wght 450 / 600 两个静态 TTF,裁到 GB2312 + 常用符号(约 7700 字形),每个 3.0 MB,合计 6.1 MB。
- 正文 400 → 450:深色背景下宋体细笔画在 16sp 偏虚,450 更接近原来系统字体的密度
- 粗体落在真实 600
- 字体内部名改为 Pi Reading Serif(OFL 要求修改版不得保留 Reserved Font Name),版权与许可声明原样保留
- 生成脚本入库
tools/build-prose-font.py,字体加入noCompress以便平台 mmap,只有实际绘制到的字形页驻留内存
工作区认领
点开别的工作区的会话时,App 认领那个工作区,不重启引擎——以前这一下会打断正在跑的那一轮。
编辑安全
工作区里的文件编辑补上了一整套保护:
- 只读门槛、读原文、保留换行
- 冲突检测:文件被别人改过就不覆盖
- 原子写
- 草稿恢复
- 删除不跟随符号链接
模型页
- 自定义厂商可以建任意多个,按名字生成不冲突的 id
- 已配置的厂商可以再换
- 文件里已有的自建厂商也出现在选择列表里
- 订阅账号挪到厂商卡后面,并显示已登录数
- 对话页选模型按厂商分段
- 导入表单里自建厂商的名称框与 Base URL 提到 Key 前面
构建信息
| 引擎 | @earendil-works/pi-coding-agent 1.3.0(未变) |
| 变体 | sideload28(targetSdk 28,默认选这个) |
| 架构 | arm64 |
| 安装包 | 151,709,389 字节(144.7 MiB) |
| sha256 | 3fb62942643a767393151f1c1dd7380b0308fb10cdeb9ea7a356512196a269ee |
| 来源 | CI run #608,commit 506d2b70 |
同一密钥签名,可以覆盖安装,升级不丢数据。
这一版新增了 Mermaid / MathJax / AndroidSVG / jsoup / SnakeYAML 五个依赖,许可证清单已同步。