MCP 现代化进度
August 1, 2026 · View on GitHub
目标
参考 Codex MCP 设计,把 Lime MCP 功能从简化 stdio-only 形态收敛到 App Server current 主链下的可治理 runtime:
src/lib/api/mcp.ts -> App Server JSON-RPC -> lime-rs/crates/mcp
分类
current:lime-rs/crates/mcp、App Servermcp*JSON-RPC methods、前端src/lib/api/mcp.tscurrent:OAuth completion 只由 App ServermcpServer/oauthLogin/completedtyped notification 投影给 Renderercurrent:runtime 工具命名mcp__<server>__<tool>,extension surface key 继续使用mcp__<server>current:ToolSearchBridgeTool消费 MCP inventory / search 结果test-only:retired MCP facade 只允许停留在 contract forbidden snippet、smoke 观测黑名单与负向测试文本中dead / deleted / forbidden-to-restore:旧 Tauri MCP facade、src/lib/desktop-host/mcpMocks.*与 desktop-host 默认 mock 回退;不得恢复为生产入口
2026-06-20 本轮完成
McpServerConfig支持 legacy stdio 配置与streamable_http配置。- MCP manager 支持 stdio / streamable HTTP 两类 transport 启动。
- 状态列表新增
runtime_status,暴露 transport、enabled、required、timeout、parallel tool calls 与 server capabilities。 - 工具策略拆出
naming.rs与tool_policy.rs,统一 runtime 命名、caller 校验、deferred loading、tool search scoring。 enabled_tools/disabled_tools以 inner tool name 过滤,不受mcp__<server>__<tool>runtime 名影响。- streamable HTTP 目前只接入
bearer_token_env_var;自定义 header / env header 配置 fail closed,避免假支持。 - 前端 MCP API 类型同步 stdio / streamable HTTP union,并保留
runtime_status。
2026-06-21 本轮完成
- streamable HTTP 已接入
http_headers与env_http_headers,使用自定义reqwest::Client默认 header 注入到 rmcp transport。 env_http_headers缺失环境变量、非法 header name/value、重复 header、bearer_token_env_var与authorizationheader 冲突都会 fail closed。- HTTP transport 构造拆到
lime-rs/crates/mcp/src/streamable_http.rs,避免继续向超大manager.rs追加传输细节。 McpServerConfig补充 snake_case / camelCase header 配置解析回归。- MCP config 层已识别 Codex 对齐字段:
scopes、oauth.client_id/oauth.clientId、oauth_resource/oauthResource。 - OAuth 配置只允许保存到
streamable_httpserver;stdio 携带 OAuth 配置、inlinebearer_token、非法 OAuth 形状都会在保存或解析阶段 fail closed。 - runtime 启动时遇到显式
oauth.client_id/oauth_resource仍明确 fail closed,提示当前 rmcp connector 还不能无损承接这类配置;可先使用动态 OAuth 登录、bearer_token_env_var或 HTTP headers。 runtime_status.auth_status已投影 MCP server 授权可用性:none/static_headers标记为可用;动态 OAuth 标记为available=true且reason_code=oauth_login_required;显式client_id/oauth_resource标记为available=false且reason_code=oauth_runtime_not_implemented。- OAuth 状态新增
action_plan,把下一步明确投影为oauth_login + login_required + mcp_server_oauth_login,并保留scopes / oauth_resource / client_id,为后续 GUI approval event 链和持久 token storage 接入留单一状态入口。 - MCP 授权状态逻辑已从超大
types.rs拆到lime-rs/crates/mcp/src/auth_status.rs,避免继续向中心类型文件追加业务投影逻辑。 - MCP 事件 payload 已从
types.rs拆到lime-rs/crates/mcp/src/events.rs,把中心类型文件从超过 1000 行拉回代码体量边界内。 - 新增 App Server current method
mcpServer/oauth/login,链路为src/lib/api/mcp.ts -> packages/app-server-client -> App Server processor -> RuntimeCore -> LocalAppDataSource -> McpClientManager。 - 新增
McpOAuthRegistry,基于 rmcpAuthorizationManager/OAuthState启动本地 callback server/oauth/callback,动态 OAuth 登录返回authorizationUrl + state。 - streamable HTTP OAuth 启动接入
AuthClient<reqwest::Client>;未完成登录或内存 token 缺失时启动 fail closed,错误提示先运行mcpServer/oauth/login。 - MCP OAuth token store 已从进程内
InMemoryCredentialStore收敛到PersistentCredentialStore,凭据落在 app data runtimemcp/oauth子目录,key 同时包含 server name 与 server URL,避免同名换 URL token 串用。 - OAuth 凭据文件采用 versioned JSON envelope;损坏 JSON、版本不匹配、server name / URL 不匹配均 fail closed,不会把异常凭据当成已授权状态。
runtime_status.auth_status已接入持久 token 查询;动态 OAuth server 有 token 时投影为mode=oauth, available=true且不再返回oauth_login_requiredaction plan。- OAuth 登录完成后写入持久 token store,App 重启后的 streamable HTTP OAuth 启动可通过
AuthorizationManager::initialize_from_store()恢复。 - App Server protocol schema、schema fixtures、npm client generated types、package client 测试与 MCP API fail-closed 测试已同步
mcpServer/oauth/login。 - MCP 管理面已消费
runtime_status.auth_status.action_plan:动态 OAuth 缺授权时显示登录入口,调用mcpServer/oauth/login并用系统浏览器打开authorizationUrl;显式client_id/oauth_resourceunsupported 状态只显示不可用提示,不提供假登录入口;已授权状态显示为“已授权”。 - MCP OAuth 登录入口已补五语言
settings文案与McpPanel组件回归,覆盖登录打开、unsupported fail-closed 和已授权状态。 - OAuth callback 完成后由 App Server 发出
mcpServer/oauthLogin/completedtyped notification,前端useMcp经 typed event bus 自动刷新 server/tool 列表,McpPanel给出“授权已完成,状态已刷新”的五语言 toast。 - 参考 Codex 的
mcpServer/oauth/login -> async completion notification设计后,补齐本地回环 OAuth provider completion 回归:测试真实跑 rmcp metadata discovery、dynamic client registration、authorization redirect、callback、token exchange、持久 token store 与 App Server typed notification 投影。 - 动态 OAuth 登录现在复用 streamable HTTP 的
http_headers/env_http_headers构造路径;metadata discovery、dynamic client registration、持久凭据恢复和授权后的 MCP HTTP transport 使用同一组默认 headers,避免 OAuth 登录链路与普通 streamable HTTP 链路分叉。 - 动态 OAuth scopes 对齐 Codex 解析优先级:登录参数 scopes > server 配置 scopes > provider discovery
scopes_supported> 空;discovery scopes 会去重、trim 并过滤空值,只在用户未显式传入且 server 未配置 scopes 时启用。 - OAuth callback 支持标准 provider error 回调(如
error=invalid_scope&error_description=...),不再等到 5 分钟超时;App Server 立即通过mcpServer/oauthLogin/completed { success: false, error }把失败投影给 GUI。 - OAuth 回归测试已拆到
lime-rs/crates/mcp/src/oauth_tests.rs,oauth.rs保持在代码体量边界内;manager.rs巨型文件未继续追加新逻辑。 - MCP manager 已按职责拆分为
manager/lifecycle.rs、manager/tools.rs、manager/prompts.rs、manager/resources.rs与manager/tests/*;manager.rs从 3000+ 行收敛到状态、连接池、缓存与事件 facade,当前最大子模块约 533 行,避免后续 transport / 工具 / prompt / resource 逻辑继续堆回中心文件。 - MCP GUI OAuth 登录打开授权页已从
window.open收敛到openExternalUrlWithSystemBrowsercurrent 外链网关,避免 Electron 下绕过 Desktop Host 的浏览器打开链路;组件回归覆盖授权 URL 通过系统浏览器网关打开且不回退window.open。 - 删除 OAuth 授权页旧
window.openpopup blocked 五语言文案settings.mcpPage.runtime.auth.oauthPopupBlocked;该 key 在系统浏览器 current 网关接入后已零引用。 - MCP crate 顶层与 client 注释去掉旧
Tauri AppHandle绑定说法,统一为DynEmitter/ 桌面宿主解耦表述;旧 Tauri wrapper 只保留在 MCP README 的防回流说明中。 smoke:mcp-current新增--allow-oauth-fixture可选证据路径:同一 MCP current smoke 入口会创建本地 OAuth provider,走app_server_handle_json_lines -> mcpServer/oauth/login,调用 Electronopen_external_url系统浏览器 current 网关,并等待 callback token exchange 后的runtime_status.auth_status授权回流;该 fixture 不依赖真实外部账号或 live Provider。- OAuth Rust 本地 provider 回归已补 loopback
NO_PROXY测试保护,覆盖开发机系统代理会把127.0.0.1误送代理导致 fixture 502 的场景;生产 OAuth discovery / dynamic registration / authorized MCP transport 继续使用 Lime 构造的 no-proxy/custom-header reqwest client。 - 当前 refresh 生命周期仍交给 rmcp
AuthorizationManager;GUI 已能完成登录完成后的状态回流,并已有本地 OAuth provider + Electron 系统浏览器 current 网关可重复 smoke 入口,但真实第三方 OAuth provider 账号流仍是后续人工 / live-gated 证据项。 - MCP control-plane 已补
structuredContent端到端 current 证据:临时 stdio MCP fixture 的tools/list暴露outputSchema.structuredContent,tools/call返回structuredContent,smoke:mcp-current -- --allow-write-fixture经app_server_handle_json_lines -> App Server JSON-RPC断言mcpTool/list、mcpTool/listForContext、mcpTool/search与mcpTool/call都保留结构化结果事实。 scripts/check-app-server-client-contract.mjs已把 MCP current smoke 的outputSchemaStructuredContentSeen、structuredContentEcho、outputSchema、structuredContent与 legacy 命令禁回流断言纳入npm run test:contracts,避免该证据只停留在单独 vitest。- profiling 文档已把旧
mcp_call_tool/mcp_start_server/mcp_list_tools示例收口为mcpTool/call/mcpServer/start/mcpTool/listcurrent method 口径,并明确旧mcp_*/get_mcp_serversTauri facade 不再作为 profiling 目标。 - MCP runtime/read model 到 Agent Chat 的基础 GUI 展示闭环已补:
AgentToolExecutionResult承载structuredContent/structured_content,历史 hydrate 从thread_read.tool_calls.structured_content透传到toolCall.result.structuredContent,ToolCallDisplay与InlineToolProcessStep在纯协议包络输出时优先展示结构化结果里的用户正文(含 MCP 常见answer字段),避免 GUI 退回展示request_metadata/ diagnostics JSON。 - MCP
structuredContent已补真实 Electron fixture 级 Agent Chat GUI 可见证据:smoke:claw-chat-current-fixture -- --scenario mcp-structured-content通过真实 Electron Desktop Host、GUI 输入框、app_server_handle_json_lines -> agentSession/turn/start -> external fixture backend -> agentSession/readcurrent 链路,断言mcp__docs__diagnostic_probe工具结果的structuredContent.answer在 GUI 可见,同时request_metadata/diagnostics/mcp_tool_result_projection协议包络不外泄到聊天展示。 smoke:agent-runtime-current-fixture聚合 guard 已纳入 MCP structuredContent Electron fixture,避免该证据只停留在单项脚本;仍保持LIME_ALLOW_LIVE_PROVIDER_SMOKE=0、LIME_REAL_API_TEST=0,不调用真实 Provider,不使用 App Server mock backend 或 renderer mock fallback。- MCP 旧 Desktop facade 回流守卫收口:
internal/aiprompts/commands.md已补 MCP 控制面 current method 清单,明确src/lib/api/mcp.ts -> AppServerClient.request(...) -> app_server_handle_json_lines -> App Server JSON-RPC -> lime-rs/crates/mcp为唯一主链,并把get_mcp_servers、mcp_list_*、mcp_call_*、mcp_get_prompt、mcp_read_resource、mcp_start_server、mcp_stop_server、add/update/delete/toggle/import/sync_mcp*归类为dead / retired guard-only。 scripts/check-app-server-client-contract.mjs已把 MCP 控制面文档事实源纳入npm run test:contracts,并补齐src/lib/api/mcp.ts禁止 legacy list / prompt / resource 命令字符串的 renderer gateway guard,防止后续把旧 MCP facade 当成前端网关 fallback。- MCP resource templates 已进入 current 控制面投影:
mcpResource/list继续返回resources,同时新增resourceTemplates,由McpClientManager::list_resource_templates()调 rmcpresources/templates/list聚合 running server 的资源模板;前端保持listResources()兼容资源数组,并新增listResourcesWithTemplates()返回{ resources, resourceTemplates }。 - App Server protocol schema fixture 与
packages/app-server-clientgenerated types 已同步McpResourceListResponse.resourceTemplates;smoke:mcp-current -- --allow-write-fixture的 stdio fixture 现在响应resources/templates/list并在 summary 记录resourceTemplatesSeen / resourceTemplateUriTemplate,契约守卫已纳入npm run test:contracts。
2026-06-22 本轮完成
- Agent Workspace
agentSession/toolInventory/read已接入 MCP current snapshot:RuntimeBackend将现有 App ServerAppDataSource传入 inventory builder,后端读取list_mcp_servers_with_status()与list_mcp_tools(),不再固定返回空mcp_servers / mcp_tools。 - MCP inventory snapshot 现在会投影 server 名、MCP runtime tool definition、
mcp_tool_total / mcp_tool_visible_total、runtime_tools.source_kind=mcp与source_label=<server>,让动态mcp__<server>__<tool>工具可复核。 ListMcpResourcesTool/ReadMcpResourceTool的 inventory 可见性不再固定隐藏;只要 MCP current status 中存在 running 且声明 supports resources 的 server,resource helpers 会在 registry inventory 中可见。- MCP snapshot 读取失败或单个工具条目无法反序列化时不会让 inventory 整体失败,而是写入
warnings,避免把后端缺口伪装成“没有 MCP 工具”。 - 新增
lime-rs/crates/app-server/src/runtime_backend/tests/tool_inventory.rs,把本轮测试从超大runtime_backend/tests.rs拆出,只在中心测试文件保留子模块接线。 - MCP resource read grounding 已接入 App Server current evidence/export:
ReadMcpResourceTool/read_mcp_resource的server、uri、mimeTypes、contentCount与contentRefs会进入observability_summary.mcp_resource_reads,证明最终引用可回放同一个 MCP resource URI,同时不把 resource 正文或 blob 复制进 summary。 - 前端 Agent Runtime evidence projection 已同步
mcp_resource_reads类型与 normalizer,兼容 camelCase / snake_case evidence pack 输入;本轮不新增 GUI 文案,避免把 resource 正文展示逻辑混进 evidence 元数据投影。 - MCP 标准资源通知已进入 current 事件链:
LimeMcpClient覆盖 rmcpnotifications/resources/list_changed与notifications/resources/updated,通过DynEmitter发出mcp:resources_updated/mcp:resource_updated;前端useMcp监听后重新走mcpResource/list刷新资源列表,不新增 App Server method、不回退旧 Desktop facade。 - MCP 事件桥守卫已补:
mcp:事件前缀纳入shouldDisallowMockEventFallbackInBrowser,commands.md与契约脚本记录 MCP runtime events 只能来自真实 MCP manager / rmcp notification / OAuth registry,浏览器模式不得静默 mock fallback。 - MCP 标准资源订阅控制面已进入 current JSON-RPC 主链:新增
mcpResource/subscribe/mcpResource/unsubscribe,由src/lib/api/mcp.ts -> AppServerClient.request(...) -> App Server JSON-RPC -> McpClientManager::subscribe_resource / unsubscribe_resource()调 rmcp 标准resources/subscribe/resources/unsubscribe;旧 MCP Desktop facade 仍为dead / retired guard-only,不新增 mock fallback。 - MCP GUI 资源预览已消费标准资源订阅控制面:
useMcp暴露subscribeResource/unsubscribeResourcecurrent API 包装,McpPanel -> McpResourcesBrowser在打开资源预览时订阅、切换 / 关闭 / 卸载时退订;订阅失败不阻断资源读取,但不会新增可见假成功或 mock fallback。 - MCP GUI resource preview/offload 策略已补齐:
McpResourcesBrowser通过本地mcpResourcePreviewview model 对McpResourceContent做 MIME-aware 展示,文本资源只渲染 8000 字符以内的 preview 并显示截断摘要,image/blob 资源只显示字节摘要,不把 base64 或完整大文本继续压进 DOM;该改动只消费mcpResource/readcurrent 返回值,不新增协议面、不回退旧 facade。 - MCP current smoke 脚本体量已收口:
scripts/mcp/current-smoke.mjs从约 1134 行拆到约 316 行,协议 / 断言 / summary helper 下沉到scripts/mcp/lib/current-smoke-core.mjs,临时 stdio MCP fixture writer 下沉到scripts/mcp/lib/current-smoke-fixture.mjs;scripts/check-app-server-client-contract.mjs与scripts/mcp/current-smoke.test.mjs均改为读取入口 + lib 的聚合 current surface,避免为过 contract 把 fixture / outputSchema / resourceTemplates 证据塞回入口文件。 - MCP runtime current contract 守卫已从超大
scripts/check-app-server-client-contract.mjs拆到scripts/mcp/lib/contract-guards.mjs,根 contract 脚本只传入repoRoot/failures调用;MCP current method、renderer gateway 禁 legacy 命令、App Server 禁旧lime-rs/src/commands引用的语义保持不变,后续扩 MCP contract 不再继续膨胀根脚本。 - MCP 前端 API 网关体量已收口:公开 MCP 类型与 runtime 工具命名 helper 从
src/lib/api/mcp.ts拆到src/lib/api/mcpTypes.ts,mcp.ts继续 re-export 保持@/lib/api/mcp调用面兼容;网关文件从约 759 行降到约 512 行,继续只承接 App Server JSON-RPC request / response guard / API 方法,不新增平行入口。 - MCP 设置页体量已收口:
McpPage.tsx的 preset / 默认配置 / 启用应用标签 helper 下沉到mcpPageModel.ts,重复的导入 / 同步按钮下沉到McpPageActions.tsx;页面文件从约 751 行降到约 580 行,保留原有McpPage调用面、settings i18n key 与 App Server current API,不新增旧 facade 或 mock fallback。 - MCP 设置页已补 Context7 first-class preset:新建 MCP 服务器时可直接选择
Context7,生成streamable_http配置、远程 endpoint 与env_http_headers.CONTEXT7_API_KEY -> CONTEXT7_API_KEY环境变量引用;不内联 key、不新增 mock、不恢复旧 Desktop facade,保存后仍进入mcpServer/createcurrent JSON-RPC 主链。 - MCP resource read grounding 已进入 GUI evidence pack 展示:
HarnessEvidencePackCard直接消费 normalizedobservability_summary.mcp_resource_reads,展示 server、URI、status、mime types、content count 与 text/blob content refs 摘要;不读取 MCP resource 正文、不新增命令、不回退旧 facade。 scripts/check-app-server-client-contract.mjs已同步 queue 测试拆分后的新文件位置,second_active_turn_without_queue_fails_closed继续受npm run test:contracts保护。- Agent Runtime / Claw 渲染回归补充:
claw-chat-current-fixture-smoke.mjs已从超大单文件拆为职责模块,主入口降到约 518 行;拆分后的聚合npm run smoke:agent-runtime-current-fixture重新跑通,覆盖 history/cache hydration、流式完成控制器、Coding Workbench Electron fixture、停止后同会话继续输出、Skills Runtime natural / 显式$skill/ 工作台手动启用、MCP structuredContent、Expert Skills / Plaza / Panel 三条 Expert Skills Runtime 闭环,liveProviderUsed=false。 - WebTools 渲染真实 Electron 回归已单独复测通过:
npm run smoke:claw-chat-current-fixture -- --scenario web-tools-rendering --prefix claw-chat-current-fixture-web-tools-after-import-fix --timeout-ms 180000覆盖搜索 / 抓取工具轨迹、Markdown 正文、最终 assistant 输出与 App Server read model terminal 收口。 - 拆分后的 fixture 漏项已修复:
gui-completion-waits显式导入assert,read-model-waits显式导入ASSISTANT_DONE_TEXT与SKILLS_RUNTIME_SCENARIO;对应cancel-then-continue与skills-runtime真实 Electron 场景已单独复跑通过,避免“fixture 被拆坏”误判成产品主链失败。 - Runtime 测试大文件已按职责拆分:
coding_events.rs、external_events.rs、evidence_exports.rs、read_model.rs改为 facade + 子模块目录,拆分后runtime/tests/**最高文件为queue.rs971 行,所有已发现超过 1000 行的 runtime 测试文件已降线。 tool_item_projection已修复 current item lifecycle 与 legacy tool terminal 冲突时的 success/output 覆盖问题:currentitem.completed(success=true)后到达的 legacytool.failed只记录status_conflicts诊断,不再把success改回false。- MCP desktop-host 默认 mock 空模块已物理清理:
src/lib/desktop-host/core.ts不再动态加载mcpMocks,src/lib/desktop-host/mcpMocks.ts/.d.ts/.test.ts删除;scripts/check-command-contracts.mjs改为禁止恢复该 mock 模块,并继续守住旧 MCP 命令不得进入 DevBridge truth、mock priority、legacy Rust dispatcher 或 desktop-host 默认 mock loader。 - MCP 工程说明文档已从旧
lime-rs/src/services/mcp_service.rs/ 简化内存McpService示例更新为 current 设计:internal/aiprompts/mcp.md现在只描述 App Server JSON-RPC 控制面、lime-rs/crates/mcptransport/auth owner、mcp__<server>__<tool>命名、resources / prompts / evidence 约束和 live-gated smoke 入口;旧 Desktop facade 只保留在dead / retired guard-only清单。 - 服务层导航里的 MCP 旧 owner 已收口:
internal/aiprompts/services.md改为 current owner 地图,MCP 指向lime-rs/crates/mcp+ App Servermcp*JSON-RPC;internal/aiprompts/overview.md的能力层表也不再把lime-rs/src/services/mcp_service.rs当现役模块。
已验证
-
cargo fmt --manifest-path "lime-rs/Cargo.toml" --package lime-mcp -
cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp -
CARGO_TARGET_DIR="/tmp/lime-target-mcp" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp -
cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server-protocol schema --lib --test schema_fixtures -
cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server-protocol catalog --lib -
cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-core mcp_model --lib -
cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server mcp --lib -
npm test -- "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" -
npm test -- "src/components/mcp/McpPanel.test.tsx" "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" -
CARGO_TARGET_DIR="/tmp/lime-target-mcp" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp oauth -
CARGO_TARGET_DIR="/tmp/lime-target-mcp" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp -
node --check "scripts/mcp/current-smoke.mjs" && node --check "scripts/mcp/oauth-fixture-smoke.mjs" -
npm test -- "scripts/mcp/current-smoke.test.mjs" -
npm test -- "src/components/mcp/McpPanel.test.tsx" "src/hooks/useMcp.test.tsx" "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" -
npm run governance:scripts -
git diff --check -- "scripts/mcp/current-smoke.mjs" "scripts/mcp/oauth-fixture-smoke.mjs" "scripts/mcp/current-smoke.test.mjs" "scripts/README.md" "internal/exec-plans/mcp-modernization-progress.md" "lime-rs/crates/mcp/src/oauth.rs" "lime-rs/crates/mcp/src/oauth_tests.rs" "lime-rs/crates/mcp/src/streamable_http.rs" -
npm run smoke:mcp-current -- --allow-oauth-fixture --timeout-ms 30000:未通过,当前环境未启动 Electron DevBridge,失败为DevBridge 未就绪 ... fetch failed,未进入 MCP JSON-RPC / OAuth fixture 逻辑。 -
npm test -- "src/hooks/useMcp.test.tsx" "src/components/mcp/McpPanel.test.tsx" "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" -
npm run verify:gui-smoke -
npm test -- "scripts/mcp/current-smoke.test.mjs" -
node -e "for (const f of ['zh-CN','zh-TW','en-US','ja-JP','ko-KR']) JSON.parse(require('fs').readFileSync('src/i18n/resources/'+f+'/settings.json','utf8')); console.log('settings json ok')" -
rg -n "oauthPopupBlocked|window\\.open" "src/components/mcp" "src/i18n/resources" -
rg -n "Tauri|tauri" "lime-rs/crates/mcp/src" "src/components/mcp" -
cargo fmt --manifest-path "lime-rs/Cargo.toml" --package lime-mcp -
CARGO_TARGET_DIR="/tmp/lime-target-mcp" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp -
npm test -- "src/components/mcp/McpPanel.test.tsx" "src/hooks/useMcp.test.tsx" "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" -
CARGO_TARGET_DIR="/tmp/lime-target-mcp" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp start_login_completes_against_local_oauth_provider_and_persists_token -
CARGO_TARGET_DIR="/tmp/lime-target-mcp" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp -
cargo fmt --manifest-path "lime-rs/Cargo.toml" --package lime-mcp -
CARGO_TARGET_DIR="/tmp/lime-target-mcp" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp -
npm test -- "src/hooks/useMcp.test.tsx" "src/components/mcp/McpPanel.test.tsx" "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" -
CARGO_TARGET_DIR="/tmp/lime-target-mcp" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp oauth -
npm --prefix "packages/app-server-client" test -
npm run test:contracts -
npm run verify:app-version -
npm run verify:gui-smoke -
npm test -- "scripts/mcp/current-smoke.test.mjs" -
git diff --check -- <MCP/App Server protocol/client/API 写集> -
rg -n "[ \\t]+$" -- <MCP/App Server protocol/client/API 写集> -
rg -n "^(<<<<<<<|=======|>>>>>>>)" -- <MCP/App Server protocol/client/API 写集> -
node --check "scripts/mcp/current-smoke.mjs" -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000 -
npm run smoke:mcp-current -- --allow-write-fixture --timeout-ms 120000:通过,summary 显示ok=true、appServerHandleJsonLinesSeen=true、legacyMcpCommandsSeen=[]、missingFixtureMethods=[]、outputSchemaStructuredContentSeen=true、structuredContentEcho.echoedMessage="hello current MCP"。 -
npm run test:contracts -
npm run governance:scripts -
npm run docs:boundary -
git diff --check -- "scripts/mcp/current-smoke.mjs" "scripts/mcp/current-smoke.test.mjs" "scripts/README.md" "internal/aiprompts/performance-profiling.md" "scripts/check-app-server-client-contract.mjs" -
CARGO_TARGET_DIR="/tmp/lime-target-mcp-runtime" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server runtime_agent_tool_end_preserves_structured_content_in_result_payload -- --nocapture -
CARGO_TARGET_DIR="/tmp/lime-target-mcp-runtime" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server read_session_merges_tool_started_arguments_into_completed_tool_calls -- --nocapture -
CARGO_TARGET_DIR="/tmp/lime-target-mcp-runtime" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server export_evidence_records_skill_invocation_from_tool_metadata -- --nocapture -
npx vitest run "src/lib/api/agentRuntime/appServerEvidenceExportProjection.test.ts" "src/lib/api/agentRuntime/appServerSessionClient.test.ts" "src/components/agent/chat/utils/toolResultEnvelopeDisplay.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000 -
npx vitest run "src/components/agent/chat/components/ToolCallDisplay.test.tsx" "src/components/agent/chat/components/InlineToolProcessStep.test.tsx" "src/components/agent/chat/hooks/agentChatHistory.test.ts" "src/components/agent/chat/utils/toolResultEnvelopeDisplay.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000 -
npx eslint "src/lib/api/agentProtocol.ts" "src/components/agent/chat/utils/toolResultDetailText.ts" "src/components/agent/chat/hooks/agentChatToolResult.ts" "src/components/agent/chat/hooks/agentChatHistory.ts" "src/components/agent/chat/components/ToolCallDisplay.tsx" "src/components/agent/chat/components/InlineToolProcessStep.tsx" "src/components/agent/chat/components/ToolCallDisplay.test.tsx" "src/components/agent/chat/components/InlineToolProcessStep.test.tsx" "src/components/agent/chat/hooks/agentChatHistory.test.ts" --max-warnings 0 -
git diff --check -- "src/lib/api/agentProtocol.ts" "src/lib/api/agentProtocol.d.ts" "src/components/agent/chat/utils/toolResultDetailText.ts" "src/components/agent/chat/hooks/agentChatToolResult.ts" "src/components/agent/chat/hooks/agentChatHistory.ts" "src/components/agent/chat/components/ToolCallDisplay.tsx" "src/components/agent/chat/components/InlineToolProcessStep.tsx" "src/components/agent/chat/components/ToolCallDisplay.test.tsx" "src/components/agent/chat/components/InlineToolProcessStep.test.tsx" "src/components/agent/chat/hooks/agentChatHistory.test.ts" -
npm run smoke:agent-runtime-current-fixture:通过,覆盖 history/cache hydration、turn.completed工具收尾(legacyfinal_done仅负向 guard)、Claw 终态 UI、Electron fixture guard、真实 GUI coding 输入到 Coding Workbench、cancel-then-continue 与 Skills Runtime 三入口,liveProviderUsed=false。 -
过滤名误试:
read_session_preserves_tool_arguments_and_structured_content与export_evidence_projects_workspace_skill_tool_invocations匹配 0 个测试,不能作为有效证据;已改用上面两个准确测试名复跑通过。 -
node --check "scripts/agent-runtime/claw-chat-current-fixture-smoke.mjs" -
node --check "scripts/agent-runtime/current-fixture-regression-smoke.mjs" -
npx vitest run "scripts/agent-runtime/claw-chat-current-fixture-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000 -
npm run smoke:claw-chat-current-fixture -- --scenario mcp-structured-content --prefix claw-chat-current-fixture-mcp-structured-content-regression --timeout-ms 180000:通过,真实 Electron fixture 显示mcp__docs__diagnostic_probe的结构化答案进入 Agent Chat GUI,且协议包络未外泄。 -
npm run smoke:agent-runtime-current-fixture:通过,聚合 guard 额外覆盖 MCP structuredContent 到 Agent Chat GUI 可见 Electron fixture,liveProviderUsed=false。 -
cargo run --manifest-path "lime-rs/Cargo.toml" -p app-server-protocol --bin write_schema_fixtures -
npm run generate:protocol-types -
cargo fmt --manifest-path "lime-rs/Cargo.toml" --package lime-mcp --package app-server-protocol --package app-server -
npm run check:protocol-types -
node --check "scripts/mcp/current-smoke.mjs" && node --check "scripts/check-app-server-client-contract.mjs" -
CARGO_TARGET_DIR="/tmp/lime-target-mcp-resource-templates" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp resource -
cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server-protocol schema --lib --test schema_fixtures -
npx vitest run "src/lib/api/mcp.test.ts" "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000 -
node "scripts/check-app-server-client-contract.mjs":通过,281 checks。 -
npm run test:contracts -
CARGO_TARGET_DIR="/tmp/lime-target-appserver-mcp-resource-templates" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server mcp_current_jsonrpc_starts_real_stdio_server_and_reads_tool_resource -- --nocapture -
cargo fmt --manifest-path "lime-rs/Cargo.toml" --package app-server -
CARGO_TARGET_DIR="/tmp/lime-target-mcp-inventory" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server runtime_backend_tool_inventory -- --nocapture -
npx vitest run "src/lib/api/agentRuntime/inventoryClient.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000 -
npm run test:contracts -
git diff --check -- "lime-rs/crates/app-server/src/runtime_backend/tool_inventory.rs" "lime-rs/crates/app-server/src/runtime_backend.rs" "lime-rs/crates/app-server/src/runtime_backend/tests.rs" "lime-rs/crates/app-server/src/runtime_backend/tests/tool_inventory.rs" "internal/exec-plans/mcp-modernization-progress.md" -
cargo fmt --manifest-path "lime-rs/Cargo.toml" --package app-server -
CARGO_TARGET_DIR="/tmp/lime-target-mcp-resource-evidence" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server mcp_resource_reads_summary -- --nocapture -
CARGO_TARGET_DIR="/tmp/lime-target-mcp-resource-evidence" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server export_evidence_records_skill_invocation_from_tool_metadata -- --nocapture -
npx vitest run "src/lib/api/agentRuntime/appServerEvidenceExportProjection.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000 -
npx eslint "src/lib/api/agentRuntime/types.ts" "src/lib/api/agentRuntime/normalizers.ts" "src/lib/api/agentRuntime/appServerEvidenceExportProjection.test.ts" --max-warnings 0 -
node "scripts/check-app-server-client-contract.mjs" -
npm run test:contracts -
git diff --check -- "lime-rs/crates/app-server/src/runtime/evidence_provider.rs" "lime-rs/crates/app-server/src/runtime/evidence_provider/observability.rs" "lime-rs/crates/app-server/src/runtime/tests/evidence_exports.rs" "src/lib/api/agentRuntime/types.ts" "src/lib/api/agentRuntime/types.d.ts" "src/lib/api/agentRuntime/normalizers.ts" "src/lib/api/agentRuntime/appServerEvidenceExportProjection.test.ts" "scripts/check-app-server-client-contract.mjs" "lime-rs/crates/app-server/src/runtime/projection_store.rs" -
for f in scripts/agent-runtime/claw-chat-current-fixture-*.mjs scripts/agent-runtime/skills-runtime-fixture-scenario.mjs; do node --check "$f"; done -
npx vitest run "scripts/agent-runtime/claw-chat-current-fixture-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000 -
npm run smoke:claw-chat-current-fixture -- --scenario cancel-then-continue --timeout-ms 180000 --prefix claw-chat-current-fixture-cancel-after-split -
npm run smoke:claw-chat-current-fixture -- --scenario skills-runtime --timeout-ms 180000 --prefix claw-chat-current-fixture-skills-runtime-after-split -
npm run smoke:claw-chat-current-fixture -- --scenario web-tools-rendering --timeout-ms 180000 --prefix claw-chat-current-fixture-web-tools-after-import-fix -
npx playwright --version:Version 1.59.1,本仓库当前无常规 Playwright config / spec 套件,GUI E2E 继续走仓库维护的 Electron fixture Playwright driver 入口。 -
npm run smoke:agent-runtime-current-fixture:通过,覆盖 history/cache hydration、流式完成控制器、Claw 终态 UI、Electron fixture guard、Coding Workbench、停止后继续、Skills Runtime、MCP structuredContent、Expert Skills / Plaza / Panel,liveProviderUsed=false。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance 与 docs boundary。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready。 -
cargo fmt --manifest-path "lime-rs/Cargo.toml" --package app-server -
CARGO_TARGET_DIR="/tmp/lime-target-runtime-tests-split" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server evidence_exports -- --nocapture:10 passed。 -
CARGO_TARGET_DIR="/tmp/lime-target-runtime-tests-split" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server coding_events -- --nocapture:35 passed。 -
CARGO_TARGET_DIR="/tmp/lime-target-runtime-tests-split" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server external_events -- --nocapture:21 passed。 -
CARGO_TARGET_DIR="/tmp/lime-target-runtime-tests-split" cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server read_model -- --nocapture:18 passed。 -
npm run test:contracts:拆分后复跑通过,scripts/check-app-server-client-contract.mjs已纳入runtime/tests/external_events/**子模块。 -
cargo fmt --manifest-path "lime-rs/Cargo.toml" --package lime-mcp -
CARGO_TARGET_DIR="/tmp/lime-target-mcp-resource-events" cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp client -- --nocapture:8 passed。 -
npx vitest run "src/hooks/useMcp.test.tsx" "src/lib/dev-bridge/mockPriorityCommands.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:11 passed。 -
npx eslint "src/hooks/useMcp.ts" "src/hooks/useMcp.test.tsx" "src/lib/dev-bridge/commandPolicy.ts" "src/lib/dev-bridge/mockPriorityCommands.test.ts" --max-warnings 0 -
node "scripts/check-app-server-client-contract.mjs":通过,281 checks。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance 与 docs boundary。 -
git diff --check -- "lime-rs/crates/mcp/src/events.rs" "lime-rs/crates/mcp/src/lib.rs" "lime-rs/crates/mcp/src/client.rs" "src/hooks/useMcp.ts" "src/hooks/useMcp.test.tsx" "src/lib/dev-bridge/commandPolicy.ts" "src/lib/dev-bridge/mockPriorityCommands.test.ts" "internal/aiprompts/commands.md" "scripts/check-app-server-client-contract.mjs" "internal/exec-plans/mcp-modernization-progress.md" -
cargo fmt --manifest-path "lime-rs/Cargo.toml" --package lime-mcp --check -
npx vitest run "src/components/agent/chat/components/HarnessStatusPanel.exports.test.tsx" "src/lib/api/agentRuntime/appServerEvidenceExportProjection.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000 -
npx eslint "src/components/agent/chat/components/HarnessEvidencePackCard.tsx" "src/components/agent/chat/components/HarnessStatusPanel.exports.test.tsx" --max-warnings 0 -
node -e "for (const f of ['zh-CN','zh-TW','en-US','ja-JP','ko-KR']) JSON.parse(require('fs').readFileSync('src/i18n/resources/'+f+'/agent.json','utf8')); console.log('agent json ok')" -
npm run test:contracts -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready。 -
npx vitest run "src/components/mcp/mcpResourcePreview.unit.test.ts" "src/components/mcp/McpPanel.test.tsx" "src/hooks/useMcp.test.tsx" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:18 passed,覆盖资源 preview 截断、blob 摘要、MCP 面板资源预览接线与订阅生命周期。 -
npx eslint "src/components/mcp/McpResourcesBrowser.tsx" "src/components/mcp/McpPanel.test.tsx" "src/components/mcp/mcpResourcePreview.ts" "src/components/mcp/mcpResourcePreview.unit.test.ts" --max-warnings 0 -
node -e "for (const locale of ['zh-CN','zh-TW','en-US','ja-JP','ko-KR']) { JSON.parse(require('fs').readFileSync('src/i18n/resources/' + locale + '/settings.json', 'utf8')); } console.log('settings i18n json ok')" -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance 与 docs boundary。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready。 -
git diff --check -- "src/components/mcp/McpResourcesBrowser.tsx" "src/components/mcp/mcpResourcePreview.ts" "src/components/mcp/mcpResourcePreview.unit.test.ts" "src/components/mcp/McpPanel.test.tsx" "src/i18n/resources/zh-CN/settings.json" "src/i18n/resources/zh-TW/settings.json" "src/i18n/resources/en-US/settings.json" "src/i18n/resources/ja-JP/settings.json" "src/i18n/resources/ko-KR/settings.json" -
node --check "scripts/mcp/current-smoke.mjs" && node --check "scripts/mcp/lib/current-smoke-core.mjs" && node --check "scripts/mcp/lib/current-smoke-fixture.mjs" && node --check "scripts/mcp/current-smoke.test.mjs" -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:2 passed,覆盖拆分后入口 + lib 聚合 current surface。 -
node "scripts/check-app-server-client-contract.mjs":通过,281 checks,MCP current smoke contract 已能跨入口与scripts/mcp/lib/*聚合扫描。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
node "scripts/mcp/current-smoke.mjs" --help -
wc -l "scripts/mcp/current-smoke.mjs" "scripts/mcp/lib/current-smoke-core.mjs" "scripts/mcp/lib/current-smoke-fixture.mjs":入口约 316 行,core 约 691 行,fixture writer 约 157 行。 -
node --check "scripts/check-app-server-client-contract.mjs" && node --check "scripts/mcp/lib/contract-guards.mjs" -
node "scripts/check-app-server-client-contract.mjs":通过,281 checks,MCP runtime current contract 改为从scripts/mcp/lib/contract-guards.mjs调用。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
wc -l "scripts/check-app-server-client-contract.mjs" "scripts/mcp/lib/contract-guards.mjs":根 contract 脚本约 8447 行,MCP contract guard 模块约 425 行。 -
git diff --check -- "scripts/check-app-server-client-contract.mjs" "scripts/mcp/lib/contract-guards.mjs" "internal/exec-plans/mcp-modernization-progress.md" -
npx vitest run "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:16 passed。 -
npx eslint "src/lib/api/mcp.ts" "src/lib/api/mcpTypes.ts" --max-warnings 0 -
node --check "scripts/mcp/lib/contract-guards.mjs" && node --check "scripts/check-app-server-client-contract.mjs" -
npx vitest run "src/components/mcp/McpToolsBrowser.test.tsx" "src/components/mcp/McpPanel.test.tsx" "src/components/mcp/mcpResourcePreview.unit.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:15 passed,覆盖getMcpInnerToolNamere-export 与资源 preview 消费面。 -
npx eslint "src/components/mcp/McpToolsBrowser.tsx" "src/components/mcp/McpToolCaller.tsx" "src/components/mcp/McpPanel.tsx" "src/components/mcp/McpResourcesBrowser.tsx" "src/components/mcp/mcpResourcePreview.ts" "src/components/agent/chat/components/HarnessExtensionToolInventorySections.tsx" --max-warnings 0 -
node "scripts/check-app-server-client-contract.mjs":通过,281 checks,MCP contract guard 已覆盖src/lib/api/mcpTypes.ts。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
wc -l "src/lib/api/mcp.ts" "src/lib/api/mcpTypes.ts":网关约 512 行,类型模块约 262 行。 -
npx eslint "src/components/mcp/McpPage.tsx" "src/components/mcp/McpPageActions.tsx" "src/components/mcp/mcpPageModel.ts" --max-warnings 0 -
npx vitest run "src/components/mcp/McpPanel.test.tsx" "src/hooks/useMcpServers.test.tsx" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:12 passed。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
wc -l "src/components/mcp/McpPage.tsx" "src/components/mcp/McpPageActions.tsx" "src/components/mcp/mcpPageModel.ts":页面约 580 行,actions 约 79 行,model 约 72 行。 -
npx vitest run "src/components/mcp/McpPage.test.tsx" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:4 passed,覆盖 Context7 preset 保存为 currentstreamable_httpMCP 配置。 -
npx eslint "src/components/mcp/mcpPageModel.ts" "src/components/mcp/McpPage.test.tsx" --max-warnings 0 -
node -e "for (const locale of ['zh-CN','zh-TW','en-US','ja-JP','ko-KR']) JSON.parse(require('fs').readFileSync('src/i18n/resources/'+locale+'/settings.json','utf8')); console.log('settings json ok')" -
npx vitest run "src/i18n/__tests__/types.test.ts" "src/i18n/__tests__/loadNamespace.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:8 passed。 -
npm run smoke:mcp-current -- --allow-write-fixture --timeout-ms 120000 --prefix mcp-current-context7-preset:通过,summary 显示ok=true、legacyMcpCommandsSeen=[]、missingFixtureMethods=[],并覆盖mcpServer/create/start/delete、mcpTool/list/listForContext/search/call与mcpResource/readcurrent methods。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready。 -
git diff --check -- "src/components/mcp/mcpPageModel.ts" "src/components/mcp/McpPage.test.tsx" "src/i18n/resources/zh-CN/settings.json" "src/i18n/resources/zh-TW/settings.json" "src/i18n/resources/en-US/settings.json" "src/i18n/resources/ja-JP/settings.json" "src/i18n/resources/ko-KR/settings.json" -
smoke:mcp-current新增--allow-live-providerlive-gated provider E2E 入口:只从LIME_MCP_LIVE_*环境变量读取真实 streamable HTTP MCP provider 配置,经app_server_handle_json_lines -> mcpServer/create/start/status/list -> mcpTool/list -> mcpResource/list -> stop/deletecurrent 主链验证;可选LIME_MCP_LIVE_TOOL_NAME/LIME_MCP_LIVE_RESOURCE_URI时才额外执行mcpTool/call/mcpResource/read。 -
live provider smoke discovery 覆盖已补齐:真实 provider 启动后会同时调用
mcpTool/listForContext与mcpTool/search;如果配置了LIME_MCP_LIVE_TOOL_NAME,则要求mcpTool/list、mcpTool/listForContext与mcpTool/search三条 current discovery 路径都能看到同一个mcp__<server>__<tool>runtime tool,避免真实 provider 只验证裸 list 而漏掉 ToolSearch / context 可见性。 -
live provider smoke 工具调用结果已 fail-closed:如果配置了
LIME_MCP_LIVE_TOOL_NAME且mcpTool/call返回is_error / isError=true,smoke 直接失败,避免把“工具已调用但 provider/参数报错”误记为 live provider 绿色证据。 -
scripts/mcp/live-provider-smoke.mjs明确不支持 inline secret header,只允许bearer_token_env_var与env_http_headers这类 env var 引用,summary 只记录 host、env var 名称、header 名称、scope、tool/resource 标识,避免把 provider 凭证写入 evidence。 -
live provider URL secret guard 已补齐:
LIME_MCP_LIVE_SERVER_URL只接受http/httpsURL,并拒绝 username、password、query 和 hash;provider token 必须通过LIME_MCP_LIVE_BEARER_TOKEN_ENV_VAR或LIME_MCP_LIVE_ENV_HTTP_HEADERS_JSON引用,避免把凭证藏在 URL 后进入 App Server request / smoke evidence。 -
live provider secret env var 引用已补格式 guard:
LIME_MCP_LIVE_BEARER_TOKEN_ENV_VAR与LIME_MCP_LIVE_ENV_HTTP_HEADERS_JSON的 header value 必须是常规环境变量名格式,误填sk-...这类 inline secret 会 fail closed。 -
live provider resource evidence 已收窄:
LIME_MCP_LIVE_RESOURCE_URI仍作为读取参数传给mcpResource/read,但 summary 只记录resourceUriProvided、URI scheme / host / pathDepth / query/hash 布尔摘要和uriMatchesExpected,不再把完整 resource URI 写进 evidence。 -
MCP contract guard 已锁住 live provider 安全边界:
parseLiveProviderUrl、URL 禁 username/password/query/hash、env var name guard、resource URI 摘要与uriMatchesExpected都纳入scripts/mcp/lib/contract-guards.mjs的 current smoke surface snippets,后续删除这些 guard 会触发npm run test:contracts。 -
MCP current smoke 网络证据 sanitizer 已收窄 URL / URI 字段:
sanitizeJson遇到url/*Url/uri/*Uri字段时只保留 scheme、host、pathDepth、query/hash 布尔摘要,不把 provider path、query、hash 或 resource path 写入network-invoke.json;该 sanitizer helper 已进入 contract guard snippets。 -
smoke:mcp-current --help已补 live provider 安全约束:提示 URL 不得带凭证 / query / hash,LIME_MCP_LIVE_BEARER_TOKEN_ENV_VAR与LIME_MCP_LIVE_ENV_HTTP_HEADERS_JSON的 value 必须是环境变量名,减少真实 provider E2E 使用时误填 secret 字面量的概率。 -
--allow-live-provider未设置LIME_MCP_LIVE_SERVER_URL时在 DevBridge 调用前 fail closed;该入口不读defaultMocks/mockPriorityCommands,也不把无凭证环境伪装成 live provider 成功。 -
MCP contract guard 已纳入
scripts/mcp/live-provider-smoke.mjs与 live-gated current method surface,确保后续扩 live smoke 时仍走 App Server JSON-RPC current 主链。 -
node --check "scripts/mcp/current-smoke.mjs" && node --check "scripts/mcp/live-provider-smoke.mjs" && node --check "scripts/mcp/current-smoke.test.mjs" && node --check "scripts/mcp/lib/contract-guards.mjs" -
node "scripts/mcp/current-smoke.mjs" --help:通过,帮助中显示--allow-live-provider与LIME_MCP_LIVE_*环境变量列表。 -
node "scripts/mcp/current-smoke.mjs" --allow-live-provider --timeout-ms 30000 --evidence-dir "/tmp/lime-mcp-live-missing-env-check":按预期失败,直接提示缺少LIME_MCP_LIVE_SERVER_URL,未进入 DevBridge / App Server 调用。 -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:3 passed,覆盖 live-gated provider smoke 不读取 mock fallback。 -
node --check "scripts/mcp/live-provider-smoke.mjs" && node --check "scripts/mcp/current-smoke.test.mjs" && node --check "scripts/mcp/current-smoke.mjs" && node --check "scripts/mcp/lib/contract-guards.mjs" -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:3 passed,覆盖 live provider discovery 方法纳入 live-gated smoke。 -
node "scripts/mcp/current-smoke.mjs" --allow-live-provider --timeout-ms 30000 --evidence-dir "/tmp/lime-mcp-live-missing-env-check":仍按预期失败,缺LIME_MCP_LIVE_SERVER_URL时不进入 DevBridge / App Server 调用。 -
node --check "scripts/mcp/live-provider-smoke.mjs" && node --check "scripts/mcp/current-smoke.test.mjs" -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:4 passed,覆盖 live provider URL secret guard 与 evidence 只记录 host / env var 名。 -
node "scripts/mcp/current-smoke.mjs" --allow-live-provider --timeout-ms 30000 --evidence-dir "/tmp/lime-mcp-live-missing-env-check":仍按预期失败,缺LIME_MCP_LIVE_SERVER_URL时不进入 DevBridge / App Server 调用。 -
node --check "scripts/mcp/live-provider-smoke.mjs" && node --check "scripts/mcp/current-smoke.mjs" && node --check "scripts/mcp/current-smoke.test.mjs" -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:4 passed,覆盖完整 resource URI 不进入 live provider evidence。 -
node "scripts/mcp/current-smoke.mjs" --allow-live-provider --timeout-ms 30000 --evidence-dir "/tmp/lime-mcp-live-missing-env-check":仍按预期失败,缺LIME_MCP_LIVE_SERVER_URL时不进入 DevBridge / App Server 调用。 -
node --check "scripts/mcp/live-provider-smoke.mjs" && node --check "scripts/mcp/current-smoke.test.mjs" -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:4 passed,覆盖 bearer/header env var 误填 inline secret 时 fail closed。 -
node "scripts/mcp/current-smoke.mjs" --allow-live-provider --timeout-ms 30000 --evidence-dir "/tmp/lime-mcp-live-missing-env-check":仍按预期失败,缺LIME_MCP_LIVE_SERVER_URL时不进入 DevBridge / App Server 调用。 -
node --check "scripts/mcp/lib/contract-guards.mjs" && node "scripts/check-app-server-client-contract.mjs":通过,281 checks,MCP live provider 安全 snippets 已纳入 App Server client contract guard。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
node --check "scripts/mcp/current-smoke.mjs" && node --check "scripts/mcp/current-smoke.test.mjs" -
node "scripts/mcp/current-smoke.mjs" --help:通过,帮助输出已包含 live provider 安全约束。 -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:4 passed,覆盖--help保留 live provider secret guard 说明。 -
node "scripts/mcp/current-smoke.mjs" --allow-live-provider --timeout-ms 30000 --evidence-dir "/tmp/lime-mcp-live-missing-env-check":仍按预期失败,缺LIME_MCP_LIVE_SERVER_URL时不进入 DevBridge / App Server 调用。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
node --check "scripts/mcp/lib/current-smoke-core.mjs" && node --check "scripts/mcp/current-smoke.test.mjs" -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:5 passed,覆盖 network evidence 中 URL / URI 字段摘要化且不包含 path / query / hash。 -
node "scripts/mcp/current-smoke.mjs" --allow-live-provider --timeout-ms 30000 --evidence-dir "/tmp/lime-mcp-live-missing-env-check":仍按预期失败,缺LIME_MCP_LIVE_SERVER_URL时不进入 DevBridge / App Server 调用。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
node --check "scripts/mcp/lib/contract-guards.mjs" && node "scripts/check-app-server-client-contract.mjs":通过,281 checks,MCP current smoke URL / URI sanitizer snippets 已纳入 contract guard。 -
git diff --check -- "scripts/mcp/current-smoke.mjs" "scripts/mcp/live-provider-smoke.mjs" "scripts/mcp/current-smoke.test.mjs" "scripts/mcp/lib/contract-guards.mjs" "internal/exec-plans/mcp-modernization-progress.md" -
rg -n "[ \t]+$" -- "scripts/mcp/current-smoke.mjs" "scripts/mcp/live-provider-smoke.mjs" "scripts/mcp/current-smoke.test.mjs" "scripts/mcp/lib/contract-guards.mjs" "internal/exec-plans/mcp-modernization-progress.md":无命中。 -
rg -n "^(<<<<<<<|=======|>>>>>>>)" -- "scripts/mcp/current-smoke.mjs" "scripts/mcp/live-provider-smoke.mjs" "scripts/mcp/current-smoke.test.mjs" "scripts/mcp/lib/contract-guards.mjs" "internal/exec-plans/mcp-modernization-progress.md":无命中。 -
MCP current smoke 传输边界已从
scripts/mcp/lib/current-smoke-core.mjs拆到scripts/mcp/lib/current-smoke-transport.mjs:transport 只承接 DevBridge HTTP invoke、app_server_handle_json_linesJSON-RPC 解包、network evidence URL / URI 脱敏与 summary 聚合;core 只保留 MCP read/write fixture 断言与 control-plane 方法覆盖,文件体量从约 723 行降到约 409 行。 -
scripts/mcp/current-smoke.test.mjs与scripts/mcp/lib/contract-guards.mjs已同步扫描current-smoke-transport.mjs,确保APP_SERVER_HANDLE_JSON_LINES_COMMAND、legacy MCP 命令负向集合、URL / URI evidence sanitizer、live provider secret guard 搬家后仍受npm run test:contracts保护。 -
node --check "scripts/mcp/lib/current-smoke-transport.mjs" && node --check "scripts/mcp/lib/current-smoke-core.mjs" && node --check "scripts/mcp/current-smoke.test.mjs" && node --check "scripts/mcp/lib/contract-guards.mjs" && node --check "scripts/mcp/current-smoke.mjs" && node --check "scripts/mcp/live-provider-smoke.mjs" -
npx vitest run "scripts/mcp/current-smoke.test.mjs" "src/components/mcp/mcpResourcePreview.unit.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:7 passed,覆盖 smoke current guard、live provider secret/evidence guard、URL / URI network evidence 摘要与 MCP resource preview 纯逻辑。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary;MCP contract guard 已能跨 smoke 入口、core、fixture、transport 与 live provider 文件聚合扫描。 -
node "scripts/mcp/current-smoke.mjs" --allow-live-provider --timeout-ms 30000 --evidence-dir "/tmp/lime-mcp-live-missing-env-check-transport":按预期失败,直接提示缺LIME_MCP_LIVE_SERVER_URL,未进入 DevBridge / App Server 调用。 -
node --check "scripts/mcp/live-provider-smoke.mjs" && node --check "scripts/mcp/current-smoke.test.mjs":通过。 -
npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:6 passed,覆盖 live provider 工具调用is_error=true时必须失败。 -
LIME_MCP_LIVE_SERVER_URL="https://mcp.context7.com/mcp" LIME_MCP_LIVE_SERVER_NAME="context7" LIME_MCP_LIVE_TOOL_NAME="resolve-library-id" LIME_MCP_LIVE_TOOL_ARGS_JSON='{"libraryName":"openai agents python","query":"openai agents python"}' npm run smoke:mcp-current -- --allow-live-provider --timeout-ms 120000 --prefix mcp-current-context7-live-resolve:通过,summary 显示 Context7resolve-library-id可经 current live provider smoke 发现并调用,calledTool.isError=false。 -
LIME_MCP_LIVE_SERVER_URL="https://mcp.context7.com/mcp" LIME_MCP_LIVE_SERVER_NAME="context7" LIME_MCP_LIVE_TOOL_NAME="query-docs" LIME_MCP_LIVE_TOOL_ARGS_JSON='{"libraryId":"/openai/openai-agents-python","query":"AI Agent 是什么"}' npm run smoke:mcp-current -- --allow-live-provider --timeout-ms 120000 --prefix mcp-current-context7-live-query-docs-after-iserror-guard:通过,summary 显示toolCount=2、toolsForContextCount=2、toolSearch.requestedToolSeen=true、calledTool.toolName=mcp__context7-*__query-docs、calledTool.isError=false、legacyMcpCommandsSeen=[]、missingLiveProviderMethods=[]。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
git diff --check -- "scripts/mcp/lib/current-smoke-core.mjs" "scripts/mcp/lib/current-smoke-transport.mjs" "scripts/mcp/current-smoke.test.mjs" "scripts/mcp/lib/contract-guards.mjs" "internal/exec-plans/mcp-modernization-progress.md" -
rg -n "[ \t]+$" -- "scripts/mcp/lib/current-smoke-core.mjs" "scripts/mcp/lib/current-smoke-transport.mjs" "scripts/mcp/current-smoke.test.mjs" "scripts/mcp/lib/contract-guards.mjs" "internal/exec-plans/mcp-modernization-progress.md":无命中。 -
rg -n "^(<<<<<<<|=======|>>>>>>>)" -- "scripts/mcp/lib/current-smoke-core.mjs" "scripts/mcp/lib/current-smoke-transport.mjs" "scripts/mcp/current-smoke.test.mjs" "scripts/mcp/lib/contract-guards.mjs" "internal/exec-plans/mcp-modernization-progress.md":无命中。 -
MCP event 监听已从
src/hooks/useMcp.ts拆到src/hooks/useMcpEvents.ts:mcp:server_started/stopped/error/tools_updated/resources_updated/resource_updated继续通过 DesktopsafeListen,OAuth completion 改为同步订阅 App Server typed event bus;useMcp.ts只保留状态、action 与初始化编排。 -
scripts/mcp/lib/contract-guards.mjs已纳入src/hooks/useMcpEvents.ts,强制剩余 MCP Desktop runtime events 继续通过safeListencurrent bridge、OAuth completion 只走 typed notification,并禁止 legacy OAuth event 与生产 mock fallback 回流。 -
npx eslint "src/hooks/useMcp.ts" "src/hooks/useMcpEvents.ts" "src/hooks/useMcp.test.tsx" --max-warnings 0 -
npx vitest run "src/hooks/useMcp.test.tsx" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:9 passed,覆盖 typed OAuth success/failure、Desktop listener 阻塞时同步订阅、resources updated、resource updated 与订阅 current API 透传。 -
node --check "scripts/mcp/lib/contract-guards.mjs" && node "scripts/check-app-server-client-contract.mjs":通过,281 checks,MCP event bridge 守卫已纳入 App Server client contract guard。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
MCP 前端 API response guard 已从
src/lib/api/mcp.ts拆到src/lib/api/mcpResponseGuards.ts:mcp.ts保留AppServerClient.request(...)、App Server method 常量和mcpApi编排;response guard 模块集中校验 server list、lifecycle empty result、OAuth login、tool result、prompt result、resource content 与 resource templates,文件体量从约 512 行降到约 367 行。 -
scripts/mcp/lib/contract-guards.mjs已把src/lib/api/mcpResponseGuards.ts纳入 MCP current API surface,并把src/lib/api/mcp.ts与 response guard 模块一起纳入safeInvoke/ legacy MCP command forbidden snippets,防止校验模块绕回旧 Desktop/Tauri facade 或 mock fallback。 -
npx eslint "src/lib/api/mcp.ts" "src/lib/api/mcpTypes.ts" "src/lib/api/mcpResponseGuards.ts" "scripts/mcp/lib/contract-guards.mjs" --max-warnings 0 -
npx vitest run "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:16 passed,覆盖 MCP current API App Server method、resource templates、fail-closed malformed response 与不回退safeInvoke。 -
node --check "scripts/mcp/lib/contract-guards.mjs" && node "scripts/check-app-server-client-contract.mjs":通过,281 checks,MCP response guard 模块已纳入 App Server client contract guard。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
MCP 配置页已继续拆分为 facade + 子组件:
src/components/mcp/McpPage.tsx只保留useMcpServers数据编排、导入 / 同步、选中态、保存 / 删除动作;配置页专用列表进入McpPageServerList.tsx,编辑器进入McpPageEditor.tsx,导入 / 同步入口继续复用McpPageActions.tsx,预设和应用标签投影继续集中在mcpPageModel.ts。 -
src/components/mcp/McpPage.test.tsx已补配置页稳定回归,覆盖选择服务器后保存更新、JSON 配置错误 fail-closed、新建 GitHub 预设创建,避免后续再向McpPage.tsx堆表单逻辑时只靠人工检查。 -
src/components/mcp/README.md已同步组件索引,把 MCP 配置页的 current 前端 surface 写回 repo 文档;没有新增命令、没有改 i18n 文案、没有新增 mock fallback。 -
npx prettier --check "src/components/mcp/McpPage.tsx" "src/components/mcp/McpPageEditor.tsx" "src/components/mcp/McpPageServerList.tsx" "src/components/mcp/McpPage.test.tsx" "src/components/mcp/README.md":通过。 -
npx eslint "src/components/mcp/McpPage.tsx" "src/components/mcp/McpPageEditor.tsx" "src/components/mcp/McpPageServerList.tsx" "src/components/mcp/McpPage.test.tsx" "src/components/mcp/McpPageActions.tsx" "src/components/mcp/mcpPageModel.ts" --max-warnings 0:通过。 -
npx vitest run "src/components/mcp/McpPage.test.tsx" "src/components/mcp/McpPanel.test.tsx" "src/components/mcp/McpToolsBrowser.test.tsx" "src/components/mcp/mcpResourcePreview.unit.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:18 passed,覆盖配置页、MCP 面板、工具浏览器与资源预览。 -
npx vitest run "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" "src/hooks/useMcp.test.tsx" "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:27 passed,覆盖 MCP App Server current API、fail-closed、事件 hook 与 current smoke guard。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready;本轮配置页拆分没有破坏 Electron Desktop Host / App Server GUI 壳主路径。 -
MCP 配置页编辑状态继续从
McpPage.tsx抽到src/components/mcp/useMcpPageEditorState.ts:选择服务器、新建、预设选择、JSON 配置校验、保存、删除确认和取消编辑统一由 hook 承接;McpPage.tsx只保留useMcpServers数据源、导入 / 同步动作和子组件接线,文件体量从约 335 行降到约 224 行。 -
src/components/mcp/README.md已同步新增useMcpPageEditorState.ts索引;本轮仍未新增命令、未改 App Server method、未接入 mock fallback。 -
MCP 管理面板继续拆分为 facade + view model + 小组件:
McpPanel.tsx只保留useMcp数据源、OAuth 系统浏览器打开、工具调用面板和 Tab 内容接线;页头指标进入McpPanelHeader.tsx,Tab 导航进入McpPanelTabs.tsx,Tab 定义、计数和同步状态投影进入mcpPanelModel.ts,入口文件从约 411 行降到约 259 行。 -
src/components/mcp/mcpPanelModel.unit.test.ts已覆盖运行中服务器计数、能力计数、Tab 计数和同步状态优先级,避免后续再把摘要投影逻辑塞回 React 挂载测试;src/components/mcp/README.md已同步新增管理面拆分索引。 -
packages/app-server-client/src/generated/protocol-types.ts已通过npm run test:contracts的check:protocol-types同步McpResourceSubscribeParams/McpResourceSubscriptionResponse/McpResourceUnsubscribeParams,保持 MCPmcpResource/subscribe/mcpResource/unsubscribecurrent 协议和 generated client 类型一致。 -
MCP 工具 / 提示词 / 资源浏览器继续拆分为 facade + 纯 model:
McpToolsBrowser.tsx、McpPromptsBrowser.tsx、McpResourcesBrowser.tsx只保留展开态、输入态、调用 / 订阅 / 读取生命周期和 JSX 接线;去重、分组、搜索过滤、排序与 prompt 参数组装分别进入mcpToolBrowserModel.ts、mcpPromptBrowserModel.ts、mcpResourceBrowserModel.ts。 -
MCP resource preview UI 已从
McpResourcesBrowser.tsx下沉到McpResourceContentPreview.tsx,纯内容投影仍由mcpResourcePreview.ts承接;资源浏览器入口从约 388 行降到约 307 行,工具浏览器约 300 行,提示词浏览器约 307 行。 -
新增
mcpToolBrowserModel.unit.test.ts、mcpPromptBrowserModel.unit.test.ts、mcpResourceBrowserModel.unit.test.ts,覆盖mcp__<server>__<tool>inner name 搜索 / runtime name 搜索、重复工具去重、prompt 参数空值跳过和资源 URI / 描述过滤,减少浏览器组件挂载测试承担的业务投影分支。 -
非 MCP 的 Agent stream handler helper 已被并行脏改动拆出到
agentStreamLegacyToolEventGate.ts与agentStreamToolItemMessageSync.ts;为恢复全局 contract 门禁,scripts/check-app-server-client-contract.mjs仅同步该 guard 的扫描文件集合与等价 snippet,没有修改 Agent runtime 行为。 -
npx prettier --check "src/components/mcp/McpPage.tsx" "src/components/mcp/useMcpPageEditorState.ts" "src/components/mcp/McpPageEditor.tsx" "src/components/mcp/McpPageServerList.tsx" "src/components/mcp/McpPage.test.tsx" "src/components/mcp/README.md":通过。 -
npx eslint "src/components/mcp/McpPage.tsx" "src/components/mcp/useMcpPageEditorState.ts" "src/components/mcp/McpPageEditor.tsx" "src/components/mcp/McpPageServerList.tsx" "src/components/mcp/McpPage.test.tsx" --max-warnings 0:通过。 -
npx vitest run "src/components/mcp/McpPage.test.tsx" "src/components/mcp/McpPanel.test.tsx" "src/components/mcp/McpToolsBrowser.test.tsx" "src/components/mcp/mcpResourcePreview.unit.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:18 passed,覆盖配置页 hook 接线、MCP 面板、工具浏览器与资源预览。 -
npx vitest run "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" "src/hooks/useMcp.test.tsx" "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:27 passed,覆盖 MCP App Server current API、fail-closed、事件 hook 与 current smoke guard。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready;本次冷缓存触发 crates.io 下载和 app-server sidecar 重新编译,过程中有网络重试但最终通过。 -
npx prettier --check "src/components/mcp/McpPanel.tsx" "src/components/mcp/McpPanelHeader.tsx" "src/components/mcp/McpPanelTabs.tsx" "src/components/mcp/mcpPanelModel.ts" "src/components/mcp/mcpPanelModel.unit.test.ts" "src/components/mcp/README.md":通过。 -
npx eslint "src/components/mcp/McpPanel.tsx" "src/components/mcp/McpPanelHeader.tsx" "src/components/mcp/McpPanelTabs.tsx" "src/components/mcp/mcpPanelModel.ts" "src/components/mcp/mcpPanelModel.unit.test.ts" --max-warnings 0:通过。 -
npx vitest run "src/components/mcp/McpPanel.test.tsx" "src/components/mcp/mcpPanelModel.unit.test.ts" "src/components/mcp/McpPage.test.tsx" "src/components/mcp/McpToolsBrowser.test.tsx" "src/components/mcp/mcpResourcePreview.unit.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:21 passed,覆盖管理面 facade 拆分、配置页、工具浏览器与资源预览。 -
npx vitest run "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" "src/hooks/useMcp.test.tsx" "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:27 passed,覆盖 MCP App Server current API、fail-closed、事件 hook 与 current smoke guard。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary;旧 MCP Desktop facade 仍未进入 production truth / mock priority。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready;管理面拆分后 Electron Desktop Host / App Server GUI 壳主路径仍可运行。 -
git diff --check -- "src/components/mcp/McpPanel.tsx" "src/components/mcp/McpPanelHeader.tsx" "src/components/mcp/McpPanelTabs.tsx" "src/components/mcp/mcpPanelModel.ts" "src/components/mcp/mcpPanelModel.unit.test.ts" "src/components/mcp/README.md":通过。 -
npx prettier --check "src/components/mcp/McpPromptsBrowser.tsx" "src/components/mcp/mcpPromptBrowserModel.ts" "src/components/mcp/mcpPromptBrowserModel.unit.test.ts" "src/components/mcp/McpToolsBrowser.tsx" "src/components/mcp/mcpToolBrowserModel.ts" "src/components/mcp/mcpToolBrowserModel.unit.test.ts" "src/components/mcp/McpResourcesBrowser.tsx" "src/components/mcp/McpResourceContentPreview.tsx" "src/components/mcp/mcpResourceBrowserModel.ts" "src/components/mcp/mcpResourceBrowserModel.unit.test.ts" "src/components/mcp/README.md":通过。 -
npx eslint "src/components/mcp/McpPromptsBrowser.tsx" "src/components/mcp/mcpPromptBrowserModel.ts" "src/components/mcp/mcpPromptBrowserModel.unit.test.ts" "src/components/mcp/McpToolsBrowser.tsx" "src/components/mcp/mcpToolBrowserModel.ts" "src/components/mcp/mcpToolBrowserModel.unit.test.ts" "src/components/mcp/McpResourcesBrowser.tsx" "src/components/mcp/McpResourceContentPreview.tsx" "src/components/mcp/mcpResourceBrowserModel.ts" "src/components/mcp/mcpResourceBrowserModel.unit.test.ts" --max-warnings 0:通过。 -
npx vitest run "src/components/mcp/McpPage.test.tsx" "src/components/mcp/McpPanel.test.tsx" "src/components/mcp/McpToolsBrowser.test.tsx" "src/components/mcp/mcpPanelModel.unit.test.ts" "src/components/mcp/mcpPromptBrowserModel.unit.test.ts" "src/components/mcp/mcpToolBrowserModel.unit.test.ts" "src/components/mcp/mcpResourceBrowserModel.unit.test.ts" "src/components/mcp/mcpResourcePreview.unit.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:30 passed,覆盖 MCP 管理面、配置页、工具浏览器与三类浏览器 model。 -
npx vitest run "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" "src/hooks/useMcp.test.tsx" "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:27 passed,覆盖 MCP App Server current API、fail-closed、事件 hook 与 current smoke guard。 -
node --check "scripts/check-app-server-client-contract.mjs" && node "scripts/check-app-server-client-contract.mjs":通过,281 checks;Agent stream helper 拆分后的 contract guard 已恢复。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready;浏览器 model 拆分后 Electron Desktop Host / App Server GUI 壳主路径仍可运行。 -
MCP 服务器运行状态列表继续拆分为 facade + row + 纯 model:
McpServerList.tsx只保留刷新 / 空态 / 操作中状态与子组件接线,单行展示进入McpServerRow.tsx,服务器摘要、运行状态文案参数、连接阶段、OAuth 状态与能力标签投影进入mcpServerListModel.ts。 -
新增
mcpServerListModel.unit.test.ts,覆盖运行计数、状态文案参数、连接 phase 标签、OAuth login-required / unsupported / authorized 三态和能力标签投影,避免这些业务分支继续压在 React 挂载测试里;src/components/mcp/README.md已同步服务器列表拆分索引。 -
npx prettier --check "src/components/mcp/McpServerList.tsx" "src/components/mcp/McpServerRow.tsx" "src/components/mcp/mcpServerListModel.ts" "src/components/mcp/mcpServerListModel.unit.test.ts" "src/components/mcp/README.md" "internal/exec-plans/mcp-modernization-progress.md":通过。 -
npx eslint "src/components/mcp/McpServerList.tsx" "src/components/mcp/McpServerRow.tsx" "src/components/mcp/mcpServerListModel.ts" "src/components/mcp/mcpServerListModel.unit.test.ts" --max-warnings 0:通过。 -
npx vitest run "src/components/mcp/McpPage.test.tsx" "src/components/mcp/McpPanel.test.tsx" "src/components/mcp/McpToolsBrowser.test.tsx" "src/components/mcp/mcpPanelModel.unit.test.ts" "src/components/mcp/mcpServerListModel.unit.test.ts" "src/components/mcp/mcpPromptBrowserModel.unit.test.ts" "src/components/mcp/mcpToolBrowserModel.unit.test.ts" "src/components/mcp/mcpResourceBrowserModel.unit.test.ts" "src/components/mcp/mcpResourcePreview.unit.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:35 passed,覆盖 MCP 管理面、配置页、工具浏览器和服务器 / 浏览器 model。 -
npx vitest run "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" "src/hooks/useMcp.test.tsx" "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:27 passed,覆盖 MCP App Server current API、fail-closed、事件 hook 与 current smoke guard。 -
node --check "scripts/check-app-server-client-contract.mjs" && node "scripts/check-app-server-client-contract.mjs":通过,281 checks。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready;服务器列表拆分后 Electron Desktop Host / App Server GUI 壳主路径仍可运行。 -
git diff --check -- "src/components/mcp/McpServerList.tsx" "src/components/mcp/McpServerRow.tsx" "src/components/mcp/mcpServerListModel.ts" "src/components/mcp/mcpServerListModel.unit.test.ts" "src/components/mcp/README.md" "internal/exec-plans/mcp-modernization-progress.md":通过。 -
MCP 工具调用组件继续拆分为 facade + 纯 model:
McpToolCaller.tsx只保留调用状态、表单 / JSON 模式切换、调用动作和结果展示接线;JSON Schema 字段提取、表单值 JSON 解析、空字符串跳过、JSON 模式参数解析与内容类型投影进入mcpToolCallerModel.ts。 -
新增
mcpToolCallerModel.unit.test.ts,覆盖 schema field projection、表单值 JSON parse / 字符串 fallback、空值跳过、JSON 模式 parse error fail-closed 和 MCP content type projection;src/components/mcp/README.md已同步工具调用拆分索引。 -
npx prettier --check "src/components/mcp/McpToolCaller.tsx" "src/components/mcp/mcpToolCallerModel.ts" "src/components/mcp/mcpToolCallerModel.unit.test.ts" "src/components/mcp/README.md" "internal/exec-plans/mcp-modernization-progress.md":通过。 -
npx eslint "src/components/mcp/McpToolCaller.tsx" "src/components/mcp/mcpToolCallerModel.ts" "src/components/mcp/mcpToolCallerModel.unit.test.ts" --max-warnings 0:通过。 -
npx vitest run "src/components/mcp/McpPage.test.tsx" "src/components/mcp/McpPanel.test.tsx" "src/components/mcp/McpToolsBrowser.test.tsx" "src/components/mcp/mcpPanelModel.unit.test.ts" "src/components/mcp/mcpServerListModel.unit.test.ts" "src/components/mcp/mcpToolCallerModel.unit.test.ts" "src/components/mcp/mcpPromptBrowserModel.unit.test.ts" "src/components/mcp/mcpToolBrowserModel.unit.test.ts" "src/components/mcp/mcpResourceBrowserModel.unit.test.ts" "src/components/mcp/mcpResourcePreview.unit.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:40 passed,覆盖 MCP 管理面、配置页、工具浏览器和服务器 / 工具调用 / 浏览器 model。 -
npx vitest run "src/lib/api/mcp.test.ts" "src/lib/api/mcp.failClosed.test.ts" "src/hooks/useMcp.test.tsx" "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:27 passed,覆盖 MCP App Server current API、fail-closed、事件 hook 与 current smoke guard。 -
node --check "scripts/check-app-server-client-contract.mjs" && node "scripts/check-app-server-client-contract.mjs":通过,281 checks。 -
npm run test:contracts:通过,含 protocol types、App Server client contract、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready;工具调用组件拆分后 Electron Desktop Host / App Server GUI 壳主路径仍可运行。 -
MCP 提示词浏览器继续拆分为 facade + 服务器分组组件:
McpPromptsBrowser.tsx只保留搜索、展开状态、提示词调用状态和请求接线,提示词服务器分组、提示词行、参数表单与结果预览进入McpPromptServerGroup.tsx,入口文件从约 327 行降到约 182 行。 -
新增
McpPromptsBrowser.test.tsx,覆盖展开服务器、打开提示词、填写参数、调用onGetPrompt并展示返回消息,避免提示词行 UI 下沉后只靠McpPanel.test.tsx间接覆盖;src/components/mcp/README.md已同步提示词分组组件索引。 -
npx prettier --check "src/components/mcp/McpPromptsBrowser.tsx" "src/components/mcp/McpPromptServerGroup.tsx" "src/components/mcp/McpPromptsBrowser.test.tsx" "src/components/mcp/README.md" "internal/exec-plans/mcp-modernization-progress.md":通过。 -
npx eslint "src/components/mcp/McpPromptsBrowser.tsx" "src/components/mcp/McpPromptServerGroup.tsx" "src/components/mcp/McpPromptsBrowser.test.tsx" --max-warnings 0:通过。 -
npx vitest run "src/components/mcp/McpPage.test.tsx" "src/components/mcp/McpPanel.test.tsx" "src/components/mcp/McpPromptsBrowser.test.tsx" "src/components/mcp/McpToolsBrowser.test.tsx" "src/components/mcp/mcpPanelModel.unit.test.ts" "src/components/mcp/mcpServerListModel.unit.test.ts" "src/components/mcp/mcpToolCallerModel.unit.test.ts" "src/components/mcp/mcpPromptBrowserModel.unit.test.ts" "src/components/mcp/mcpToolBrowserModel.unit.test.ts" "src/components/mcp/mcpResourceBrowserModel.unit.test.ts" "src/components/mcp/mcpResourcePreview.unit.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:41 passed,覆盖 MCP 配置页、管理面、工具 / 提示词浏览器与各纯 model。 -
npx vitest run "src/lib/api/mcp.failClosed.test.ts" "src/lib/api/mcp.test.ts" "src/lib/desktop-host/core.unhandled-mock.test.ts" "src/lib/dev-bridge/mockPriorityCommands.test.ts" --silent=passed-only --disableConsoleIntercept --testTimeout=30000:40 passed,覆盖 MCP App Server current API、fail-closed、默认 mock 未注册与 mock priority 禁回流。 -
npx eslint "src/lib/desktop-host/core.ts" "scripts/check-command-contracts.mjs" --max-warnings 0:通过。 -
node --check "scripts/check-command-contracts.mjs"与node "scripts/check-command-contracts.mjs":通过,frontend commands 30、Electron host commands 89、mock priority commands 0、DevBridge truth commands 17。 -
npm run test:contracts:通过,含 protocol types、App Server client contract 281 checks、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
npm run verify:gui-smoke:通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready;旧mcpMocks删除后 Electron Desktop Host / App Server GUI 壳主路径仍可运行。 -
git diff --check -- "src/lib/desktop-host/core.ts" "src/lib/desktop-host/mcpMocks.ts" "src/lib/desktop-host/mcpMocks.d.ts" "src/lib/desktop-host/mcpMocks.test.ts" "scripts/check-command-contracts.mjs" "internal/exec-plans/mcp-modernization-progress.md":通过。 -
npx prettier --check "internal/aiprompts/mcp.md" "internal/exec-plans/mcp-modernization-progress.md":通过。 -
npm run docs:boundary:通过,MCP 工程说明更新未破坏文档边界守卫。 -
npm run test:contracts:通过,含 protocol types、App Server client contract 281 checks、command contracts、mock priority commands=0、script governance、electron release workflow guard、harness cleanup 与 docs boundary。 -
git diff --check -- "internal/aiprompts/mcp.md" "internal/exec-plans/mcp-modernization-progress.md":通过。 -
npx prettier --check "internal/aiprompts/services.md" "internal/aiprompts/overview.md" "internal/exec-plans/mcp-modernization-progress.md":通过。 -
rg -n "mcp_service\\.rs|mcp_sync\\.rs|pub struct McpService|lime-rs/src/services/mcp" "internal/aiprompts/mcp.md" "internal/aiprompts/services.md" "internal/aiprompts/overview.md":无命中。 -
2026-06-22:MCP runtime bridge 按 Codex MCP manager 模式收口。
McpClientManager的 running service/tool snapshot 现在同步成 Agent extension surface:extension key 固定为mcp__<server>,runtime tool 固定为mcp__<server>__<tool>;RuntimeBackend在 turn start 与agentSession/toolInventory/read前同步 MCP bridge,不再启动第二套 MCP 进程,也不再依赖旧 Desktop facade。 -
2026-06-22:
agentSession/toolInventory/read未初始化 Agent 时也会从 current MCP snapshot 合成 extension surface / extension tools / runtime tools,避免 GUI 库存面板在 Context7 已启动但 Agent 尚未初始化时显示“识别不到 MCP”。新增runtime_backend_tool_inventory_projects_mcp_bridge_before_agent_initialization,覆盖mcp__context7、mcp__context7__resolve-library-id与mcp__context7__query-docs。 -
2026-06-22:真实 DevBridge current 通道已跑通 Context7:
mcpServer/start { name: "context7" }后,mcpTool/search返回mcp__context7__query-docs/mcp__context7__resolve-library-id;mcpTool/call先用resolve-library-id查到/openai/openai-agents-python,再用query-docs查询 “AI Agent 是什么”,两次调用均is_error=false,未记录或输出 Context7 key。 -
2026-06-22:Agent Runtime ToolSearch 真实 turn 已验证 Context7 runtime surface:localhost fixture provider 发起
agentSession/turn/start,provider request 同时包含ToolSearch与mcp__context7__query-docs,read model 中ToolSearch精确选择select:mcp__context7__query-docs并匹配到 Context7 工具。 -
2026-06-22:streamable HTTP header 注入已按 Codex MCP 行为对齐:
env_http_headers引用的环境变量缺失或为空时跳过该 header 并记录不含密钥的 warning,不再让 Context7 preset 在桌面环境缺少CONTEXT7_API_KEY时启动失败;静态 header 的非法 name/value、重复 header、bearer_token_env_var与Authorization冲突仍 fail closed。若用户在系统环境中设置CONTEXT7_API_KEY,同一 current transport 会自动注入 header。 -
2026-06-22:MCP 配置页新增只读连接配置摘要,
McpPageEditor从mcpPageModel.ts投影stdio/streamable_http、URL、命令、静态 header 名称、env_http_headers映射与bearer_token_env_var;Context7 preset 会显示CONTEXT7_API_KEY <- CONTEXT7_API_KEY这类引用关系,但不会显示实际 key,也不新增 mock 或旧 Desktop facade。 -
2026-06-22:MCP 配置页连接配置从只读摘要推进到结构化可编辑表单。
mcpPageModel.ts新增纯 JSON patch helper,McpPageEditor现在可直接编辑 streamable HTTP endpoint URL、env_http_headers的 header -> env var 映射、bearer_token_env_var与 stdio command,并始终写回同一份server_configJSON;Context7 preset 可在 GUI 中把CONTEXT7_API_KEY引用改成用户本机环境变量名,仍不保存 / 展示真实 key,不新增旧 MCP Desktop facade 或 mock fallback。 -
2026-06-22:结构化配置编辑已补验证:
mcpPageModel.unit.test.ts覆盖 URL、env header、bearer env var 与 camelCase -> snake_case 归一;McpPage.test.tsx覆盖 Context7 GUI 表单编辑 URL / env var 后保存到mcpServer/createpayload。已通过 Prettier、eslint、五语言 settings JSON parse、npm run test:contracts与npm run verify:gui-smoke。 -
2026-06-22:MCP 配置页补真实 Electron fixture 证据入口。
McpPage/McpPanelTabs/McpPageEditor增加稳定data-testid,scripts/electron/mcp-config-fixture-smoke.mjs启动真实 Electron Desktop Host,经侧栏进入设置页 -> MCP -> 配置管理,点击 Context7 preset,编辑 streamable HTTP URL 与env_http_headers环境变量名后保存,再用 preloadapp_server_handle_json_lines -> mcpServer/list验证 App Server current read model;summary 只记录 provider host、header 名和 env var 名,不启动 Context7、不调用真实 provider、不读取或写入真实 key,不走旧 MCP Desktop facade / mock fallback。 -
2026-06-22:Context7 补真实 Electron live fixture 入口。
scripts/electron/mcp-context7-live-fixture-smoke.mjs复用设置页 GUI 创建 Context7 配置,经app_server_handle_json_lines启动 server,使用mcpTool/search验证 ToolSearch 能找到mcp__context7__resolve-library-id/mcp__context7__query-docs,再调用mcpTool/call依次执行 resolve-library-id 与 query-docs 查询 “AI Agent 是什么”;summary 只记录 host、工具名、header 名、env var 名、content 类型 / 数量和isError,不写入真实 key、header value 或工具正文。 -
2026-06-22:Context7 live smoke 已补 env header 引用场景:使用
LIME_MCP_LIVE_ENV_HTTP_HEADERS_JSON只传 header 名与环境变量名,未写入或输出真实 key;summary 记录 provider host、envHttpHeaderNames=["CONTEXT7_API_KEY"]、mcpTool/call query-docs、calledTool.isError=false、legacyMcpCommandsSeen=[]与missingLiveProviderMethods=[]。 -
2026-06-22:清理
smoke:agent-runtime-tool-execution -- --batch runtime-introspection-tools的旧 ToolSearch 参数,移除caller / limit / include_deferred / include_schema,只保留 current schemaquery / max_results;复跑该 smoke 通过,证明 ToolSearch 与 SendUserMessage 均完成。 -
已验证:
cargo fmt --all;cargo test --manifest-path "lime-rs/Cargo.toml" -p app-server runtime_backend_tool_inventory(3 passed);npm run smoke:agent-runtime-tool-execution -- --batch runtime-introspection-tools --output /tmp/lime-runtime-introspection-smoke.json --timeout-ms 180000;cargo test --manifest-path "lime-rs/Cargo.toml" -p lime-mcp streamable_http --lib(13 passed);npx vitest run "src/components/mcp/McpPage.test.tsx" --silent=passed-only --disableConsoleIntercept --testTimeout=30000(4 passed);五语言settings.jsonJSON parse;npx eslint "src/components/mcp/mcpPageModel.ts" "src/components/mcp/McpPageEditor.tsx" "src/components/mcp/McpPage.test.tsx" --max-warnings 0;npm run smoke:mcp-current -- --allow-write-fixture --timeout-ms 120000;Context7--allow-live-provider+env_http_headerslive smoke;npx vitest run "scripts/mcp/current-smoke.test.mjs" --silent=passed-only --disableConsoleIntercept --testTimeout=30000(6 passed);npm run test:contracts;npm run verify:gui-smoke;git diff --check -- "lime-rs/crates/app-server/src/runtime_backend/tool_inventory.rs" "lime-rs/crates/app-server/src/runtime_backend/tests/tool_inventory.rs" "lime-rs/crates/mcp/src/streamable_http.rs" "scripts/agent-runtime/tool-execution-smoke.mjs" "src/components/mcp/mcpPageModel.ts" "src/components/mcp/McpPageEditor.tsx" "src/components/mcp/McpPage.test.tsx" "src/i18n/resources/zh-CN/settings.json" "src/i18n/resources/zh-TW/settings.json" "src/i18n/resources/en-US/settings.json" "src/i18n/resources/ja-JP/settings.json" "src/i18n/resources/ko-KR/settings.json"。 -
2026-07-31:OAuth completion 已从
mcp:oauth_completedDesktop event 迁到 App ServermcpServer/oauthLogin/completedtyped notification。Rust MCP 只返回 completion handle;App Server 投影成功/失败;Renderer 在任何异步 Desktop listener 前同步订阅 typed event bus,并自动刷新 status/tools。旧事件字符串受 contract guard 禁止回流electron、lime-rs、packages与src。 -
2026-07-31:
npm run smoke:mcp-oauth-notification-electron-fixture专用 Gate B 通过。证据.lime/qc/mcp-oauth-notification/mcp-oauth-notification-fixture-summary.json为ok=true:真实 Electron/preload/IPC、app_server_handle_json_lines、App Server event drain、本地 OAuth provider callback 与 GUI 状态/toast 全链命中;自动刷新mcpServer/oauth/login、mcpServerStatus/list、mcpTool/list,mockFallbackHitCount=0、failedInvokeCount=0、console/page/invoke errors 为 0。 -
2026-07-31:MCP startup lifecycle 已从
mcp:server_started、mcp:server_stopped、mcp:server_errorDesktop events 迁到 App ServermcpServer/startupStatus/updatedtyped notification。mcpServer/start在 runtime 前发布starting,成功发布ready,失败发布带 error 的failed后保留原 JSON-RPC error;Renderer 同步订阅 typed event bus,投影连接态并在终态自动刷新 status/tools。四条旧 MCP lifecycle event(含 OAuth)均受 contract guard 禁止回流生产路径。 -
2026-07-31:
npm run smoke:mcp-startup-notification-electron-fixture专用 Gate B 通过。证据.lime/qc/mcp-startup-notification/mcp-startup-notification-fixture-summary.json为ok=true:真实 Electron/preload/IPC、app_server_handle_json_lines、App Server event drain、runtime stdio MCP server 与 Settings GUI 全链命中;starting -> ready、starting -> failed均可见,自动刷新mcpServerStatus/list与mcpTool/list,electronIpcHitCount=11、mockFallbackHitCount=0、failedInvokeCount=0、console/page/invoke errors 为 0。
当前缺口
- OAuth、动态授权与用户 approval 已具备 GUI 登录入口、typed completion 自动刷新闭环、本地回环 OAuth provider completion 证据、
smoke:mcp-current -- --allow-oauth-fixture的 Electronopen_external_url网关证据,以及smoke:mcp-oauth-notification-electron-fixture的专用真实 Electron Gate B;下一刀应补真实第三方 provider 账号流的 live-gated / 手工 E2E 证据。 - 显式
oauth.client_id/oauth_resource仍按 unsupported fail-closed 处理,后续需要等 connector 能无损支持后再打开。 - rmcp 0.12 的
exchange_code_for_token内部仍新建 reqwest client;Lime 目前能保证 OAuth discovery / dynamic registration / authorized MCP requests 复用自定义 headers,但不能无损保证 token endpoint 也接收自定义 headers。后续若要支持需要 upstream connector seam 或本地 OAuth flow 封装,不应靠假支持打开。 - rmcp 0.12 的 token exchange 内部自建 client 也意味着本地 loopback OAuth provider 在带系统代理的开发机上需要测试进程级
NO_PROXY保护;当前保护只放在 Rust fixture 测试里,不修改生产进程环境。 - MCP GUI 管理面仍缺真实第三方 OAuth provider 账号流 smoke;当前本地 OAuth fixture 已证明系统浏览器 current 网关、provider redirect、callback completion、App Server typed notification、自动 status/tool refresh 与 GUI 状态/toast 回流闭环。
- MCP
structuredContentcontrol-plane、runtime/read model/evidence projection、基础 Agent Chat 展示回归与真实 Electron fixture 可见证据已覆盖;下一刀若继续提升完整度,应补 Playwright 人工交互式证据或真实第三方 MCP provider 工具结果的 live-gated E2E。 smoke:mcp-current -- --allow-live-provider已对 Context7 远程 provider 跑通resolve-library-id与query-docs两条真实 tool E2E,且isError=true已 fail-closed;smoke:mcp-config-electron-fixture已补真实 Electron 设置页创建 Context7 配置并经app_server_handle_json_lines -> mcpServer/list验证落库的 GUI 证据;smoke:mcp-context7-live-electron-fixture已补真实 Electron 启动 / ToolSearch / tool call 远程 Context7 live 入口。剩余缺口是在用户本机显式设置真实CONTEXT7_API_KEY后复跑同一 live fixture,确认 header 注入语义;当前本机未设置时仍可验证 Context7 公共工具链路。- Agent Runtime / Claw fixture 拆分后,current 聚合回归、WebTools rendering、Skills Runtime、Expert Skills Runtime 与
cancel-then-continue已恢复到绿色;下一刀应继续补用户截图中更细的 Codex 桌面 UI 视觉一致性断言,例如未完成时不得折叠、搜索 / 思考 / final Markdown 的分段快照和完成前状态稳定性,而不是继续扩张单个 fixture 文件。 - 2026-06-22:Agent Chat Codex 渲染一致性继续收口。新增/复跑的 renderer 回归确认 WebSearch / WebFetch / thinking 按事件顺序穿插,Web tools 过程默认完成后折叠、展开后保留搜索来源 -> 中间思考 -> 读取页面顺序;completed Skill 在消息仍 streaming 时保持展开但隐藏
legacy_tool_event/internal_payload等协议 payload。验证已覆盖toolResultEnvelopeDisplay、InlineToolProcessStep、StreamingRenderer.processGroups/webSearch/webSearch.sequence、四个agentStream*拆分 helper 单测、build:renderer:electron:smoke、smoke:agent-runtime-current-fixture、Playwright_electron的smoke:claw-chat-current-fixture -- --scenario web-tools-rendering与verify:gui-smoke。 - 2026-06-22:Agent stream runtime handler 巨型文件收口。
src/components/agent/chat/hooks/agentStreamRuntimeHandler.ts继续按 facade + lifecycle/actions/types/utils 拆分,turn terminal 事件turn_completed/turn_canceled/turn_failed已下沉到agentStreamRuntimeLifecycleEvents.ts,中心 handler 从 1990 行降到 986 行,低于 1000 行硬线;agentStreamRuntimeHandlerActions.ts仍约 711 行,后续新增 actions 前应优先按 timer / terminal / timeline action 再拆。验证:npx eslint "src/components/agent/chat/hooks/agentStreamRuntimeHandler.ts" "src/components/agent/chat/hooks/agentStreamRuntimeHandlerActions.ts" "src/components/agent/chat/hooks/agentStreamRuntimeLifecycleEvents.ts" "src/components/agent/chat/hooks/agentStreamRuntimeHandlerTypes.ts" "src/components/agent/chat/hooks/agentStreamRuntimeHandlerUtils.ts" --max-warnings 0;npx vitest run "src/components/agent/chat/hooks/agentStreamRuntimeHandler.unit.test.ts" "src/components/agent/chat/hooks/agentStreamCompletionController.test.ts" "src/components/agent/chat/hooks/agentStreamReasoningTimeline.unit.test.ts" "src/components/agent/chat/hooks/agentStreamToolItemMessageSync.unit.test.ts" "src/components/agent/chat/hooks/agentStreamReasoningContentSync.unit.test.ts" "src/components/agent/chat/hooks/agentStreamLegacyToolEventGate.unit.test.ts"(70 passed);npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture(第一次因 stale dist 出现buildAgentStreamTextRenderTimerSchedulePlan is not defined,重建 renderer 后复跑通过);npm run smoke:claw-chat-current-fixture -- --scenario web-tools-rendering --timeout-ms 180000 --evidence-dir ".lime/qc/gui-evidence/claw-chat-current-fixture" --prefix "claw-chat-current-fixture-web-tools-rendering-regression"通过,summary 断言guiWebSearchProcessDefaultCollapsed=true、guiWebToolsTimelineOrderPreserved=true、guiWebSearchFinalTextInterleaved=true、guiWebFetchTransportEnvelopeHidden=true、rawJsonEnvelopeVisible=false;npm run verify:gui-smoke通过。 - 2026-06-22:Agent Chat workspace facade 继续收口。Task Center 草稿 surface / home chrome 状态已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/taskCenterSurfaceState.ts,新增taskCenterSurfaceState.unit.test.ts覆盖草稿未发送压制旧会话、草稿发送中不压制、surface 标志滞留但已有会话活动不压制、首页 embedded home、pending preview 保留当前会话和路由打开历史空会话不被首页覆盖;AgentChatWorkspace.tsx从约 6627 行降到约 6601 行,仍远超 1000 行,后续继续按 Task Center 接线 / session 列表 / 输入区 orchestration 拆分。验证:npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/taskCenterSurfaceState.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts" --max-warnings 0;npx vitest run "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts" "src/components/agent/chat/workspace/agentChatWorkspaceHelpers.unit.test.ts" "src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.unit.test.ts" "src/components/agent/chat/workspace/useTaskCenterTabSessionRuntime.test.tsx" "src/components/agent/chat/workspace/useTaskCenterTopicNavigationRuntime.test.tsx"(37 passed);npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture;npm run verify:gui-smoke。 - 2026-06-22:Agent Chat workspace facade 继续收口第二刀。Task Center 新任务页打开 / 外部 draft request 订阅已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.ts,路由决策抽成resolveTaskCenterNewTaskPageRequestPlan,新增useTaskCenterNewTaskPageRuntime.unit.test.ts覆盖 unsupported entry、沿用当前项目打开草稿、route session 项目不匹配时忽略、无 route session 时跨项目导航、清空项目导航与同项目打开草稿;AgentChatWorkspace.tsx从约 6601 行继续降到约 6543 行,仍远超 1000 行。验证:npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.unit.test.ts" --max-warnings 0;npx vitest run "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.unit.test.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts" "src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.unit.test.ts" "src/components/agent/chat/workspace/useTaskCenterTabSessionRuntime.test.tsx" "src/components/agent/chat/workspace/useTaskCenterTopicNavigationRuntime.test.tsx"(25 passed);npx prettier --check "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.unit.test.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts";git diff --check -- "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.unit.test.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts";npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture;npm run verify:gui-smoke。 - 2026-06-22:Agent Chat workspace facade 继续收口第三刀。Task Center fallback restore effect 已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/useTaskCenterFallbackRestoreRuntime.ts,继续复用resolveTaskCenterFallbackRestorePlan作为唯一恢复策略事实源,只迁移 side-effect 接线、日志和handleOpenTaskTopic调用;AgentChatWorkspace.tsx从约 6543 行降到约 6484 行,仍远超 1000 行。验证:npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterFallbackRestoreRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.ts" --max-warnings 0;npx vitest run "src/components/agent/chat/utils/taskCenterTabs.test.ts" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.unit.test.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts" "src/components/agent/chat/workspace/useTaskCenterTabSessionRuntime.test.tsx" "src/components/agent/chat/workspace/useTaskCenterTopicNavigationRuntime.test.tsx"(61 passed);npx prettier --check "src/components/agent/chat/workspace/useTaskCenterFallbackRestoreRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.unit.test.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts";git diff --check -- "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterFallbackRestoreRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterNewTaskPageRuntime.unit.test.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts";npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture;npm run verify:gui-smoke。 - 2026-06-22:Agent Chat workspace facade 继续收口第四刀。最近会话恢复、项目会话分组与项目会话打开接线已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/useTaskCenterConversationNavigationRuntime.ts,只迁移 Task Center conversation navigation side-effect,不新增旧 runtime / mock fallback;AgentChatWorkspace.tsx从约 6484 行降到约 6452 行,仍远超 1000 行。第四刀后首次npm run smoke:agent-runtime-current-fixture暴露expert-panel-skills-runtime阶段失败:ExpertInfoPanel 技能选择器在 runtime session 轮询刷新期间被同值skillRefs刷新关闭,页面停在“技能还不能运行 / 补目录映射”。已补ExpertInfoPanel.test.tsx回归覆盖同值专家skillRefs刷新时保持技能选择器打开,并复跑单场景npm run smoke:claw-chat-current-fixture -- --scenario expert-panel-skills-runtime --timeout-ms 180000通过;随后复跑npm run smoke:agent-runtime-current-fixture通过,覆盖 ExpertInfoPanel 调整 skillRefs 后下一轮继承同一 Skills Runtime 闭环并展示 Evidence Pack 复盘;npm run verify:gui-smoke通过,renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready。 - 2026-06-22:Agent Chat workspace facade 继续收口第五刀。Task Center 首页 chrome 的重命名回调、preview topic / session switch 投影、embedded home 活动后清理标记、首页工具动作隐藏时关闭 harness 面板,已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/useTaskCenterHomeChromeRuntime.ts;新 hook 只承接 current Task Center home chrome 接线,不新增旧 runtime / mock fallback;AgentChatWorkspace.tsx从约 6452 行降到约 6407 行,仍远超 1000 行。新增useTaskCenterHomeChromeRuntime.unit.test.tsx覆盖普通任务重命名、草稿页签不重命名、embedded home 会话出现真实内容后清理标记、隐藏首页工具动作时关闭 harness 面板,以及切换中的话题作为 tab 预览目标。已通过:npx prettier --check "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterHomeChromeRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterHomeChromeRuntime.unit.test.tsx" "internal/exec-plans/mcp-modernization-progress.md";git diff --check -- "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterHomeChromeRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterHomeChromeRuntime.unit.test.tsx" "internal/exec-plans/mcp-modernization-progress.md";npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterHomeChromeRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterHomeChromeRuntime.unit.test.tsx" --max-warnings 0;npx vitest run "src/components/agent/chat/workspace/useTaskCenterHomeChromeRuntime.unit.test.tsx" "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts" "src/components/agent/chat/utils/taskCenterTabs.test.ts"(53 passed);npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture;npm run verify:gui-smoke;npm run smoke:claw-chat-current-fixture -- --scenario web-tools-rendering --timeout-ms 180000 --evidence-dir ".lime/qc/gui-evidence/claw-chat-current-fixture" --prefix "claw-chat-current-fixture-web-tools-rendering-home-chrome-regression"通过,summary 断言guiWebSearchProcessDefaultCollapsed=true、guiWebSearchProcessShowsSourcesAfterExpand=true、guiWebFetchProcessShowsReadPagesAfterExpand=true、guiWebToolsTimelineOrderPreserved=true、guiWebSearchFinalTextInterleaved=true、guiWebFetchTransportEnvelopeHidden=true、rawJsonEnvelopeVisible=false。 - 2026-06-22:Agent Chat workspace facade 继续收口第六刀。ExpertInfoPanel 的 workspace skill runtime enable 逻辑已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/useExpertWorkspaceSkillRuntime.ts:runtime key 解析、workspace skill ref -> binding 匹配、ready-only enable binding 投影、skillRefs 更新时裁剪 enable refs、重复启用去重和无法手动启用时跳转 Skills 管理,均由新 hook / 纯 helper 承接;AgentChatWorkspace.tsx从约 6407 行降到约 6289 行,仍远超 1000 行。新增useExpertWorkspaceSkillRuntime.unit.test.ts覆盖 metadata runtime key、目录提取、key/directory/name 匹配、ready-only enable、skillRefs 裁剪和重复启用去重。已通过:npx prettier --check "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useExpertWorkspaceSkillRuntime.ts" "src/components/agent/chat/workspace/useExpertWorkspaceSkillRuntime.unit.test.ts" "internal/exec-plans/mcp-modernization-progress.md";git diff --check -- "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useExpertWorkspaceSkillRuntime.ts" "src/components/agent/chat/workspace/useExpertWorkspaceSkillRuntime.unit.test.ts" "internal/exec-plans/mcp-modernization-progress.md";npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useExpertWorkspaceSkillRuntime.ts" "src/components/agent/chat/workspace/useExpertWorkspaceSkillRuntime.unit.test.ts" --max-warnings 0;npx vitest run "src/components/agent/chat/workspace/useExpertWorkspaceSkillRuntime.unit.test.ts" "src/components/agent/chat/experts/ExpertInfoPanel.test.tsx" "src/features/experts/expertSkillRuntimeCandidates.test.ts"(23 passed);npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture;npm run verify:gui-smoke。 - 2026-06-22:Agent Chat workspace facade 继续收口第七刀。opened projects 关闭 / fallback 选择 / 当前项目清理接线已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts,新 hook 只承接 current workspace opened project storage 与项目选择 side-effect,不新增旧 runtime、命令面或 mock fallback;AgentChatWorkspace.tsx从约 6289 行降到约 6251 行,仍远超 1000 行。新增useWorkspaceOpenedProjectsRuntime.unit.test.ts覆盖关闭当前项目后优先切换其他可见项目、回退持久化打开列表、仅剩关闭项目时清空,以及空白候选项目 id 过滤。已通过:npx prettier --check "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "internal/exec-plans/mcp-modernization-progress.md";git diff --check -- "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "internal/exec-plans/mcp-modernization-progress.md";npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" --max-warnings 0;npx vitest run "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/hooks/useOpenedProjectSummaries.unit.test.ts" "src/components/agent/chat/hooks/agentProjectStorage.test.tsx"(15 passed);npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture;npm run verify:gui-smoke。 - 2026-06-22:Agent Chat workspace facade 继续收口第八刀。图片工作台 provider/model 偏好摘要、不可用 warning 与生成 ready 判定已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/imageWorkbenchPreference.ts纯 ViewModel;workspace 只保留useImageGen数据源和一次投影调用,不再内联中文 summary / warning 分支;AgentChatWorkspace.tsx从约 6251 行降到约 6210 行,仍远超 1000 行。新增imageWorkbenchPreference.unit.test.ts覆盖项目 / 全局 / 自动来源、名称为空回退 id、加载中阻止生成、首选 provider 不可用且禁止 fallback、未选定 provider/model。已通过:npx prettier --check "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.unit.test.ts" "internal/exec-plans/mcp-modernization-progress.md";git diff --check -- "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.unit.test.ts" "internal/exec-plans/mcp-modernization-progress.md";npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.unit.test.ts" --max-warnings 0;npx vitest run "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/hooks/useOpenedProjectSummaries.unit.test.ts" "src/components/agent/chat/hooks/agentProjectStorage.test.tsx" "src/components/agent/chat/workspace/imageWorkbenchPreference.unit.test.ts"(20 passed);npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture;npm run verify:gui-smoke。 - 2026-06-22:Agent Chat workspace facade 继续收口第九刀。项目 / Memory / Content 初始加载、content metadata ref、canvas bootstrap 与 general workbench document version 状态容器已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/useWorkspaceProjectContentRuntime.ts,workspace facade 只保留 default project alias、workspace health check 与下游状态消费;没有新增命令面、legacy runtime 或 mock fallback。AgentChatWorkspace.tsx从约 6210 行降到约 5854 行,新增 hook 约 482 行,仍控制在 500 行附近并由后续拆分继续收口。新增useWorkspaceProjectContentRuntime.test.tsx覆盖无项目清空状态、项目缺失错误 / reset、内容加载写入 canvas / sync snapshot,以及延后 Memory 调度。已通过:npx prettier --check "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceProjectContentRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceProjectContentRuntime.test.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.unit.test.ts" "internal/exec-plans/mcp-modernization-progress.md";git diff --check -- "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceProjectContentRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceProjectContentRuntime.test.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.unit.test.ts" "internal/exec-plans/mcp-modernization-progress.md";npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceProjectContentRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceProjectContentRuntime.test.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.unit.test.ts" --max-warnings 0;npx vitest run "src/components/agent/chat/workspace/useWorkspaceProjectContentRuntime.test.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/hooks/useOpenedProjectSummaries.unit.test.ts" "src/components/agent/chat/hooks/agentProjectStorage.test.tsx" "src/components/agent/chat/workspace/imageWorkbenchPreference.unit.test.ts"(24 passed);npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture;npm run verify:gui-smoke;Playwright MCP 打开http://127.0.0.1:1420/,确认首页 / Claw 输入框可见,输入测试文本后send-btn由 disabled 变为可用,控制台 error=0,截图证据位于.lime/qc/gui-evidence/agent-workspace-project-content-runtime/agent-workspace-project-content-runtime-e2e.png。 - 2026-06-22:Agent Chat workspace facade 继续收口第十刀。workspace 健康检查、自愈 telemetry、健康错误状态与临时 workspace path 缺失诊断已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/useWorkspaceHealthRuntime.ts;default project alias 解析仍留在 facade,因为它同时负责项目选择恢复,不属于本刀 health runtime。同步删除 facade 中无写入来源的pendingWorkspacePathRetryRef/workspacePathAutoRecoveryKeyRefretry 残留,只保留当前实际生效的“跳过自动恢复”诊断行为;没有新增命令面、legacy runtime 或 mock fallback。AgentChatWorkspace.tsx从约 5854 行降到约 5702 行,新增 hook 约 170 行。新增useWorkspaceHealthRuntime.test.tsx覆盖 workspace 自动修复 telemetry、路径类错误显示健康错误、临时 bridge 错误不误报、延迟 idle 调度,以及临时 workspace path 缺失只记录跳过自动恢复诊断。已通过:npx prettier --check "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceHealthRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceHealthRuntime.test.tsx" "internal/exec-plans/mcp-modernization-progress.md";git diff --check -- "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceHealthRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceHealthRuntime.test.tsx" "internal/exec-plans/mcp-modernization-progress.md";npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useWorkspaceHealthRuntime.ts" "src/components/agent/chat/workspace/useWorkspaceHealthRuntime.test.tsx" --max-warnings 0;npx vitest run "src/components/agent/chat/workspace/useWorkspaceHealthRuntime.test.tsx" "src/components/agent/chat/workspace/useWorkspaceProjectContentRuntime.test.tsx" "src/components/agent/chat/workspace/useWorkspaceOpenedProjectsRuntime.unit.test.ts" "src/components/agent/chat/workspace/imageWorkbenchPreference.unit.test.ts" "src/components/agent/chat/workspace/agentChatWorkspaceHelpers.unit.test.ts"(37 passed);npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture(liveProviderUsed=false);npm run verify:gui-smoke(renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready);Playwright MCP 打开http://127.0.0.1:1420/,确认首页加载完成、textarea 输入Playwright E2E workspace health runtime 输入框状态验证,不发送。后send-btn从 disabled 变为可用,正在加载...不可见,console error=0,截图证据位于.lime/qc/gui-evidence/agent-workspace-health-runtime/agent-workspace-health-runtime-e2e.png。 - 2026-06-22:Agent Chat workspace facade 继续收口第十一刀。Task Center 首页输入发送编排已从
AgentChatWorkspace.tsx抽到src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.ts的useTaskCenterEmptyStateSendRuntime:active draft tab materialize、首页 non-materialized pending shell、fallbackhandleSend与homeInput.*telemetry 统一归入 Task Center draft send current runtime;facade 只保留 hook 接线,不再内联 request 构造、draft tab running 标记和 pending shell telemetry。没有新增命令面、legacy runtime 或 mock fallback。AgentChatWorkspace.tsx从约 5702 行降到约 5589 行。新增useTaskCenterDraftSendRuntime.unit.test.ts覆盖已有 draft tab 时创建 materialized request 并清旧会话、Task Center 首页无会话内容时排队 non-materialized request、非 Task Center 首屏发送直接回落到handleSend。已通过:npx prettier --check "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.unit.test.ts";git diff --check -- "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.unit.test.ts";npx eslint "src/components/agent/chat/AgentChatWorkspace.tsx" "src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.ts" "src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.unit.test.ts" --max-warnings 0;npx vitest run "src/components/agent/chat/workspace/useTaskCenterDraftSendRuntime.unit.test.ts" "src/components/agent/chat/workspace/taskCenterSurfaceState.unit.test.ts" "src/components/agent/chat/workspace/useTaskCenterTabSessionRuntime.test.tsx" "src/components/agent/chat/workspace/useTaskCenterTopicNavigationRuntime.test.tsx"(22 passed);npm run build:renderer:electron:smoke;npm run smoke:agent-runtime-current-fixture(liveProviderUsed=false);npm run verify:gui-smoke(renderer loaded、App Server initialized、Claw workbench shell ready、memory settings ready);Playwright MCP 打开http://127.0.0.1:1420/,确认首页加载完成、textarea 输入Playwright E2E task center empty-state send runtime 输入框状态验证,不发送。后send-btn从 disabled 变为可用,正在加载...不可见,console error=0,截图证据位于.lime/qc/gui-evidence/agent-task-center-empty-state-send-runtime/agent-task-center-empty-state-send-runtime-e2e.png。 - 2026-06-22:Agent Runtime current fixture 补充修复。第十一刀收尾复跑时先清理了一条卡住近 9 分钟的旧
verify:gui-smoke -> smoke:electron -> electron:build:smoke残留,避免并发重建dist/导致 Electron fixture 误报dist/index.html缺失;随后Expert Panel Skills Runtime override暴露专家面板 skill picker 触发不稳,已在scripts/agent-runtime/claw-chat-current-fixture-expert-actions.mjs增加clickExpertSkillPickerTrigger,由 fixture 记录并触发expert-info-skills-add,不放松候选、read model、Evidence Pack 与 GUI 断言。已通过:npx prettier --check "scripts/agent-runtime/claw-chat-current-fixture-expert-actions.mjs" "scripts/agent-runtime/claw-chat-current-fixture-smoke.test.mjs";npx eslint "scripts/agent-runtime/claw-chat-current-fixture-expert-actions.mjs" "scripts/agent-runtime/claw-chat-current-fixture-smoke.test.mjs" --max-warnings 0;npx vitest run "scripts/agent-runtime/claw-chat-current-fixture-smoke.test.mjs"(17 passed);npm run smoke:claw-chat-current-fixture -- --scenario expert-panel-skills-runtime;npm run smoke:agent-runtime-current-fixture。 - MCP runtime inventory snapshot 已覆盖 Agent Workspace
toolInventory/read的 server/tool/caller/visible/deferred 复核缺口;后续可把 inventory snapshot summary 接入 evidence pack 或 GUI evidence 场景,避免只停留在 inventory read API。 - MCP resource templates 的 control-plane、App Server JSON-RPC、前端网关与 current smoke 证据已覆盖;resource read grounding 已进入 evidence pack summary 与 GUI evidence pack 展示,
notifications/resources/list_changed/notifications/resources/updated已能刷新 GUI 资源列表,resources/subscribe/resources/unsubscribecurrent 控制面已补齐,GUI resource preview/offload 已避免大文本 / base64 直接进入 DOM。resources 主链下一刀应补真实第三方 MCP provider resource/tool 结果的 live-gated E2E,或把 resource preview 的真实 provider 样例沉淀到 Playwright 人工交互证据。 lime-rs/crates/mcp/src/manager.rs巨型文件已按生命周期、工具、提示词、资源与测试拆分;后续新增逻辑仍应优先进入对应子模块,若 runtime status / cache / event facade 继续增长,再按同一模式继续拆出独立子模块。
阻塞记录
npm run verify:local本轮尝试已通过verify:app-version、i18n resource check、i18n unused、全仓 eslint 与变更文件 i18n hardcoded scan;进入全量tsc --noEmit后因同一工作区已有多个并行verify:local/tsc --noEmit高 CPU 进程抢资源,长时间无输出,已主动终止本轮额外验证会话(退出码 130)。本轮 MCP 定向校验、contract 与 GUI smoke 已通过。- 历史上
npm run test:contracts曾被非 MCPuseAgentChat.ts脏改动阻塞;当前复跑已通过,MCP current smoke structuredContent 守卫已进入同一 contract 入口。 - 历史尝试
npm run smoke:mcp-current -- --allow-oauth-fixture --timeout-ms 30000时因未运行npm run electron:dev/ DevBridge 而fetch failed,当时不能作为 GUI 证据;该阻塞现已由不依赖 DevBridge 的npm run smoke:mcp-oauth-notification-electron-fixture专用真实 Electron Gate B 关闭,旧失败只保留为历史记录。 scripts/mcp/current-smoke.mjs超 1000 行阻塞已收口,当前入口约 390 行,core 约 409 行,transport 约 340 行,fixture writer 约 157 行;后续继续扩smoke:mcp-current必须优先复用scripts/mcp/lib/current-smoke-core.mjs/current-smoke-transport.mjs/current-smoke-fixture.mjs/live-provider-smoke.mjs或继续按职责拆子模块,不得把 transport / fixture / assertion helper 长回入口。MCP runtime current contract 已从scripts/check-app-server-client-contract.mjs拆到scripts/mcp/lib/contract-guards.mjs;根 contract 脚本当前约 8447 行,仍超过非生成代码体量边界,后续应继续按领域把非 MCP contract guard 拆出,不要把新领域规则继续追加到根脚本。- Agent stream handler 超 1000 行阻塞已在 2026-06-22 收口:
agentStreamRuntimeHandler.ts当前约 986 行,后续不得再把 runtime lifecycle / terminal / timer 逻辑追加回中心 handler。剩余巨型 facade 是src/components/agent/chat/AgentChatWorkspace.tsx,当前约 5589 行;下一刀如果继续治理 Agent Chat 工作区,应先按 session 列表 / task file runtime / right surface orchestration 分块拆分,并保持smoke:agent-runtime-current-fixture、WebTools rendering fixture 与verify:gui-smoke绿色。 - 本轮曾并行复用
/tmp/lime-target-mcp-resource-templates触发 cargo incremental / rmeta 写入竞争(No such file or directory (os error 2));已改用独立CARGO_TARGET_DIR="/tmp/lime-target-appserver-mcp-resource-templates"复跑 App Server MCP fixture 并通过。 lime-rs/crates/app-server/src/runtime_backend/tests.rs已是历史超大测试文件。本轮只保留mod tool_inventory;接线,并把新增 MCP inventory 回归放进runtime_backend/tests/tool_inventory.rs;退出条件:后续继续补 runtime backend 测试时优先按 domain 拆到runtime_backend/tests/*.rs,不再向中心tests.rs追加新测试体。- 本轮最初用两个全新 Cargo target dir 并行跑 app-server 测试,期间撞上其他脏改动正在拆
projection_store/queue测试的中间态,出现一次非 MCP 编译失败;已串行复用/tmp/lime-target-mcp-resource-evidence复跑通过。后续 Rust 定向验证优先复用同一 target dir,避免重复冷编译和中间态竞态。