Files
2026-10-21 12:51:49 +08:00

23 KiB
Raw Permalink Blame History

Lime Coding Workbench 路线图

状态:active 更新时间:2026-10-21

Current 对齐修订:Codex Desktop 的执行状态由 canonical timeline、Summary 和后台终端入口承接。旧 Outputs/Logs/Recovery 面板、任务进展页头和专用 metadata 已从产品主链清退;本页中出现的旧名只允许作为历史证据,不能作为 current owner 或恢复依据。 范围:Lime 在 Agent Workbench 标准下的编程能力、执行运行时、文件/命令/补丁工具、前端 Coding Workbench 渲染与验收。

主目标

把 Lime 的编程能力收敛成 Agent Workbench 标准下的一个 coding profile,而不是新增第二套 runtime、第二套聊天入口或第二套 CLI 主链。

固定主链:

User coding intent
  -> App Server JSON-RPC
  -> RuntimeCore thread / turn / task / action facts
  -> ExecutionBackend coding tools
  -> RuntimeEvent / ThreadReadModel / TaskSnapshot
  -> AgentUI projection
  -> Coding Workbench UI

外部参考只能提供实现素材和结构经验。进入 Lime 后,事实源、命名、协议、Provider、UI 投影和验证都必须服从 Lime current 架构。

标准事实源

层 current 事实源 禁止方向
标准 /Users/coso/Documents/dev/ai/limecloud/lime-agent-workbench 把外部 SDK 或 CLI 协议当 Lime 标准。
Runtime API App Server JSON-RPC + RuntimeCore 恢复 legacy desktop facade 或产品页本地 runtime。
执行 ExecutionBackend + Tool inventory + Policy service 让模型自由拼 shell 作为长期主路径。
Provider API Key Provider / Provider Store / Model Registry 单 Provider 假设或产品应用直连模型 API。
UI AgentUI projection + shared Coding Workbench surfaces 从 assistant prose 推断工具、文件、审批、测试状态。
证据 Evidence pack / replay / review refs UI 或日志后处理重新构造运行事实。

用户闭环

目标用户用自然语言让 Lime 创建、修改、测试、审阅或解释代码项目。

最小闭环:

  1. 用户提交编程意图。
  2. Runtime 选择 coding profile 与模型槽位。
  3. Agent 读取上下文、执行文件/命令/补丁工具。
  4. UI 实时展示计划、工具、文件变更、Summary、审批和预览。
  5. 用户审批、拒绝、继续修复或审阅变更。
  6. Artifact / Evidence 可导出和回放。

完成标准不是“模型能改文件”,而是用户能在同一个工作台里看到:当前在做什么、改了哪些文件、Summary 中的命令事实如何、哪里被权限拦住、下一步如何继续。

current / compat / deprecated / dead

