feat: show runtime checklists and support remote Continue
Display native OpenCode and Continue checklists alongside scheduled tasks, preserving request ownership, explicit clears and saved progress. Bundle both remote runtimes and support managed Continue installation, model routing, cancellation and restart continuation. Validation: real local and Linux remote model checks, full Electron remote Continue flows, typecheck and lint passed. Full suite: 4707 passed, 67 skipped, one OpenCode compaction failure passed targeted rerun. Release note: Display native execution checklists above conversations and support managed remote Continue projects with saved progress and cancellation recovery.
This commit is contained in:
@@ -1,5 +1,93 @@
|
||||
# 工作栏实现与验证进度
|
||||
|
||||
## 2026-09-19 远程 CN 完整桌面验证
|
||||
|
||||
默认联合开发包已包含 OC/CN,并通过桌面导入、验签、传输至共享 Linux x64、安装及
|
||||
CN 项目创建。真实输入框发送产生清单更新,顶部和消息保存一致;退出重启后恢复完成
|
||||
与待办状态。修复实测发现的 CN 冷会话续发及重复序号问题,复验重启续发、点击停止和
|
||||
取消后再次发送通过。证据、调用口径及平台边界见
|
||||
[远程记录](../remote-host/runtime-checklist-validation.md#2026-09-19-联合包与完整桌面验收)。
|
||||
|
||||
任务与清单分别展开,容器高度有界,键盘可进入清单滚动区;状态图标不再影响文字
|
||||
基线。此前真实 Electron 视觉矩阵覆盖同时展开、长列表、窄窗口、浅深主题及 200% 缩放。
|
||||
本轮实际桌面截图进一步核对真实远程清单和取消状态。开发包未发布,非 x64 平台未实测。
|
||||
|
||||
远程 CN 真实长清单为 55 项、5,601 字符,展示与落库一致;清空后退出重启仍保持空数组。
|
||||
本轮 Agent gateway 账本记录 16 次模型请求,其中 15 次完成、1 次取消结果未确认。
|
||||
测试 Host 目录、所属进程及本地隔离 profile 已清理。全量 4707 passed、67 skipped、
|
||||
1 failed;本地 OC 压缩失败项与远程 ACP、项目选择、清单组件专项复验共 136 passed。
|
||||
最终 typecheck、lint 和差异检查通过。
|
||||
|
||||
## 2026-09-18 Remote Continue Checklist
|
||||
|
||||
CL-P1、CL-P3 的远程 CN 源码已接入受管包、HTTP 宿主到 ACP 的适配、模型桥、项目
|
||||
校验和聊天选择。CN 原生成功 Checklist 经既有 semantic transcript 传递统一清单,
|
||||
不增加数据库或重连协议。修复聊天页把远程 CN 选择恢复为 OC、隐藏 Continue 菜单,
|
||||
以及复合包验包默认读取 OC payload 的遗漏。
|
||||
|
||||
Linux x64 当前源码与开发包通过验包、prepare/commit、Agent bootstrap/health、CN
|
||||
激活、真实模型清单新增/清空、未 ACK 断线重放、取消和同对话 Ask 续发。本轮新增
|
||||
17 个外部模型 HTTP 请求;精确分项、临时探针、已清理的 Host 目录及剩余验收见
|
||||
[远程执行清单验证记录](../remote-host/runtime-checklist-validation.md#cn-部署与生命周期)。
|
||||
本阶段使用单 Runtime 开发包;后续联合包与完整桌面验证见上方 2026-09-19 记录。
|
||||
|
||||
远程相关测试 27 文件、374 项通过;最终项目选择、顶部组件和安装管理 41 项、App
|
||||
远程选择与继承 3 项、CN 复合包安装专项通过。typecheck 和 lint 通过。
|
||||
全量测试完成一轮:4665 passed、67 skipped、6 failed。其中 CN 新增包测试的文件名
|
||||
错误已修正并复验;其余 5 项为 ActivityPanel/activity-store 的引用复用断言,本轮未
|
||||
修改这些文件。最终 typecheck、lint 和专项结果见上述远程记录。
|
||||
并行工作区更新后,ActivityPanel/activity-store 的 39 项专项复验全部通过。
|
||||
|
||||
## 2026-09-18 Local Runtime Checklist Backend
|
||||
|
||||
CL-P1 and the backend portion of CL-P2 are implemented. Shared contracts use
|
||||
`runtime-checklist.ts`, `AgentEvent.type = checklist`, and message field
|
||||
`runtimeChecklist`. Local OC validates parent Session, submitted message identity,
|
||||
assistant parent identity and native tool arguments. CN extracts before truncation,
|
||||
commits successful calls once, excludes startup history and retains explicit clears.
|
||||
Message metadata serialization, reconstruction, remote replay deduplication and
|
||||
terminalization preserve the field without a database migration. Existing IPC
|
||||
transport already forwards these events. Renderer and `acp-remote-runtime` were
|
||||
outside this backend change; no shared Linux Host acceptance is claimed here.
|
||||
|
||||
The focused backend suite passed 275 tests across shared checklist, OC/CN Runtime,
|
||||
host adapter, permissions, real-binary lifecycle and assistant database tests.
|
||||
Coverage includes OC reused Sessions and stale/child updates, native event ordering,
|
||||
CN long lists and omitted success arguments, failure preservation, history dedupe,
|
||||
empty lists, database reopen and remote event replay/terminalization.
|
||||
`npm run typecheck` and `npm run lint` passed on the final validation run.
|
||||
The full `npm test` run completed with 4604 passed, 67 skipped and 9 failed:
|
||||
one Agent offline-package inventory test exceeded 60 seconds; eight failures were
|
||||
in concurrently changing Magic Notes renderer tests (including PDF `DOMMatrix`
|
||||
availability and canvas UI expectations). These files were not modified here.
|
||||
|
||||
Real model evidence on Windows, using production local adapters and isolated
|
||||
temporary profiles:
|
||||
|
||||
| Runtime | Version | Submitted tasks | Actual model HTTP POSTs | Observed result |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| CN | 1.5.47 | 1 | 3 | Two successful Checklist calls, two structured snapshots; A pending then completed, B pending |
|
||||
| OC investigation | 1.18.29 | 2 | 6 | Native tools succeeded; revealed todo.updated precedes running input, initially no projected snapshot |
|
||||
| OC corrected ordering | 1.18.29 | 1 | 3 | Two native updates projected; done retained |
|
||||
| OC final sortable message ID | 1.18.29 | 1 | 3 | Two native updates projected; assistant parent IDs matched; done retained |
|
||||
|
||||
Total: **15 actual external model HTTP POSTs**, all HTTP 200, **5 submitted tasks**.
|
||||
The unavailable old OC server probe and two isolated startup attempts dispatched
|
||||
zero model requests. Startup attempts were blocked by the probe's fetch wrapper
|
||||
not accepting Request objects; correcting that wrapper required no product change.
|
||||
The proxy allowed only the exact native checklist tool, with a per-run request cap.
|
||||
No business-file tools ran. Saved production settings were read through isolated
|
||||
credential handling; the existing explicit test connection was used in memory
|
||||
because its endpoint/model tuple differed from the saved connection. Credentials
|
||||
were not printed, original settings were unchanged, and isolated run data was removed.
|
||||
|
||||
The real probes verified adapter extraction and OC Runtime events, not desktop
|
||||
rendering. CN Runtime event forwarding and persistence were verified by tests.
|
||||
Long lists, clears, cancellation boundaries and history replay were tested with
|
||||
fixtures/database tests, not exhaustively exercised through real models. Temporary
|
||||
probe sources: `cn-todo-probe.ts` / `cn-todo-run.cjs` under the approved OpenCode
|
||||
temporary directory; each run printed its dispatch count and structured results.
|
||||
|
||||
## 2026-09-17 连续请求取消与停止状态
|
||||
|
||||
- 复现并修复 OpenCode 迟到的会话取消中断下一条请求:同一次运行复用一个有界 abort,
|
||||
|
||||
@@ -1,16 +1,38 @@
|
||||
# Runtime 执行清单技术设计
|
||||
|
||||
状态:设计阶段,尚未实现。需求、场景与顶部布局由 [PRD](./prd.md#131-runtime-执行清单)
|
||||
状态(2026-09-19):本地与远程 OC/CN 提取、统一事件、消息保存和顶部展示已实现。
|
||||
默认开发组包同时携带 OC/CN,远程 CN 已通过 Windows 桌面到 Linux x64 的真实模型
|
||||
更新、取消、重启恢复及续发验证。验证范围与调用数见
|
||||
[远程记录](../remote-host/runtime-checklist-validation.md#2026-09-19-联合包与完整桌面验收)。
|
||||
需求、场景与顶部布局由 [PRD](./prd.md#131-runtime-执行清单)
|
||||
维护,替换、隔离和终态规则由 [Runtime 交互边界](./runtime-interactions.md#runtime-执行清单)
|
||||
维护。研究证据与交付状态见[进度](./progress.md#2026-09-15-runtime-执行清单设计未实现)。
|
||||
|
||||
## 1. 原生数据与提取位置
|
||||
|
||||
Implemented local behavior:
|
||||
|
||||
- OC sends a native-sortable `messageID` with both prompt and command submissions.
|
||||
Only assistant messages whose `parentID` matches that request can own checklist
|
||||
calls. Parent Session identity is checked independently of child-session routing.
|
||||
OC 1.18.29 emits `pending`, `todo.updated`, then `running` with complete arguments.
|
||||
The adapter retains native snapshots only while an owned call is active and
|
||||
submits a snapshot once its validated items match that call's original input.
|
||||
Calls and pending snapshots are request-local; no `session.todo` polling is used.
|
||||
- CN extracts the exact `Checklist.checklist` argument in the patched native start
|
||||
callback and in native history before display truncation. Candidates survive
|
||||
success frames without input. A completed call commits once per call ID; failed
|
||||
calls and startup history do not commit. Ordinary tool events retain their limits.
|
||||
- CN accepts blank lines and `- [ ]`, `- [x]`, `- [X]` entries with nonempty content.
|
||||
Empty or whitespace-only strings clear the list. Other nonempty lines invalidate
|
||||
the entire update. Native 1.5.47 accepts a string without Markdown validation;
|
||||
these are GoodBuddy's explicit projection rules, not additional native guarantees.
|
||||
|
||||
| Runtime / 路径 | 已确认格式与设计接入 |
|
||||
| --- | --- |
|
||||
| 本地 OC 1.18.29 | `todo.updated` 与 `session.todo` 返回完整条目列表,字段为 `content/status/priority`,无 item ID;以原生更新事件驱动本轮整份替换 |
|
||||
| 本地 CN 1.5.47 | 精确原生工具 `Checklist` 的参数 `checklist` 是 Markdown 勾选列表,`- [ ]` / `- [x]` 表示未完成/完成;按一次成功调用提交完整替换 |
|
||||
| 远程 OC/CN | 先核对实际部署版本、原生输出与 Agent 传递结果;只有格式已确认且来源归属明确的原生 plan entries 或精确清单工具参数可以映射,当前尚无本功能远程实测 |
|
||||
| 远程 OC/CN | OC 1.18.29 通过原生 todo.updated,CN 1.5.47 通过成功 Checklist 参数进入 Agent transcript;Linux x64 清单与重放已实测,CN 同时验证取消后续发,见[远程记录](../remote-host/runtime-checklist-validation.md) |
|
||||
|
||||
`opencode-runtime.ts` 当前将普通工具 input 经 `boundedToolDetail(..., 4_000)` 转成
|
||||
展示字符串。接入应在 SDK 原始事件层消费 `todo.updated`;如需核对 `todowrite` 参数,
|
||||
@@ -24,23 +46,29 @@ CN 的提取位置在 `continue-host-adapter.ts`:宿主产生工具事件、HT
|
||||
流转。超出 4,000 字符的清单需要独立验证完整性,但不扩大所有普通工具输入的展示上限。
|
||||
|
||||
Markdown 解析只适用于已确认的 CN `Checklist.checklist`,不扫描助手正文或其他工具
|
||||
输出。空数组在统一事件中明确表示清除;CN 原生如何表达空清单,以及空白、大小写和
|
||||
非条目行的实际接受规则,实施时核对后固定解析规则。未确认或无效输入保留旧清单,
|
||||
不能误当清空。
|
||||
输出。空数组在统一事件中明确表示清除;CN 空字符串或仅空白的字符串表示清空。
|
||||
解析规则见上文;无效输入保留旧清单,不能误当清空。
|
||||
|
||||
## 2. 统一事件与消息归属
|
||||
|
||||
拟在现有 Runtime 事件联合中增加完整清单事件,承载 `requestId`、条目数组和原生来源;
|
||||
条目包含 `content`、`status` 及可选 `priority`。最终命名随实现确定,不设计条目级增删
|
||||
协议或稳定 item ID。空数组必须经过 schema、IPC、消息投影和保存链路,不能被“无内容”
|
||||
过滤丢弃。
|
||||
The shared contract is `src/shared/runtime-checklist.ts`: `runtimeChecklistSchema`
|
||||
and `RuntimeChecklist { source: 'opencode' | 'continue', items }`. Each item has
|
||||
`content`, `status: pending | in_progress | completed | cancelled`, and optional
|
||||
`priority: low | medium | high`. `AgentEvent` carries
|
||||
`{ type: 'checklist', requestId, checklist }`; conversation messages carry optional
|
||||
`runtimeChecklist`. Empty arrays are valid replacements. Existing IPC event
|
||||
transport forwards them without a separate channel or tool-input parsing.
|
||||
|
||||
Main 使用现有请求到助手消息的映射投影清单,Renderer 顶部读取该消息的最新有效状态。
|
||||
本地 Renderer 按请求映射更新助手消息并沿既有保存入口落库;远程 Main 使用既有事务
|
||||
投影更新消息。顶部读取所属请求消息的最新有效状态。
|
||||
同一请求若同时观察到原生清单事件与其工具记录,只以前者更新清单,后者保留活动;不能
|
||||
提交两次替换。原生父 Session、请求开始/结束边界需共同校验,子 Session 或旧请求事件
|
||||
不得通过当前活动请求映射到新轮。
|
||||
|
||||
优先扩展现有消息 metadata、Runtime 事件和数据库投影,历史清单与所属助手消息一起保存。
|
||||
The existing message metadata serializer and every database message reconstruction
|
||||
retain `runtimeChecklist`, including remote event projection and terminalization.
|
||||
No SQLite schema migration or separate checklist store is needed.
|
||||
历史清单与所属助手消息一起保存。
|
||||
远端沿用事件提交、消息投影和 ACK 的既有事务及去重规则;相关存储边界见
|
||||
[执行记录存储](./execution-history-storage.md)。实施前核对本地会话与远程任务实际落库
|
||||
字段,选择能复用的最小表示。不新建清单数据库、独立快照系统、恢复日志或持久化服务。
|
||||
@@ -48,16 +76,16 @@ Main 使用现有请求到助手消息的映射投影清单,Renderer 顶部读
|
||||
|
||||
## 3. 远程 Agent 与 ACP 复用
|
||||
|
||||
本次源码检查确认以下传递位置,属于设计依据,不是本功能远程验证结果:
|
||||
远程传递复用以下实现:
|
||||
|
||||
1. `AgentAcpConnection` 按原生 `sessionId` 分派 `sessionUpdate`;
|
||||
`AgentOwnedAcpPrompt` 校验 Session 后,以 `bindingId/operationId` 将通知写入
|
||||
既有 semantic transcript。
|
||||
2. `ProtocolRemoteRuntimeChannel` 已有 transcript 读取/ACK、身份核对,以及 ACP
|
||||
channel 恢复与重放;`AcpRemoteRuntime` 消费 `session-update` 并转换桌面事件。
|
||||
3. `AcpRemoteRuntime` 当前将 `plan.entries` 及 `plan_update` 的 items 转成 `status`
|
||||
字符串;markdown/URI 也只形成状态消息。工具事件按 `toolCallId` 合并 `rawInput`、
|
||||
`status` 和结果,再有界保留。清单提取应发生在结构丢失或截断前。
|
||||
3. OC 插件转发原生 `todo.updated`,CN 宿主将成功清单写入 `_meta.goodbuddyChecklist`;
|
||||
`AcpRemoteRuntime` 校验归属和结构后产生统一清单事件。标准 OC `plan.entries` 也有
|
||||
映射,但 OC 1.18.29 实测走插件事件。Markdown、URI 和普通状态文字不生成清单。
|
||||
|
||||
优先复用上述通知和 transcript,不另建远端清单通道。对实际 OC/CN 部署确认过的
|
||||
`plan.entries`,或已确认等价的 `plan_update` items,校验条目字段和状态后转成统一
|
||||
@@ -69,17 +97,25 @@ Main 使用现有请求到助手消息的映射投影清单,Renderer 顶部读
|
||||
真实格式证据,不能根据 ACP 类型定义推断 OC/CN 一定会发送。ACP 是协议,Runtime 身份
|
||||
仍为 OC 或 CN。
|
||||
|
||||
当前托管 SSH 产品及受管安装、校验、创建链路只支持 OC,详见
|
||||
[远程范围](../remote-host/technical-design.md#执行清单接入范围)。远程 CN 交付需补齐
|
||||
受管工件、安装与启动、项目选择/校验及原生事件接入,确认 Main 模型桥、请求归属、取消
|
||||
和已有恢复流程能用于该部署。不能只放开选择菜单或使用本地 CN 调远程模型来宣称完成。
|
||||
受管安装、校验、项目创建与聊天选择已接入 CN;Agent 在 Host 运行固定 CN HTTP 宿主,
|
||||
复用本地适配器和已有模型桥、请求归属、取消及恢复。开发包与 Linux 验证、联合分发和
|
||||
完整桌面验收的剩余范围见[远程记录](../remote-host/runtime-checklist-validation.md)。
|
||||
|
||||
重连按[既有 ACP 与断线规则](../remote-host/technical-design.md#acp-与断线)执行。
|
||||
已接受 Prompt 使用原 binding/operation 恢复,清单从已提交消息和其后的既有事件恢复;
|
||||
重复事件不重复展示。连接丢失不表示条目完成,不为恢复清单重新发送 Prompt、模型请求或
|
||||
工具调用,也不新增独立重连机制。
|
||||
|
||||
## 4. 实施与验收
|
||||
## 4. 顶部布局
|
||||
|
||||
`ConversationTaskStrip` 与 `RuntimeChecklistStrip` 共用顶部容器,任务在上、清单在下,
|
||||
各自展开和折叠。没有 Task 时清单仍可显示;远程会话也保留清单入口。总高度不超过
|
||||
45vh,各自展开内容不超过 20vh 并内部滚动,标题不收缩。清单内容区可用键盘聚焦和滚动。
|
||||
|
||||
状态文字与条目首行按文字基线对齐,状态图标单独居中。CN 不推断进行中或优先级。
|
||||
新轮先选择本轮消息,再读取清单,不回溯寻找旧轮非空清单。后台更新保持展开状态和焦点。
|
||||
|
||||
## 5. 实施与验收
|
||||
|
||||
| 阶段 | 必须完成的工作 | 对应需求 |
|
||||
| --- | --- | --- |
|
||||
@@ -88,7 +124,7 @@ Main 使用现有请求到助手消息的映射投影清单,Renderer 顶部读
|
||||
| CL-P3 | 确认远程 OC 原生格式,补齐远程 CN 真实部署与事件接入,复用 Agent 传递和恢复 | FR-CL1、FR-CL4 |
|
||||
| CL-P4 | 本地与共享 Linux 真实 Host 逐项验收,记录版本、结果、调用口径与剩余阻塞 | FR-CL1–FR-CL4 |
|
||||
|
||||
以下均为待执行验收,本次文档工作不运行模型或代码测试:
|
||||
以下为产品验收范围;已执行项和未覆盖项分别记录在进度与远程验证记录中:
|
||||
|
||||
- 本地 OC/CN 各经桌面正常发送路径产生并连续修改清单,检查新增、修改、重排、删除、
|
||||
重复文本、有效清空及超过 4,000 字符的完整内容;CN 成功才替换,失败保留前值。
|
||||
|
||||
Reference in New Issue
Block a user