Repository navigation
Conversation
limityan
force-pushed
the
yanzhn/embedded-tui-direct-runtime
branch
3 times, most recently
from
August 14, 2026 22:14
6289bf3 to
53eabca
Compare
Replace the in-process App Server detour with owner-scoped direct and shared runtime adapters, preserve typed restore and side-effect contracts, and remove obsolete management wiring.
limityan
force-pushed
the
yanzhn/embedded-tui-direct-runtime
branch
from
August 15, 2026 01:39
53eabca to
19e8996
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
交付 Embedded TUI direct-runtime Phase 5 的实现切换:同进程 CLI 不再启动 AppServer、ACP channel 和第二套 Tokio runtime,而是通过唯一的
CliAgentRuntimeClient调用 Agent Runtime owner;Shared TUI 继续使用私有 Runtime IPC,Web/远程 AppServer 保持独立 transport 边界。主要变化:
EmbeddedAppServerHost、AppServerTuiBackend、SharedTuiBackend与三个 AppServer 直接依赖。TuiRuntimePort::{Embedded, Shared};管理面按 Model/Registry/MCP/Account/Worktree/Hook/External Source 等真实 owner 注入,不新增总括式 management port。OutcomeUnknown、processing restore、Pending UserInput ready/resolved、late attach、同 tool id 多 registration 和事件因果顺序等 fail-closed 合同。这里的“Phase 5 已交付”指实现路径已经切换并删除旧 CLI AppServer detour;统一 Direct/Shared 行为 fixture、启动/延迟/内存基准与跨版本升级证据仍是后续验收项,不在本 PR 中虚报完成。
架构与兼容性
app/initialize,不兼容连接结构化拒绝且不进入业务/事件通道。initial_sync与workspace_info广告answer_question_identity_v1;新客户端对旧 Host 本地阻断,旧客户端对新 Host 获得upgrade_required错误与恢复提示;禁止退回仅按tool_id路由。Embedded 与 Shared 共享 Runtime owner 行为,但不共享 transport 生命周期。Web AppServer 没有被改造成 CLI 内部总线,也没有引入第二套 Runtime owner。
对抗性复审中修复的问题
request_idat-least-once 去重并 fail closed。UserInputResolved精确终结对应 registration,并通过 additive capability 安全升级。OutcomeUnknown,9 MiB fork 响应测试证明不允许同连接重放。依赖闭包
统计口径:
bitfun-cli --no-default-features的 normal + build 依赖,按name@version规范化去重;基线为本 PR 的main父提交。Cargo.lockpackage 数:1159 → 1159。pnpm-lock.yaml只为 Mobile Web 测试 importer 复用仓库已有 Vitest resolution,没有新增解析 package。验证
pnpm run check:core-boundariespnpm run check:repo-hygienepnpm run check:github-config:14/14cargo metadata --locked --offline --no-deps --format-version 1pnpm run type-check:web;pnpm run i18n:auditagent_kernel+ 3 round-trip + 1 doctestcargo check -p bitfun-cli --bin bitfun --no-default-featurescargo check -p bitfun-server --bin bitfun-serverpnpm run harmony:architecture39dd824e,架构、行为、范围/CI 三路均无 P0–P3;最终闭合了 Remote settled identity 与 Harmony 同 tool id 多 registration 的终态合并交错。验证边界
pnpm run harmony:architecture作为已通过证据,不宣称平台编译已验证。.github/workflows/ci.yml仅在既有 Frontend Build job 增加pnpm --dir src/mobile-web test,没有新增 job;docs/superpowers/**无改动。