current

  • Agent Workbench 标准下的 coding profile。
  • App Server agentSession/* current 主链。
  • RuntimeCore session / thread / turn / task / action / event facts。
  • ExecutionBackend 的文件、命令、补丁、测试、搜索、MCP、浏览器执行面。
  • RuntimeEvent / ThreadReadModel / TaskSnapshot / EvidencePack。
  • @limecloud/agent-ui-contracts、@limecloud/agent-runtime-projection、@limecloud/agent-runtime-ui、@limecloud/agent-runtime-client。
  • Coding Workbench 只消费 AgentUI projection state。

compat

  • 旧 code_orchestrated 只作为历史 session、偏好或旧命令包的 compat 输入;进入 current 前必须在单一 compat helper 归一为 react,并由 RuntimeEvent / ReadModel 承接,不得再作为 coding profile current 入口。
  • 外部 CLI agent 会话可作为 external_harness adapter,但只能输出 RuntimeEvent,不能拥有主事实。
  • 现有 Workspace / Harness 局部状态可短期作为迁移缓存;接入标准 projection 后必须退出。

退出条件:同一状态能从 RuntimeEvent + ReadModel 重建后,删除本地缓存或只保留 UI collapse/focus/draft。

deprecated

  • 编程 UI 自建过程状态机。
  • 从正文推断文件变更、工具结果、测试成功、审批完成。
  • 产品页直接读取 Provider key 或环境变量。
  • 把 CLI 当成模型规划层或长期执行入口。
  • 为编程能力新增一组平行命令协议。

dead

  • 恢复 lime-rs/src/** 或旧 Tauri command wrapper。
  • 新增第二套 app-server、第二套 Provider store、第二套 artifact/evidence truth。
  • mock runtime 作为生产 fallback。
  • 无 session/thread/turn/action/tool correlation 的编程事件。

文档索引

文档 作用
architecture.md Coding profile 的运行时、工具、Provider、UI 和证据架构。
ui-projection.md 前端 Coding Workbench 如何消费 AgentUI projection。
runtime-capability-map.md 外部参考能力到 Lime current 落点的迁移分类。
upstream-gap-review.md 对照上游 coding 执行 / 沙箱 / 审批能力后的高价值遗漏。
implementation-plan.md 分阶段落地计划、验收和测试入口。
reference-boundary.md 参考外部实现时的命名、许可、复制和禁止边界。

全量完成口径

本路线图不以 MVP 为完成口径。全量完成必须同时满足:

  1. Runtime 完整:coding turn 的 profile、model slot、tool inventory、policy、sandbox、approval、file/patch/command/test facts 都由 App Server / RuntimeCore current 主链产生。
  2. 执行完整:文件读取/写入、补丁应用、命令执行、测试执行、搜索上下文、MCP / browser 工具都通过 ExecutionBackend owner 执行,失败结构化。
  3. 投影完整:@limecloud/agent-ui-contracts 和 @limecloud/agent-runtime-projection 能从 RuntimeEvent / ReadModel 派生 CodingWorkbenchView,不从 assistant 正文推断状态。
  4. UI 完整:Coding Workbench 的预览、文件、变更、Summary、审批、诊断都消费标准 projection;旧 thread item 只能停留在历史消息展示、历史 fixture 或负向守卫中,checkpoint 只能作为 current read model / artifact owner 的历史数据来源。
  5. 多模型完整:coding/review/fast/local 等模型槽位走 Provider Store / Model Registry,不绑定单供应商或单协议。
  6. 证据完整:conformance fixture、GUI smoke、Evidence Pack、hydration repair、失败恢复和 replay 都可机械验证。
  7. 治理完整:旧 code_orchestrated、Workspace / Harness 局部状态、正文推断和生产 mock fallback 都有 current / compat / deprecated / dead 分类与退出条件。

不完整即不完成

以下任一项缺失,都不能宣称 coding 主线已完成:

  • 只有文档或 fixture,没有 App Server / RuntimeCore 真实事件 emission。
  • 只有 RuntimeEvent,没有 ExecutionBackend 真实 file/patch/command/test 副作用 owner。
  • 只有 change view 迁移,Summary、审批、诊断仍由旧 thread item 直驱。
  • 只有单 Provider 或本地 key 配置,未接 Provider Store / Model Registry / model slots。
  • 只有单测,没有 GUI smoke 或可交互 fixture 证明。
  • 外部 CLI / harness 是生产必需路径。
  • 生产路径依赖 mock fallback。

主线优先级

当前最值得推进的主问题按优先级排序:

  1. 真实事件产生:App Server / RuntimeCore current crates 产生 file.changed、patch.*、command.*、test.*、sandbox.blocked、action.*。
  2. 执行工具 owner:ExecutionBackend file / patch / command / test / search / browser / MCP 子域落地,并接 policy / output refs。
  3. UI 完整投影:changeView / summaryView 从 CodingWorkbenchView 派生,审批和诊断复用 canonical owner。
  4. 多模型 slot:coding/review/fast/local 槽位接 Provider Store / Model Registry,未配置时结构化 blocked。
  5. GUI 证据闭环:coding fixture smoke 能看到变更、Summary、审批、阻断、失败继续和 hydrate。

清理旧实现只能服务以上主线;如果清理不能直接推进这些项,先登记,不抢主线。

当前落地状态

区域 当前状态 下一步
Runtime 模块化 lime-rs/crates/app-server/src/runtime.rs 已从巨型中心文件拆成 facade + runtime/** 领域模块,当前约 527 行;RuntimeCore 根文件只保留核心类型、构造、共享状态和模块出口。runtime/app_data.rs 已 facade 化为组合 trait,LocalAppDataSource 根文件约 420 行,领域 impl 下沉到 local_data_source/impls/**。Gateway channel 已接入 RuntimeGatewayAgentRunner,Telegram / Feishu / Discord / WeChat 入站消息走 App Server current RuntimeCore::start_turn;旧 agent_state 字段已从 LocalAppDataSource 移除。 继续把新增后端能力落到对应 runtime/<domain>.rs、runtime/app_data/<domain>.rs 或 local_data_source/impls/<domain>.rs,不得回填 runtime.rs;后续清理 gateway crate 的历史 warning 与 AppServer 未用 runtime_arc helper。
合约 fixture coding-file-change、coding-command-approval、coding-sandbox-blocked、coding-patch-failure、coding-test-failure-fix、coding-hydration-repair 已进入 conformance;expected.coding、sequence gate、output / checkpoint snapshot refs、active command/test/action hydrate 与 RuntimeEvent/thread_read projection 已形成 P7 baseline。旧 Evidence Pack provider/summary 不属于 current 验收。 新增 coding fact、provider routing 或 policy/sandbox 语义时继续扩 fixture;不再把 baseline GUI smoke 当未完成 blocker。
sequence gate 已扩展到 patch / command / test / action lifecycle,并能把 action.resolved 从历史 action.required 回填到对应 tool;终态 turn 后继续追加 execution stream 会 fail closed。 后续只随新增 lifecycle fact 扩展,不再为旧 thread item 兼容新增旁路。
projection CodingWorkbenchView selector 已合并 RuntimeEvent 与 thread_read.commands/tests/pending_requests/changeSummary/model_routing,输出 active command/test/action、变更摘要、diagnostics 与 routing facts;session overview、Summary、action submit 和 diagnostics 均从同一 projection 派生。 继续守住旧 thread item 不回流;新增 UI fact 先进入 RuntimeEvent / read model / projection,再进入组件。
Workspace UI Coding mode 继续作为 current Workbench surface;变更、Summary、审批、诊断、失败继续、provider 设置深链、执行策略恢复和 session overview 均已消费 CodingWorkbenchView 或 current reliability/routing evidence;smoke:code-artifact-workbench-electron-fixture -- --scenario gui-coding-input 已证明 GUI 输入到 changes / Summary / canonical timeline metadata 的 current 闭环。 新增可见状态继续保持 projection-only;新增 coding fact 必须先进入 RuntimeEvent / read model / projection。
ExecutionBackend P2 已把 canonical command/test 收敛到 unified exec + RuntimeToolExecutionAttempt + App Server ExecutionProcessServer,共享 policy/sandbox、process snapshot、stdin/control、terminal lifecycle 与 Thread/Turn/Item projection。P2-A 的 BoundedProcessOutput 已覆盖本地 pipe、PTY、Seatbelt、Bubblewrap、Windows restricted runner 和远端 Environment:默认保留 1 MiB head/latest tail、精确记录 omitted bytes、插入 omission marker;64-slot broadcast、UTF-8 scalar framing、unified exec bounded observation 与逐进程 replay 均由 current owner 承接。Windows runner schema v3 7/7 是历史平台 evidence,当前 SHA 的 Windows 大输出仍待真机复验。 P2-A/P2-B current owner 已闭环;下一刀直接进入 Pier/DeepSWE verifier 与正式 distribution evidence。外部 Agent host 只在真实 adapter 出现时消费既有 capability,不得伪造 registry 或绕过 policy/sandbox。
多模型 slot P5 已进入 App Server current routing facts:base/coding/review/fast/local slot 解析、Provider Store readiness、Model Registry metadata、thread_read.model_routing、Reliability routing card 与五语言诊断文案已接通;未配置 provider 会结构化 needs_setup / blocked,不降级 mock。 具体 provider/key 编辑深链和独立 model_slot.resolved 事件仅在 evidence join 需要时继续补强。
P8 守卫 骨架阶段已完成防回流收口:旧 thread item adapter 已从 Workbench current surface 删除;code_orchestrated / auto -> react 归一收进 TS / Rust 单一 compat helper;legacy agent_runtime_* 只允许 retired guard / contract negative test / test-only fixture / 明确 compat 文档;mockPriorityCommands 为空,生产 safeInvoke 不回退 mock。 后续只随新增 coding fact / command / GUI 主路径补守卫,不再把 guard/test-only 字符串当主线 blocker。

完成百分比口径

后续汇报必须区分:

口径 含义
本轮完成度 本轮选定阶段的完成比例,例如 P1 contract/projection 或 P2 Rust event emission。
整体目标完成度 P0-P8 全量 coding profile 的完成比例,不因文档完成而大幅提高。
可交付状态 是否达到 Lime GUI 产品可用闭环:真实 current 主链 + GUI smoke + evidence。

当前整体目标完成度按工程闭环估算约 99.4%。P2-A/P2-B/P2-C 已完成 current owner 收敛:canonical command/test 共享 sandbox-aware process/control owner;所有本地 sandbox/process backend 与远端 Environment 共享 1 MiB head/tail、精确 omission、bounded broadcast/replay、UTF-8 framing 和有界 observation;Windows sandbox setup/readiness、双 mode restricted-token runner、ACL/Job/ConPTY、Firewall/WFP 与 warning lifecycle 也已有 current owner。剩余主要缺口是 Pier/DeepSWE verifier artifacts、覆盖当前 SHA 的正式 distribution evidence,以及 Windows 当前 SHA 的 restricted-token 大输出真机复验。外部 Agent host 当前没有生产 adapter,不再作为可立即执行的 blocker。

下一刀

下一刀进入正式 verifier/distribution evidence,不再重复 P1-P8 current owner 实现:

下次从这里开始

主任务:为当前工作树生成 Pier/DeepSWE verifier artifacts 与正式 distribution evidence。P2-A/P2-B 已闭环;不得再以 output buffer、live process adapter、已删除 UI 或文档 inventory 替代 verifier 工作。Windows 当前 SHA 的 restricted-token 大输出必须由 Windows 真机 runner 补证,非 Windows 结果不能提升为平台通过。

入口文件:

  • scripts/harness/:DeepSWE adapter、preflight、Desktop controlled/live verifier 与聚合入口。
  • internal/exec-plans/evidence/ 与 .lime/benchmark/v2/:当前 SHA 的持久 evidence、运行期机器可读结果与 claim boundary。
  • packages/cli/、forge.config.mjs 与 release resource verifier:正式 CLI/Desktop distribution 产物边界。
  • .github/workflows/:Windows restricted-token 大输出与 packaged matrix 的平台执行入口。

退出条件:

  • verifier 输入绑定当前 commit/tree identity,产物可机械复验,不能引用已删除 source 或历史 SHA 冒充当前结果。
  • DeepSWE/Pier 的 controlled、live、score 与 platform claim 分层记录;无 live provider 或容器环境时保持明确 blocked/incomplete。
  • CLI/Desktop distribution 从真实打包产物启动,证明 sibling sidecar、App Server JSON-RPC、RuntimeCore 与 canonical projection,不以源码运行替代。
  • Windows restricted-token 大输出复验覆盖 1 MiB head/tail、omitted bytes、UTF-8 delta 和 terminal completion;失败时 readiness/distribution claim fail closed。

最小验证:

npm run harness:deepswe:preflight
npm run smoke:cli-npm-gate-b
npm run test:contracts
npm run smoke:agent-runtime-current-fixture
npm run governance:legacy-report
P2-A/P2-B current owner closed
  -> next: current-tree Pier/DeepSWE verifier artifacts
  -> next: CLI/Desktop distribution evidence
  -> next: Windows current-SHA restricted-token large-output evidence

P8 骨架阶段已经收口,不再重复做旧字符串 inventory:真实 turn 已能从 Agent tool stream 派生 file.read、file.changed、patch.*、command.*、test.*、permission.denied、sandbox.blocked 和 action.* 基础 facts,并通过 CodingWorkbenchView、GUI coding input smoke、Evidence Pack、legacySurfaceCatalog、test:contracts 与 governance:legacy-report 证明 current 主链和防回流守卫成立。

后续高价值顺序:

  1. P2-B 已收口:Workbench live process interrupt / terminate / status / drain / stdin 写入、agent live process registry seam、App Server owner、RuntimeBackend 共享 hook、status/control/stdin capability hydrate、unified exec canonical lifecycle 与 sandbox RuntimeToolExecutionAttempt shared owner 回归均已落地;仓库当前没有生产外部 Agent host adapter,不再重复做裸进程接管。
  2. 再补 P2-D:为 shell command 建 session-scope approval key,减少重复审批,但只通过 settings 草案进入持久规则。
  3. 为当前工作树补 Pier/DeepSWE verifier 与正式分发证据;Windows restricted-token runner、setup/readiness 和平台 schema v3 7/7 已完成 owner 收敛,但当前 SHA 仍需重跑大输出 matrix,失败时 readiness 回退 updateRequired。
  4. 若需要外部 CLI / harness 接入,按 P6 只输出 RuntimeEvent / ReadModel adapter,不允许成为生产必需主链。