Skip to content

fix: stabilize ACP Harness chat in 0.5.8.16 - #503

Open
wuzw21 wants to merge 66 commits into
mainfrom
codex/release-0.5.8.16
Open

fix: stabilize ACP Harness chat in 0.5.8.16#503
wuzw21 wants to merge 66 commits into
mainfrom
codex/release-0.5.8.16

Conversation

@wuzw21

@wuzw21 wuzw21 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

结论

这是关闭 PR #502 后,基于 0.5.8.16 分支整理的完整 PR。保留统一 ACP 主路和现有卡片 Widget,不恢复小万私有协议;所有 Harness 在提供对应 ACP 信息时共享同一套卡片、时间线和页脚表现。

ACP 标准事件与卡片恢复

  • 在唯一的 ACP 投影层完成标准事件到现有卡片模型的转换,不增加 CC、小万、DSH 等 Harness 品牌分支。
  • 完整保留 ACP ContentBlock 的 text、image、audio、resource_link、resource 结构,不再把图片等内容降级为空文本。
  • 标准 tool content 的 image、terminal、diff 进入现有图片、终端和文件 Diff 卡;保留 content 与 _meta,稀疏更新仍合并到同一 toolCallId 卡片。
  • 按 ACP v2 原样转发 plan_update、plan_removed 和 plan id,继续复用原有计划卡,并能正确移除结束的计划。
  • 从标准 PromptResponse.usage 恢复单轮 ctx、输入、输出、cache 与 total token 页脚;标准 usage_update 继续负责会话上下文占用。
  • _meta、结构化 rawInput/rawOutput、reasoning、重试、恢复、压缩、权限、产物和终端字段继续走统一 reducer 与原有卡片。
  • 修复最终 token 用量晚于 turn/completed 到达时被丢弃的问题,并绑定到该 turn 最后一条 assistant message,避免空消息或跨会话串卡。

聊天表现

  • 恢复旧小万历史的已处理/复盘入口,旧正文重新并入原有思考和工具过程。
  • 持久化 ctx、输入、输出、cache 用量以及上下文压缩标记。
  • 去掉回答中间重复的 artifact 卡片,保留输入框活动提示和下方工具/产物卡。
  • 保持 Markdown 空格、换行、标题、列表和代码块的流式排版。
  • 保留 Harness 头像、思考时序、工具顺序、历史恢复和错误展示。

Harness 与运行时

  • 支持不同 conversation 的 ACP turn 并发运行,同一 conversation 保持单 turn 归属。
  • 安装其他托管 Harness 时不再断开当前聊天的 ACP runtime。
  • 修复 Android GUI 点击时长和延迟页面变化下的稳定等待。
  • Android 版本保持 versionName 0.5.8.16、versionCode 6。

main 冲突处理

截至 merge commit 98972cb,已人工逐块解决当时 main 的 5 个文本冲突及 1 个自动合并语义重复:

  • 吸收欢迎页路由守卫和启动账户提示的路由监听。
  • 保留 0.5.8.16 的 Harness 后台安装状态和 Provider 模型选择逻辑。
  • 不恢复已移除的旧终端初始化提示和插件 Dashboard/App 路由。
  • 合并并去重插件市场测试。
  • 清理重复的 official model catalog 方法。

main 此后又新增了 2 个提交;按当前要求暂不再次合并,因此 GitHub 暂时显示冲突,避免未经人工审查覆盖本分支的 0.5.8.16 功能。

验证

  • ACP reducer:117 tests passed。
  • ACP coordinator:15 tests passed;timeline:23 tests passed。
  • 消息页脚 Widget:5 tests passed。
  • AcpSessionUpdateMapperTest 与 LocalAcpRuntimeTest:passed。
  • 既有冲突、路由、插件市场、模型设置、历史和 Android GUI 测试继续保留。
  • Dart analyze:无 error(仓库既有 warning/info 未作为本次范围修改)。
  • assembleDevelopStandardDebug:BUILD SUCCESSFUL。
  • APK:0.5.8.16 (6)。

