Repository navigation
Conversation
…ivers Wire @botiverse/oar@0.142.0 capabilities across the 9 Workbench OAR runtimes without fabricating write paths or unsupported flags: - Commands: wire runtime.commands() into OarAdapter.commands(cwd) with graceful [] fallback on unsupported/unavailable. - Read-only inventories: add async AgentAdapter.listSkills()/listMcpServers() wired into SkillsManager, McpManager, HTTP routes, and web UI while keeping OAR strictly read-only (no skillDirs/mcpInstall/mcpRemove). - Quota: dynamically set capabilities.quota from runtime.accountUsage (factory, grok, kimi) and implement fetchQuota() mapping AccountUsageSnapshot to PlanQuota (with lazy capability probing on cold-start quota/fork routes). - Fork: dynamically set capabilities.fork from installedSessionCapabilities().refusedSessionOptions?.fork (OpenCode v2 true, v1 and other runtimes false; forkAt/forkInto stay false without history) and implement forkSession() with guaranteed session disposal. - Diagnostics: implement read-only OarAdapter.diagnose() surfacing protocol, version, and runtime.checkUpdate() without ever invoking runtime.upgrade(). - Driver consolidation: share OarSessionDriver, assertOarAbortConfirmed, and observeNativeOarSession across oar.ts and oar-core.ts. - Tests: add oar-parity.test.ts (playwright-free) covering all mappers, dynamic capability matrix, read-only inventories, quota, fork, diagnostics, and shared lifecycle guarantees. Signed-off-by: song <xinxinsong66@gmail.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9f7a62e94
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ough Core Signed-off-by: song <liusongstep@gmail.com>
…host Use the same backend to open and fork native sessions, preserve Core ownership and release fork handles. Fence pre-dispatch cancellation in both drivers. Wait for the session host to exit before cleaning its test directory. Signed-off-by: song <liusongstep@gmail.com>
songoow
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-6 Astra Pro · OpenAI · self_reported
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
动机 / Motivation
用户从 Workbench 查看已配置代理的能力、诊断和资源,并据此决定如何恢复工作。以前带有 OAR 能力的代理仍可能只显示空命令或缺少资源入口,本次让工作台从原生运行时读取命令、技能、工具服务和版本信息。已支持版本的工具可以展示诊断;安装的工具低于支持版本时,页面也应提供可信的当前版本和更新信息。本次覆盖工作台只读能力与会话驱动,原生工具的实际升级仍由用户执行。
改动思路 / Approach
运行时报告安装、能力和清单,适配器将它们转换成工作台可消费的数据。线程管理器负责请求配额、复制会话和读取诊断,网页根据返回的状态决定何时展示当前版本、更新提示或清单错误。技能与工具服务沿原来的管理入口读取,避免为只读资源增加写入口。
具体改动 / Changes
OarAdapter 使用原生能力区分可用的配额和整会话复制,SkillsManager 与 McpManager 分别合并可写文件配置和只读清单,网页保留局部错误与部分结果。原来关于技能查询失败被当作空清单的讨论已关闭,当前测试覆盖了该场景。采用 #10241 的多路复用 Node 连接后,托管与独立会话共用活动轮次驱动。派发前取消、fork 返回新会话以及错误身份的关闭均有当前 head 测试。新诊断适配器专门支持可执行文件版本不兼容的安装快照。用真实 ThreadManager 和 OarAdapter 注入低版本 Grok 安装结果。实际请求 GET /api/agents/grok/diagnostics,返回 HTTP 200、missing、version=null、protocol=null,完全没有查询更新;直接调用同一个适配器则读到 1.0.0 及可用的 1.0.95 更新。
P2 · 已安装但版本过旧的 CLI 被显示为未安装,更新诊断无法到达。 运行时 installation() 确认找到了可执行文件并返回 version_unsupported。端点返回 missing、空版本和空协议,并建议检查 PATH;checkUpdate 调用数为零。在公共诊断入口区分版本不支持与未安装,在前一种情况下读取只读诊断并保留不可启动状态。 诊断入口、适配器的版本分支、页面读取方
对主干的风险 / Risks
诊断页会把已知的版本兼容问题误报成路径问题,用户可能重新安装或修改环境变量,仍找不到可用的更新入口。此误报取决于运行时返回的安装状态,示例测试中“可正常启动且有新版本”的场景不会暴露该分支。真实 CLI、供应商更新服务以及桌面与窄屏的实际渲染未验收。当前分支已接入 #10241 的 Node 通道。托管 fork 返回原标识时被拒绝,resume 也继续校验原会话身份,相关测试已通过。
我的整体评价 / Verdict
建议先修复公共诊断入口,保留“已安装、暂不支持”的状态和只读更新能力,再用同一个端点验证未安装与正常安装的对照情况。六个 daemon 测试文件 67 项、Session Hub 24 项和网页 870 项均通过,六个 workspaces 的静态类型检查通过。
English verdict: REQUEST_CHANGES — e87f2dd. The public diagnostics path loses the installed version and update information. Reproduced through the HTTP route using an unsupported-version runtime fixture.
Signed-off-by: Codex <codex@openai.com> Signed-off-by: song <liusongstep@gmail.com>
Signed-off-by: Codex <codex@openai.com> Signed-off-by: song <liusongstep@gmail.com>
Signed-off-by: Codex <codex@openai.com> Signed-off-by: song <liusongstep@gmail.com>
Signed-off-by: Codex <codex@openai.com> Signed-off-by: song <liusongstep@gmail.com>
Signed-off-by: Codex <codex@openai.com> Signed-off-by: song <liusongstep@gmail.com>
songoow
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-6 Astra Pro · OpenAI · self_reported
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
动机 / Motivation
工作台用户从同一个界面浏览多个代理、插件和机器的技能,并选择具体来源查看说明。此 PR 将运行时只读清单与现有可写技能目录合并;两个插件可以合法提供同名技能,内建技能也可以没有本地 Markdown 文件。详情应显示所选来源报告的内容,列表默认摘要应对应标为主位置的那一份。本次核对能力展示、配额、复制、诊断和只读资源;无需调用厂商在线更新。
改动思路 / Approach
OAR 适配器把运行时技能、MCP、配额和安装信息映射到 Workbench。HTTP 路由校验 cwd 并读取聚合后的清单;网页在部分来源失败时保留其他结果,用户还可以查看每个技能的具体位置。
具体改动 / Changes
24 个文件覆盖核心与独立会话的事件、fork 和取消,OarAdapter 的能力映射,ThreadManager 的诊断,以及清单的 HTTP、Web 与翻译。此前的过旧 CLI 诊断和显式刷新回归可通过;原先已关闭的部分清单错误反馈也有相应用例。
P2 · 同名只读技能的预览会显示另一来源的说明。 两个运行时分别报告无本地文件的 release 技能,插件 alpha 和稍后观测的 beta 提供不同说明。用户在技能页打开默认副本,或在详情端点选择 bundled:beta。列表选中 bundled:beta 作为主位置,却展示 Alpha release guide;详情返回 HTTP 200 和 path=bundled:beta,skillMd 仍为 Alpha release guide。alpha 的同一请求返回正确说明。 按名称聚合、主位置排序、详情回退、选择位置、页面预览
对主干的风险 / Risks
如果两个来源使用相同技能名,用户可能按错误的操作说明工作;HTTP 状态码是 200,页面没有错误提示。当前测试有可写/只读同名合并和单个内建插件,但没有断言两个虚拟来源的说明各自保持独立。
提交树的八个 daemon 文件 71/71 通过,包含共享 Core 会话、Grok 安装升级与移除、只读写入拒绝、配额与 fork。真实鉴权 HTTP 对照里,访问 alpha 得到 alpha 的说明。
我的整体评价 / Verdict
请修复各来源说明的归属。对当前父分支的 Git 合并是干净的;在测试用的父分支整合 #10243 后,子分支也自动合并,双插件反例仍可重复。远端 chat-bundle 的构建、源文件校验和产物上传均已通过。在线供应商账户及桌面、移动端实际渲染仍待验收。 在每个只读 location 中保存运行时报告的 description。选定主位置或显式 path 后,将该位置的说明作为摘要和虚拟文档的回退值。用两个插件上报同名但说明不同的虚拟技能,检查列表的主来源及两个详情 HTTP 响应,同时保留可写来源和文件正文的优先规则。
English verdict: REQUEST_CHANGES — bf4b2f6. The public skills endpoints pair the beta source with the alpha description. Reproduced with two read-only inventories on the submitted head.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/codex/oar-pr2-eliminate-py-js-pingpong
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
Signed-off-by: song <xinxinsong66@gmail.com>
Signed-off-by: song <xinxinsong66@gmail.com>
|
Synced
Verification (Node v24.23.0)
|
maxliux5
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini 4 Neon · Google · self_reported
动机 / Motivation
Workbench 用户需要在同一界面下查看全部 9 个 OAR 运行时(cursor、codebuddy、devin、factory、grok、kimi、opencode、qoder、qwen)的 slash commands、只读技能与 MCP 清单、套餐额度、整会话 fork 与版本更新诊断,同时维持“不改写外部运行时配置、不影响既有原生适配器”的只读边界。此前 OAR 适配器在 Workbench 中仅返回空命令且缺少技能/MCP/额度/fork/更新诊断入口,独立会话驱动与 Core 托管会话驱动也各自维护事件投影与生命周期逻辑。本次改动属于基于 #10241 的增量交付,目标是补齐只读能力与驱动收拢;不包含在 Workbench 内执行厂商 CLI 自动升级或写入 OAR 专属技能/MCP 配置文件;当前剩余缺口为:合入顺序依赖 #10241 先落地,且需在合并前修复下述 3 项 P2 阻塞问题。
改动思路 / Approach
本次改动在 OarAdapter 中接入 @botiverse/oar@0.142.0 的 commands、skills、mcpServers、accountUsage、checkUpdate 与 session({ resume, fork }),并在 AgentAdapter 上新增可选异步只读接口 listSkills / listMcpServers 与 unsupportedVersion。SkillsManager 和 McpManager 将可写文件系统扫描与只读运行时清单聚合输出,前端 SkillsPage、McpPage、ObservabilityPage 及三语 locale 据此隐藏只读项的写操作并展示局部错误与更新提示。会话层将事件投影、活动轮次守卫、取消确认与幂等关闭抽离为共享的 OarSessionDriver、assertOarAbortConfirmed 与 observeNativeOarSession,同时由独立 OarSession 与 Core 托管 CoreOarSession 复用。
具体改动 / Changes
核心变更覆盖 24 个文件(+1968 / -322),关键边界核验如下:
- 能力映射与冷启动探测(
adapters/oar.ts、threads.ts、adapters/diagnostics.ts):mapOarCommands、mapOarSkills、mapOarMcpServers、mapOarAccountUsage、mapOarUpdateCheck使用@botiverse/oar的强类型判别联合(kind/reason/code),未引入散文分类;syncCapabilities动态同步images、quota、fork且固定关闭forkAt/forkInto;ThreadManager.agentQuota与forkThread仅在!capabilities.* && 对应方法存在时触发冷启动available()。 - 既有原生适配器 default-off isolation(
claude、codex、agy、pi、traex、zcode、dsh):已逐一核对全部 7 个原生适配器——均未实现listSkills/listMcpServers,且支持quota/fork的适配器均静态声明对应 capability 为true,因此默认路径零额外探针与行为漂移。 - 只读清单与前端交互(
skills.ts、mcp.ts、http.ts、SkillsPage.tsx、McpPage.tsx、inventory.ts):/api/skills、/api/skills/detail、/api/mcp均通过isWithinWorkdirs校验?cwd=;OarAdapter不暴露skillDirs/mcpServers/mcpInstall/mcpRemove,只读写入/导出/删除请求均被拒绝。 - 与最新
main(含#10243/#10263)兼容性:git merge-tree origin/main fa3d01e63baab7eefd47217f0e0c141515bbf5fc零冲突,且已对齐#10243的LOOPX_WORKBENCH_*命名;但本 PR 当前 base 仍指向尚未合入的#10241(codex/oar-pr2-eliminate-py-js-pingpong@a1ac646045),需按先#10241后本 PR 的顺序落地。
在精确提交 fa3d01e63baab7eefd47217f0e0c141515bbf5fc 上核实到以下 3 项阻塞问题(P2) 与 2 项非阻塞建议(P3):
-
P2(阻塞)· 同名只读技能的描述错配仍未修复,且会跨可写/只读来源污染预览
- Problem / Evidence:在
apps/workbench/packages/daemon/src/skills.ts(computeListing、detail、findListed)中,SkillInPlace未保存单来源description。在当前fa3d01e63b实测复现两组反例:(a)两个只读插件bundled:alpha与较新的bundled:beta报告同名虚拟技能release时,列表主位置选中bundled:beta却返回Alpha release guide,请求/api/skills/detail?name=release&path=bundled:beta同样返回skillMd: "Alpha release guide"(上轮审查bf4b2f698d的 P2 尚未修复);(b)当可写目录与虚拟只读插件共享同名技能overlap时,L421 将skill.description覆盖为可写SKILL.md描述,导致请求/api/skills/detail?name=overlap&path=bundled:ro-plugin误返回可写技能的描述而非只读插件自身描述。此外 L417 比较器a.mtime < b.mtime ? 1 : -1在同一次runtime.skills()共享相同observedAt时破坏严格弱序。 - Fix:在只读 location 记录中保留各自的
description;修复 L417 排序比较器为三值比较并补充确定性次级键(如path),主位置为只读时同步skill.description = primary.description ?? '';detail()读取只读位置时以该 location 自身的description作为readReadOnlyDoc回退值,并在oar-parity.test.ts补齐“双虚拟插件同名”和“可写+虚拟只读同名”的 HTTP 回归测试。
- Problem / Evidence:在
-
P2(阻塞)·
OarSession(standalone)与CoreOarSession在收拢后仍存在cancel()/exited生命周期分叉- Problem / Evidence:
CoreOarSession.cancel()(oar-core.ts#L281-L294)在无活动轮次或this.isClosed时安全返回;但独立驱动OarSession.cancel()(oar.ts#L678-L680)未检查this.isClosed或是否存在已派发轮次,直接调用assertOarAbortConfirmed(await this.session.abort())。在fa3d01e63b实测对已close()或已触发exited的 standaloneOarSession调用cancel(),两次均抛出Error: runtime exited,在ThreadManager.stopTurn()(threads.ts:3582)竞态窗口下会向客户端返回 HTTP 500。同时oar.ts:641-644在收到exited事件通知onClosed驱逐会话后未调用this.unwatchLifecycle?.()解除监听(ThreadManager的onClosed回调不会再调用close())。 - Fix:在
OarSessionDriver暴露活动轮次只读状态(如hasActiveTurn),使OarSession.cancel()在this.isClosed || !this.driver.hasActiveTurn时与CoreOarSession.cancel()一致地幂等返回;在exited回调中清理this.unwatchLifecycle?.();补充 standaloneOarSession在close()/exited后调用cancel()不抛错的回归测试。
- Problem / Evidence:
-
P2(阻塞)·
readReadOnlyDoc()对外部符号链接与超大文件缺少边界防护- Problem / Evidence:同文件
walkSkill()(skills.ts:164-172)会拒绝指向目录外的符号链接并限制单文件大小,而新增的readReadOnlyDoc()(skills.ts#L580-L593)使用statSync()跟随任意符号链接,且调用readFileSync(locationPath).subarray(0, MAX_SKILL_MD)先将整个文件完整读入内存再截断。实测当工作区运行时的只读技能条目指向外部文件的符号链接时,GET /api/skills/detail会直接读取并返回符号链接目标文件内容;若目标指向大文件或特殊文件则会造成内存放大风险。 - Fix:改用
openSync+ 定长readSync仅读取最多MAX_SKILL_MD字节,并用lstatSync/realpathSync校验仅读取常规文件且拒绝越界符号链接(或在符号链接逃逸出技能目录/允许工作目录时回退至description),补充符号链接与超大文件边界测试。
- Problem / Evidence:同文件
-
P3(建议)· 非
version_unsupported的UnsupportedInstallation在诊断接口仍显示为missing- Evidence:
@botiverse/oar的UnsupportedInstallation还包含readiness_failed、unrecognized_executable与HostUnsupportedInstallation。实测注入readiness_failed时,GET /api/agents/grok/diagnostics返回state: "missing"且提示“没有找到 CLI,请检查该实例的命令和 PATH”,丢弃了adapter.unavailableReason。建议保留unsupportedVersion专门控制checkUpdate(),同时在ThreadManager.agentDiagnostic()中对带unavailableReason的其他unsupported状态透出真实原因与state: "unsupported"。
- Evidence:
-
P3(建议)· 存在
partial或单代理错误时,前端搜索/筛选无结果提示被隐藏- Evidence:
SkillsPage.tsx:243与McpPage.tsx:359的空态条件为rows.length === 0 && (loading || readErrors.length === 0)。当任意 OAR 代理返回partial: true或失败、且用户在已有技能/MCP 列表中输入不匹配的搜索词(或筛选空业务线)时,noMatch提示会被完全吞掉。建议在search非空(以及 MCP 页line !== null)时仍显示noMatch。
- Evidence:
对主干的风险 / Risks
上述 3 项 P2 直接影响公共 HTTP 路由与运行时稳定性:同名只读技能与跨来源冲突会在 HTTP 200 下静默展示错误的操作说明;standalone OarSession 在关闭/退出竞态下取消会抛 500,打破本 PR 主张的“standalone 与 Core 驱动生命周期一致”不变量;readReadOnlyDoc() 在面对工作区符号链接或超大文件时弱于同文件可写路径的防护基线。本次新增的状态词汇(RuntimeUpdateDiagnostic.status、只读清单字段 readOnly/partial/issues)均直接复用或局部映射 @botiverse/oar 既有类型,未引入需要变更全局状态机注册表的新共享协议。
本地实跑验证记录(精确提交 fa3d01e63baab7eefd47217f0e0c141515bbf5fc,Node v24.21.0):
npm --prefix apps/workbench run typecheck(6 个 workspaces):PASS- Workbench daemon 14 个测试套件(
oar-parity、oar、oar-core、oar-thread-status、skills、mcp、quota、quota-inband、quota-resume、fork-subchat、observability-api、adapters、lifecycle、workbench-lifecycle,umask 0022):184/184 PASS - Workbench web 测试(
TZ=UTC npm test -w @loopx/workbench-web):875/875 PASS - Core OAR Session Hub 测试(
tests/control_plane_ts/oar_session_hub.test.ts):24/24 PASS - 独立反例复现脚本(覆盖同名虚拟技能、可写/只读同名冲突、standalone
cancel()afterclose()/exited、readReadOnlyDoc外部符号链接、readiness_failed诊断):全部在fa3d01e63baab7eefd47217f0e0c141515bbf5fc稳定复现 - 外部真实厂商 CLI 在线更新/额度接口及真实浏览器桌面/窄屏亮暗色渲染:UNVERIFIED
我的整体评价 / Verdict
本 PR 的整体架构、只读边界设计(不伪造可写目录/MCP 写入、不触发 upgrade())、非 OAR 原生适配器的 default-off isolation 以及与最新 main(含 #10243/#10263)的兼容性整体扎实,测试覆盖也远超纯 mock 烟雾测试。但在合入前需先修复上述 3 项 P2(skills.ts 单来源描述归属与排序、standalone OarSession.cancel()/exited 生命周期一致性、readReadOnlyDoc() 符号链接与定长读取边界),待 #10241 合入并切换 base 至 main 后再行复审。由于本轮按保守审查要求以 COMMENTED 形式发布结论,暂不批准合入。
English verdict: REQUEST_CHANGES — fa3d01e. Three verified P2 blockers remain on the exact head: per-location read-only skill descriptions are still dropped across same-name virtual and writable/read-only collisions, standalone OarSession.cancel() throws after close/exit unlike CoreOarSession and leaks its lifecycle listener on exit, and readReadOnlyDoc() follows arbitrary symlinks while reading unbounded files into memory.
Signed-off-by: song <xinxinsong66@gmail.com>
…d-only skills safety Signed-off-by: song <xinxinsong66@gmail.com>
Signed-off-by: song <xinxinsong66@gmail.com>
…me read-only locations Signed-off-by: song <xinxinsong66@gmail.com>
|
Synced Summary of Hardening Fixes (Verified by Counterexamples & Regression Tests)
CI (
|
Signed-off-by: Codex <codex@openai.com> Signed-off-by: song <liusongstep@gmail.com>
songoow
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-6 Astra Pro · OpenAI · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
在 Workbench 按技能来源阅读说明、分叉会话或查看账号用量的用户,需要界面与当前宿主能力一致。主干通过技能接口读取两份同名运行时技能时列表为空,两个详情都返回 404。早先的 PR 还能把另一来源的说明显示在所选位置。当前代码按具体位置返回说明和来源,最新来源提升到列表,保留其余来源的独立预览;分叉、用量和诊断根据运行时能力呈现。本次验收覆盖工作台公开 HTTP、实际适配器、脚本化供应商和独立/托管会话入口。
改动思路 / Approach
能力是否存在由已安装的 OAR 运行时决定,技能管理器负责排序和按路径取回详情,界面沿用宿主返回的只读事实。这个 PR 复用现有 HTTP、线程管理与 OAR 会话所有者,同时让每个只读来源保留自己的描述和元数据。通过同一入口和合成 fixture 比较改动前后的运行结果,并核对错误返回时能否恢复原有工作流。
具体改动 / Changes
独立 HTTP 检查还确认普通 280 KiB 的只读文档只返回 262144 字节,小文档完整返回。Workbench 构建和类型检查均通过。11 项 OAR 能力和状态矩阵、32 项 daemon 常规用例、17 项 Web 逻辑测试和工作区类型检查通过。真实包能力矩阵中 OpenCode v2 可以在同目录分叉整段对话;Factory Droid、Grok 和 Kimi 可报告用量。同一组两个只读的 release 技能,主干返回空列表,当前 HTTP 列表指向较新的 bundled:beta;显式取 alpha 和 beta 分别返回 Alpha release guide 与 Beta release guide,插件字段也各自匹配。按路径取旧来源时不会复用新来源的预览,缺失与不支持状态有各自诊断;账号用量超时走已有失败处理,分叉失败释放复制的会话。
此外,独立会话在原生退出后清除监听,重复取消或关闭保留原有生命周期;诊断刷新覆盖缺失、不支持、有更新和已是当前版本的状态。 README 已同步整段分叉与用量支持条件。
本次按 apps/workbench/README.md(cef1a7569a3e61bf66940f9b0f6ff8ebc989c009)核对 OAR_CAPABILITIES 的实现。其中比较的是仓库实际调用方所获得的结果,远端整套发布流水线单独记录。
对主干的风险 / Risks
HTTP 用真实路由与两个脚本化 OAR 供应商。实际付费账号、平台级配额和所有宿主版本组合未现场验证。若与 #10275 一起落地,两处共享适配器有文本冲突,已在独立整合树验证合并后的技能、分叉及断线交接。按路径取旧来源时不会复用新来源的预览,缺失与不支持状态有各自诊断;账号用量超时走已有失败处理,分叉失败释放复制的会话。另在主干与本分支重跑同一条 Ruff 检查,都报 executor.py 第 91 行相同的 F401。这是独立的合并门禁问题。上述证据支持本次所修改的调用边界;对未执行的平台不作延伸判断。
我的整体评价 / Verdict
桌面亮色和手机深色各检查了 Skills、MCP 及诊断页。部分读取提示在列表前面,无匹配搜索仍给出反馈,技能详情显示所选只读来源,诊断把可用更新放在已装版本旁。画面使用固定的本机数据与真实页面组件,未覆盖各语言、所有主题组合和远程多机布局。能力是否存在由已安装的 OAR 运行时决定,技能管理器负责排序和按路径取回详情,界面沿用宿主返回的只读事实。这个 PR 复用现有 HTTP、线程管理与 OAR 会话所有者,同时让每个只读来源保留自己的描述和元数据。
English verdict: APPROVE at cef1a75. Read-only skill identity, independently scoped previews, runtime-gated fork and quota, and the user guide now agree.
This PR targets #10241 (
codex/oar-pr2-eliminate-py-js-pingpong) and uses its direct Node host. #9854 has landed onmain. Land #10241 first, then compare this PR’s Workbench changes againstmainbefore landing it.Summary
Exposes existing
@botiverse/oar@0.142.0capabilities across all 9 Workbench OAR runtimes (cursor,codebuddy,devin,factory,grok,kimi,opencode,qoder,qwen) while preserving strict read-only guarantees and deduplicating standalone vs Core-bridged OAR session lifecycle handling:commands(cwd)): Wiresruntime.commands(installed, { cwd, env })intoOarAdapter.commands(cwd)viamapOarCommands, gracefully returning[]onunsupported,unavailable, or errors.AgentAdapterwith optional async read-onlylistSkills(cwd)andlistMcpServers(cwd)methods wired intoSkillsManager,McpManager, HTTP routes (/api/skills,/api/skills/detail,/api/mcpwith validated optional?cwd=), and read-only-aware Workbench web UI (SkillsPage.tsx,McpPage.tsx,api.ts, locales). OAR adapters never fabricate writableskillDirs, config paths, ormcpInstall/mcpRemovehandlers.accountUsage→fetchQuota()): Dynamically setscapabilities.quotawhentypeof runtime.accountUsage === 'function'(factory,grok,kimi), implementsfetchQuota()/mapOarAccountUsage(windows,balances,plan,note,checkedAt,reauth_required→ 409agent_login_required), and lazily probes cold-start dynamic capabilities inThreadManager.agentQuota.capabilities.fork+forkSession): Dynamically setscapabilities.forkfrom!installedSessionCapabilities(runtime, installed).refusedSessionOptions?.fork(enabled for OpenCode v2, refused on OpenCode v1 and the other 8 runtimes;forkAtandforkIntoremainfalsewithout native history/anchors) and uses the same Core or standalone backend for ordinary sessions and forks. A successful fork returns a distinct native session ID and releases the temporary handle.diagnose()/checkUpdate): ImplementsOarAdapter.diagnose()surfacingprotocol,version, and read-onlyruntime.checkUpdate()(devin,factory,grok,kimi) inRuntimeDiagnostic/ObservabilityPage.tsx. Never invokes mutatingruntime.upgrade()(Workbench has no agent CLI upgrade surface).oar.ts&oar-core.ts): Extracts sharedOarSessionDriver,assertOarAbortConfirmed, andobserveNativeOarSessionintooar-events.tsandoar-status.tsso standalone and Core-bridged OAR sessions share event projection, image conversion, active-turn guards, strict abort confirmation, idempotentclose(), andonClosedeviction.apps/workbench/packages/daemon/test/oar-parity.test.ts(zeroplaywright-coreimports) covering all mappers, the real 9-runtime OAR capability matrix (including OpenCode v1 vs v2), read-only skills/MCP HTTP & write-refusal paths, quota cold-start & mapping, fork & disposal, read-only diagnostics, and shared session lifecycle guarantees.Integration verification
Verification before restacking
node scripts/ci/lint-external-transports.mjs: PASSnpm --prefix apps/workbench run typecheck(all 6 workspaces, Nodev24.23.0): PASSoar-parity,oar,oar-core,oar-thread-status,skills,mcp,quota,quota-inband,quota-resume,fork-subchat,workbench-lifecycle): 92/92 PASS (including 22/22 PASS foroar-parity+oar-core+oar-thread-statuswithoutplaywright-core)TZ=UTC npm --prefix apps/workbench test -w @loopx/loochat-web): 824/824 PASS@pr-verifier(Add meta source registry self-repair smoke #41).