CUA 工具卡需要显示实际目标应用图标,但模型不需要、也不保证重复提交
bundle_id。目标应用必须由 official CUA runtime 根据本次调用已经验证的
state_id、frame_id、app_ref 或 Helper 响应解析,再通过宿主专用结果元数据投影给
ZCode UI。
该能力只改变展示投影,不改变 30 个 CUA 工具的名称、输入 schema、模型可见结果、 权限、副作用、owner/stale 防护或 delivery-state 语义。
发布时 ZCode 的 catalog pin、official plugin wrapper、plugin manifest 和 official plugin
definition 必须共同对齐到包含本能力的 zcode-cua@0.5.8。只更新依赖 SHA 而保留旧
wrapper 版本会让开发态 bundle 可用、正式插件缓存路径却仍落在旧版本,版本一致性检查
必须阻止这种半升级状态。
open_application(activate=false) 对已运行应用使用 neutral shortcut 时,也必须通过
Helper application_info({pid}) 补全权威展示身份;不能因为动作未重新派发就回退到模型
输入中的 bundle id。
model input
state_id / frame_id / app_ref(pid|bundle_id|name)
|
v
official zcode-cua invocation context
session / frame registry / Helper application_info / capture result
|
v
MCP CallToolResult._meta["zcode.cua/target-app-display-v1"]
|
v
official CUA authority gate in Core
|
v
CuaToolResultDisplay.targetApp -> Desktop platform icon adapter
bundle_id 只能作为 Helper 的待验证引用,不能直接成为展示身份。zcode-cua 在统一 tool wrapper 完成后附加:
type CuaTargetAppDisplayMetaV1 = {
schemaVersion: 1;
displayName?: string;
iconLocators: Array<
| { kind: "darwin-bundle-id"; value: string }
| { kind: "windows-executable-path"; value: string }
| { kind: "windows-aumid"; value: string }
>;
};
iconLocators 按优先级排列,最多三个;身份冲突时可保留首个权威名称但必须清空
locator,使 UI 使用通用图标。ApplicationFrameHost.exe 不得作为 AUMID 失败后的图标 locator。zoom 生成子 frame 时,必须继承完整的应用身份(名称、PID、
bundle id、AUMID 和 icon locator),并在 zoom 本次结果及后续 coordinate 工具中
继续投影同一 target metadata;无 app owner 的全局 frame 及其子 frame 必须保持无目标。_meta 不进入 provider-visible tool result;现有 frame-integrity metadata 必须保留。CuaToolResultDisplayPayload 保持 schemaVersion: 1,新增可选
targetApp: { displayName?: string; iconLocators: ApplicationIconLocator[] }。
旧记录无需迁移。tool_call_result 与 completed tool part metadata 使用同一份 bounded display,
resume/cold hydration 直接消费持久化字段,不解析模型可见文本。display.targetApp、旧 input、旧 JSON result、
通用 CUA 图标。不增加对普通 app: 文本行的解析。IPlatformService.getApplicationIcon 接受结构化 locator request,同时保留 string
兼容入口。macOS 继续解析 bundle;Windows exe 使用 Electron app.getFileIcon,
AUMID 由 Desktop 通过 Windows Shell AppsFolder identity 读取。null 并显示通用图标。app.getFileIcon。非法、过长或非官方来源一律忽略。本文上面描述的 zcode.cua/target-app-display-v1 已被 producer 在 2026-08-20
(zcode-cua@2796e8736 feat(cua): own application presentation metadata)替换为
zcode.cua/app-associations-v1:
type CuaAppAssociationsV1 = {
schemaVersion: 1;
/** 单一目标动作与观察(APP_ASSOCIATION_MODE_BY_TOOL 里声明 "primary" 的工具)。 */
primary?: { appKey: string; displayName?: string; icon?: { mimeType: "image/png"; data: string } };
/** list_apps(声明 "items"):按结果下标关联,携带最多 128 条。 */
items?: Array<{ resultIndex: number; application: /* 同 primary */ unknown }>;
};
appKey 取代 iconLocators,形态为 darwin:<bundleId> / windows-aumid:<aumid> /
windows-exe:<canonical path> / linux-exe:<path>;locator 由消费侧按前缀派生。icon:会话协议
不承载 data URL 的约定不变,图标仍由 IPlatformService.getApplicationIcon(locator) 解析。target-app-display-v1 的消费;CuaToolResultDisplay.targetApp
与 iconLocators 自 2026-08-20 起就取不到值,工具卡图标一直靠 legacy
readBundleId(input) ?? readCuaResultBundleId(result) 兜底。该兜底只对历史会话保留。Computer Use 迁到 node_repl 之后,「official CUA authority gate in Core」这一跳不再成立
(工具名恒为 mcp__node_repl__js,readCuaToolName 不匹配)。新链路把可信点前移到宿主:
producer _meta["zcode.cua/app-associations-v1"].primary
|
v broker 响应,沙箱不可见
node-repl-host CUA bridge(唯一可信记录点)
|
v NodeReplRunResult.cuaApp
node_repl 结果 _meta["zcode/nodeReplCuaApp"](宿主独占写入)
|
v
Core `node_repl_images.app` -> UI leading icon
nodeRepl.setResponseMeta、nodeRepl.emitStructuredResult)送达的
zcode.cua/app-associations-v1 一律丢弃:这两个 API 挂在模型可见 globals 上,否则模型
可以让工具卡声称自己操作了别的应用。处置方式与
zcode/nodeReplBrowserScreenshotContentIndices 一致。node_repl 的 server 身份由宿主生成且最后合并(resolveAppRuntimeConfig 保留内建
identity),用户与第三方无法用同名配置劫持,因此 Core 侧按该 server 名消费宿主键是安全的。cua-tool-app-identity-summary.md
的「node_repl 时代的身份来源」。