OpenAI Responses 工具名兼容

  • 修复旧 ACP/Codex/MCP 工具名(如 agent.statusagent/status)进入 Responses 历史 input[].name 后违反 ^[a-zA-Z0-9_-]+$、导致 turn/failed 的问题。
  • 在 Responses 网络边界对历史 function_call、当前 tools 和 tool_choice 使用同一套稳定、64 字符内、碰撞安全的 wire 名。
  • Provider 返回工具调用后恢复原 ACP 工具名,再进入既有工具路由和卡片层;合法工具名保持不变,不迁移历史数据。
  • 新增第 5 个历史 input 精确回归、请求/响应往返、非法字符、中文、超长和碰撞测试;HttpControllerResponsesTest、HttpAgentLlmClientTest 和 codec 测试全部通过。
  • 修复版 APK 已构建并覆盖安装到真机,保留 0.5.8.16 (6) 与现有应用数据。

ACP 思考交错时间线

  • 解除“一轮只允许一张思考卡”的聚合限制,改为“一段连续 reasoning 一张卡”。
  • 连续 reasoning chunks 仍合并;工具或最终正文会结束当前段,后续 reasoning 创建新卡,恢复 思考 1 → 工具 1 → 思考 2 → 工具 2 → 输出 的真实 ACP 到达顺序。
  • 优先使用 ACP reasoning itemId/messageId 作为卡片身份;Harness 未提供 messageId 时,使用稳定的 segment-2/3 后缀,避免重新打开已完成卡片。
  • 每段思考独立保留开始/结束时间、loading/完成状态和折叠状态;实现位于共享 ACP reducer,DSH、小万及其他 Harness 共用,无品牌分支。
  • 新增双工具交错、缺失 messageId 和 DSH 协调器回归;相关 reducer、timeline、coordinator 共 155 项测试通过。

思考卡默认折叠

  • 恢复统一前端旧有的紧凑展示:运行结束后以及重新展开“已处理”运行组时,每段已完成思考默认保持折叠,不再一次展开整轮全部推理。
  • 保留 思考 → 工具 → 思考 → 输出 的交错时间线;折叠只影响显示状态,不改变 ACP 事件顺序、卡片身份或历史恢复。
  • 每段思考可独立点击展开/折叠,工具、过程正文和最终回答继续直接可见。
  • 相关 reducer、timeline、聊天 Widget 共 195 项测试通过;开发版 APK 构建成功并覆盖安装到真机 0.5.8.16 (6)。

wuzw21 and others added 30 commits August 17, 2026 15:28
* Fix Responses assistant content type

* Fix WebChat heterogeneous JSON responses

---------

Co-authored-by: 刘松源 <liusongyuan@liusongyuandeMacBook-Pro-4.local>
- 在README和README.zh-CN.md中将微信群二维码链接指向新的公共URL
- 添加社区二维码上传和替换功能到admin控制台界面
- 实现GET/HEAD /community/wechat-qr端点提供永久公共图像URL
- 实现GET/PUT /admin/community/wechat-qr端点用于管理二维码图像
- 支持JPEG、PNG、WebP格式,最大5MB文件大小限制
- 添加ETag缓存控制和内容类型检测功能
- 更新admin UI添加社群二维码管理页面和相关样式
- 添加相应的测试用例验证功能正常工作
- 添加全屏触摸穿透彩虹光晕并适配系统栏与真实屏幕圆角
- 为点击、长按和滑动增加坐标动画与系统触觉反馈
- 同步截图、暂停和任务结束时的反馈窗口生命周期
* feat: host agent tasks in unified task runtime

* feat: make task runtime durable across process restarts

* fix: stop gui on display off and recover agent runtime

* feat: expose mobile capabilities to agent harnesses

* feat: unify agents on official ACP runtime

* fix: treat Xiaowan as built-in default agent

* fix: restore Xiaowan ACP streaming and deduplicate agent

* refactor official ACP provider adapters

* fix ACP provider mapping and model visibility

* hide private plugin tools from ACP MCP surface

* enable official DSH skill discovery on Android

* fix onboarding model discovery

* fix ACP agent lifecycle and streamed turn completion

* fix startup crash and preserve default model

* fix mobile DSH official filesystem runtime

* fix empty provider and agent pages

* use official DSH project skill layout

* install the official Claude ACP adapter

* prevent MCP port conflicts from crashing startup

* persist official ACP events and recover MCP startup

* isolate ACP output by official turn

* map shared provider into official OpenCode and Claude config

* add normal-package device validation build

* fix: align ACP models with active provider

* fix: select shared provider for device agents

* fix: map Claude ACP to official DashScope endpoint

* fix: keep startup and provider models available

* fix: include ACP session compatibility boundary

* fix: unify Xiaowan with ACP agent selection

* fix: use official DSH model catalog and MCP agent menu

* fix: align ACP workspace and Xiaowan fallback

* fix: preserve concurrent Xiaowan ACP stream events

* fix: make VLM and OmniFlow phone control opt in

* fix: install OmniFlow runtime without enabling VLM tools

* fix: keep gated VLM entry visible

* fix: allow LLMTHU bootstrap in device debug

* fix: unify ACP provider model routing

* refactor: complete ACP agent migration

* feat: enable VLM plugin by default

* fix: keep first chat message during bootstrap

* fix: implement resident OOB observation stabilization

* refactor: unify ACP runtime and remove legacy agent paths

* fix: stabilize ACP harness lifecycle and model adapters

* fix: ignore stale agent switch targets

* fix: install complete DSH CLI at runtime

* fix: unify Provider model catalog and release 0.5.8.5

* chore: prepare release 0.5.8.6

* fix: include DSH plugin manager in release source

* fix: restore ACP and plugin runtime lifecycle

* refactor: run native capabilities without internal MCP

* fix: guard agent switches on provider readiness

* test: align closed stream completion contract
- 根据真机屏幕轮廓裁剪返回页面,并完善全宽滑动、视差和遮罩效果
- 让手势进度跟随触摸,使用临界阻尼弹簧完成提交与取消动画
- 新增屏幕圆角通道及相关原生和 Flutter 测试
- 在手势结束和路由销毁时可靠释放 Navigator 手势状态
- 使用轻量遮罩替代全页透明度合成,并补充交互回归测试
- 根页面按页内状态动态交还系统返回手势,保留引导、模型选择器和工作区返回处理
- 后台异步完成会话并移除手动退后台通道,避免阻断系统动画
perf(back): 优化预测性返回动画并提升流畅度
feat(omniflow): 增加 GUI Agent 操作反馈 UI
- 替换启动画面背景颜色从深色(#151617)改为浅色(#F4F7FB)
- 添加深色主题专用的启动图标资源文件
- 更新Android 12+启动屏幕API配置以支持浅色主题
- 调整状态栏和导航栏的明暗模式设置
- 更新应用图标背景颜色适配浅色主题
- 移除启动画面中的居中图标布局配置
- 在代理模式设置页面中,使用 SettingsDetailSheet 替换 AlertDialog
- 在账户生命周期管理中,使用设置详情弹窗替换会话撤销确认对话框
- 将宠物悬浮窗权限提示组件重构为无状态组件,并复用权限提示卡片
- 在手动录制权限守护中,使用统一的权限提示弹窗组件替代原有的导航跳转方式
- 在设置页面中使用设置详情弹窗显示 MCP 信息
- 移除PluginDetailPage中阻止返回的手势控制,因为路由已使用
  PredictiveBackGestureWrapper,需要保持可返回状态以支持Android系统手
  势交互

- 修改PluginMarketPage中的数据刷新逻辑,当通过系统返回手势退出详情页
  时也会触发数据刷新,确保详情页的变更能够正确显示

- 更新测试用例以验证预测性返回手势功能和系统返回时的数据刷新机制
- 移除了agent_mode_setting_page中多余的完成按钮
- 调整了settings_detail_sheet组件的布局结构,使用SizedBox包装SafeArea
- 添加了footer区域的支持,并调整了间距布局
- 更新测试用例,移除对完成按钮的查找断言
- 修改测试点击方式,从点击文本改为点击指定位置
* chore: bump Android release version to 0.5.8.10

* adapt official dsh reasoning to shared acp ui

* fix one-click harness and omniflow installation

* fix omniflow observation state contract

* fix official omniflow function enhancement

* fix harness switch provider binding fallback

* fix: package verified OmniFlow runtime update

* fix: complete ACP and local OmniFlow enhancement flow

* fix: synchronize Flutter dependency lockfile

* fix: include ACP harness adapter sources
wuzw21 added 30 commits August 23, 2026 14:14
Project Xiaowan-specific presentation metadata and standard ACP content into the existing shared card routes. Preserve interleaved reasoning, usage, retries, resources, images, artifacts, and tool output across Harnesses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants