diff --git a/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.i18n.yaml b/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.i18n.yaml
index 030217fd14..f5c3ab936a 100644
--- a/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.i18n.yaml
+++ b/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.i18n.yaml
@@ -9,8 +9,8 @@
en: 24c320421e003cc8
zh: 7d0335e6d6fac199
/macos-cua-isolates-unavailable-ax-branches/change:
- en: efa036037e2183be
- zh: 6fe5b02f1f8db947
+ en: bf96226e9657e7d4
+ zh: 2bc49ffd5c1bc9b8
/macos-cua-isolates-unavailable-ax-branches/migration:
en: 302d54191d6bd577
zh: 6f39a66c7be60053
diff --git a/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.md b/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.md
index 926d1c97c5..a14e8d76d2 100644
--- a/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.md
+++ b/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.md
@@ -8,7 +8,7 @@ English | [中文](guide.zh.md)
## Change
-macOS `getState` previously rejected an entire AX read with `STALE_SNAPSHOT` when one traversed element became invalid. It now returns readable nodes, marks each unavailable branch in `tree`, and sets `hasUnreadableElements: true`. Markers have no element IDs; their contents are unknown. `truncated` still describes traversal limits independently. macOS omits `hasUnreadableElements` when no unreadable node or child-list entry was encountered; other providers may also omit the field.
+macOS `getState` previously rejected an entire AX read with `STALE_SNAPSHOT` when one traversed element became invalid. It now returns readable nodes, marks each unavailable branch in `tree` with `[One child could not be read.]`, and sets `hasUnreadableElements: true`. Markers have no element IDs; their contents are unknown. `truncated` still describes traversal limits independently. macOS omits `hasUnreadableElements` when no unreadable node or child-list entry was encountered; other providers may also omit the field.
An invalid AX object that prevents resolving the requested observation scope returns `AX_OBSERVATION_UNAVAILABLE`. Encountering such an object while discovering an unresolved window or sheet rejects the read instead of publishing an empty complete snapshot. An AX `cannotComplete` failure during observation returns `AX_COMMUNICATION_FAILED`. Permission, application/window identity, cancellation and other errors still reject the read. `STALE_SNAPSHOT` remains the error for expired or mismatched snapshots used by input operations.
diff --git a/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.zh.md b/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.zh.md
index fe29f69c4d..9166f95db2 100644
--- a/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.zh.md
+++ b/docs/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.zh.md
@@ -8,7 +8,7 @@ description: "macOS CUA 返回带标记的部分 AX 观察,并区分观察失
## 变更
-此前,macOS `getState` 在一个遍历元素失效时会以 `STALE_SNAPSHOT` 拒绝整次 AX 读取。现在返回可读节点,在 `tree` 中标记每个不可用分支,并设置 `hasUnreadableElements: true`。标记没有元素 ID,分支内容未知。`truncated` 仍独立表示遍历上限。未遇到不可读节点或子项列表条目时,macOS 省略 `hasUnreadableElements`;其他 provider 也可以省略此字段。
+此前,macOS `getState` 在一个遍历元素失效时会以 `STALE_SNAPSHOT` 拒绝整次 AX 读取。现在返回可读节点,在 `tree` 中用 `[One child could not be read.]` 标记每个不可用分支,并设置 `hasUnreadableElements: true`。标记没有元素 ID,分支内容未知。`truncated` 仍独立表示遍历上限。未遇到不可读节点或子项列表条目时,macOS 省略 `hasUnreadableElements`;其他 provider 也可以省略此字段。
观察准备阶段的失效 AX 对象导致请求范围无法确定时,返回 `AX_OBSERVATION_UNAVAILABLE`。发现未解析的窗口或 sheet 时遇到这类对象,读取会失败,不发布空的完整快照。观察期间 AX 返回 `cannotComplete` 时,返回 `AX_COMMUNICATION_FAILED`。权限、应用或窗口身份、取消及其他错误仍会拒绝读取。输入操作使用过期或不匹配的快照时,仍返回 `STALE_SNAPSHOT`。
diff --git a/packages/experimental/cua-macos/native/README.i18n.yaml b/packages/experimental/cua-macos/native/README.i18n.yaml
index fd5df289e8..1c5021c939 100644
--- a/packages/experimental/cua-macos/native/README.i18n.yaml
+++ b/packages/experimental/cua-macos/native/README.i18n.yaml
@@ -21,8 +21,8 @@
en: 3a6131ab2030cda1
zh: ca36ceb70e4b55ed
/dsh-cua-native-helper/observation-and-input:
- en: d7261b49740cfb5f
- zh: 0df2a993a005dfbe
+ en: 25defe38d44a9d3f
+ zh: 2de2c799e6fbdb46
/dsh-cua-native-helper/verification:
en: 908b13b2732c1bec
zh: ac3bbd77ed9a69b8
diff --git a/packages/experimental/cua-macos/native/README.md b/packages/experimental/cua-macos/native/README.md
index 39ce8738e3..1f4ea065f2 100644
--- a/packages/experimental/cua-macos/native/README.md
+++ b/packages/experimental/cua-macos/native/README.md
@@ -95,7 +95,7 @@ Protocol declarations are generated from [the shared protocol](../../cua/src/pro
## Observation and input
-`getState` optionally scopes AX traversal to an owned window or nested sheet `windowId`. A new or failed refresh invalidates the previous snapshot for that app/window scope, while other window scopes remain usable. When window/sheet discovery completed without invalid children and an owned CG window has no matching AX surface, getState returns a new snapshot with empty tree/elements and no truncation; its coordinates and screenshots remain available. It rechecks process lifetime, window ownership, the unlocked session and Accessibility permission after traversal. Window-discovery APIDisabled and communication errors remain failures; unsupported or absent optional AX attributes can produce an empty observation. Missing or foreign-owned windows never produce an empty success. An invalid AX element during traversal produces an indented `[unavailable branch : invalidUIElement; contents unknown]` marker and `hasUnreadableElements: true`; readable siblings remain available. The zero-based root/child path locates the failed branch within this traversal and is not an element ID. Only nodes whose own metadata and actions were read receive IDs; unreadable child-list entries receive none. A footer directs callers to a screenshot for unknown contents. For `AXChildren -25200`, range reads recover valid siblings within the shared per-observation request and time budgets. Gaps keep their position without an element ID; unknown positions produce a parent marker. macOS omits `hasUnreadableElements` when neither nodes nor child-list entries were unreadable; `truncated` independently reports traversal limits. Observation setup failures publish no snapshot. Invalid elements during setup return `AX_OBSERVATION_UNAVAILABLE`; AX `cannotComplete` anywhere in the observation returns `AX_COMMUNICATION_FAILED`. Both retain the failing AX operation. Permission, identity, cancellation and malformed-result errors still fail the read. Read fresh state or use a screenshot without repeating preceding input. Raw element targets require `appHandle`, `snapshotId` and an opaque string `elementId`. For `click` and `mouseMove`, the optional `windowId` must match both the snapshot scope (unless app-wide) and the element’s enclosing window or sheet. A mismatch returns `STALE_SNAPSHOT` before dispatch. Coordinate targets use `windowId`, `x` and `y` and may include a snapshot from that window or the app. Mixing an element ID with coordinates returns `INVALID_ARGUMENT`. The Host converts relative coordinates before dispatch, so the native JSONL protocol rejects the `relative` field. Native references never cross JSON. Window-list refresh releases snapshots for closed windows. Native process identity, snapshot generation, and window ownership checks do not lock the desktop against simultaneous user or application changes.
+`getState` optionally scopes AX traversal to an owned window or nested sheet `windowId`. A new or failed refresh invalidates the previous snapshot for that app/window scope, while other window scopes remain usable. When window/sheet discovery completed without invalid children and an owned CG window has no matching AX surface, getState returns a new snapshot with empty tree/elements and no truncation; its coordinates and screenshots remain available. It rechecks process lifetime, window ownership, the unlocked session and Accessibility permission after traversal. Window-discovery APIDisabled and communication errors remain failures; unsupported or absent optional AX attributes can produce an empty observation. Missing or foreign-owned windows never produce an empty success. An invalid AX element during traversal produces the same indented `[One child could not be read.]` marker as a positioned child-list gap and sets `hasUnreadableElements: true`; readable siblings remain available. Only nodes whose own metadata and actions were read receive IDs; unreadable child-list entries receive none. Use a screenshot to inspect unknown contents. For `AXChildren -25200`, range reads recover valid siblings within the shared per-observation request and time budgets. Gaps keep their position without an element ID; unknown positions produce `[Child list incomplete.]` at the parent. macOS omits `hasUnreadableElements` when neither nodes nor child-list entries were unreadable; `truncated` independently reports traversal limits. Observation setup failures publish no snapshot. Invalid elements during setup return `AX_OBSERVATION_UNAVAILABLE`; AX `cannotComplete` anywhere in the observation returns `AX_COMMUNICATION_FAILED`. Both retain the failing AX operation. Permission, identity, cancellation and malformed-result errors still fail the read. Read fresh state or use a screenshot without repeating preceding input. Raw element targets require `appHandle`, `snapshotId` and an opaque string `elementId`. For `click` and `mouseMove`, the optional `windowId` must match both the snapshot scope (unless app-wide) and the element’s enclosing window or sheet. A mismatch returns `STALE_SNAPSHOT` before dispatch. Coordinate targets use `windowId`, `x` and `y` and may include a snapshot from that window or the app. Mixing an element ID with coordinates returns `INVALID_ARGUMENT`. The Host converts relative coordinates before dispatch, so the native JSONL protocol rejects the `relative` field. Native references never cross JSON. Window-list refresh releases snapshots for closed windows. Native process identity, snapshot generation, and window ownership checks do not lock the desktop against simultaneous user or application changes.
Hiding a window does not itself expire its AX snapshot. An inventory refresh can retain the previous screenshot mapping only while the same window ID remains present at the same observed size. An observed size change requires a new screenshot for pixel input; a closed window cannot be targeted. Omission from discovery does not block input to a known ID: ownership, geometry and input checks still apply, and dispatch does not confirm receipt.
diff --git a/packages/experimental/cua-macos/native/README.zh.md b/packages/experimental/cua-macos/native/README.zh.md
index 8f21c6edcd..367d32c111 100644
--- a/packages/experimental/cua-macos/native/README.zh.md
+++ b/packages/experimental/cua-macos/native/README.zh.md
@@ -95,7 +95,7 @@ AppKit 在主事件循环上运行。阻塞式 socket 接收与握手使用后
## 观察与输入
-`getState` 可将 AX 遍历限定到应用所属窗口或嵌套 sheet 的 `windowId`。新的刷新或失败的刷新使同一应用/窗口范围的旧快照失效,其他窗口范围仍可使用。仅当窗口和 sheet 发现阶段未遇到失效子对象,且应用所属 CG 窗口没有匹配 AX 界面时,getState 返回空 tree/elements、truncated 为 false 的新快照,仍可截图和坐标输入。遍历后重新检查进程生命期、窗口归属、会话未锁定及辅助功能权限。窗口发现中的 APIDisabled 和通信错误仍会失败;不支持或缺失的可选 AX 属性可以产生空观察。不存在或属于其他应用的窗口不会返回空成功结果。遍历中 AX 元素失效会生成缩进的 `[unavailable branch : invalidUIElement; contents unknown]` 标记,并设置 `hasUnreadableElements: true`;可读的兄弟节点仍会返回。从零开始的根节点及子节点路径定位本次遍历中的失败分支,不是元素 ID。只有自身元数据和动作成功读出的节点才获得 ID;不可读的子项列表条目没有 ID。末尾提示引导调用方通过截图查看未知内容。`AXChildren -25200` 使用范围读取恢复有效兄弟节点,整次观察共用额外请求数和时间预算。缺口保留位置但没有元素 ID;无法确定位置时在父节点标记。未遇到不可读节点或子项列表条目时,macOS 省略 `hasUnreadableElements`;`truncated` 独立表示遍历上限。观察准备失败时不发布快照。准备阶段元素失效返回 `AX_OBSERVATION_UNAVAILABLE`;观察任一阶段的 AX `cannotComplete` 返回 `AX_COMMUNICATION_FAILED`,两者均保留失败的 AX 操作。权限、身份、取消和结果格式错误仍使读取失败。重新读状态或使用截图,不重复此前的输入。原生元素目标需要 `appHandle`、`snapshotId` 和字符串 `elementId`。`click` 和 `mouseMove` 可附带 `windowId`。它必须与元素所属窗口或 sheet 一致,对窗口级快照还必须与快照的窗口一致,否则在发送输入前返回 `STALE_SNAPSHOT`。坐标目标使用 `windowId`、`x`、`y`,可以附带来自该窗口或应用的快照。混用元素 ID 和坐标会返回 `INVALID_ARGUMENT`。Host 在发送请求前换算相对坐标,原生 JSONL 协议会拒绝 `relative` 字段。原生引用不跨 JSON 传递。刷新窗口列表会释放已关闭窗口的快照。进程身份、快照代次和窗口归属检查不会锁住桌面,用户或应用仍可同时改变状态。
+`getState` 可将 AX 遍历限定到应用所属窗口或嵌套 sheet 的 `windowId`。新的刷新或失败的刷新使同一应用/窗口范围的旧快照失效,其他窗口范围仍可使用。仅当窗口和 sheet 发现阶段未遇到失效子对象,且应用所属 CG 窗口没有匹配 AX 界面时,getState 返回空 tree/elements、truncated 为 false 的新快照,仍可截图和坐标输入。遍历后重新检查进程生命期、窗口归属、会话未锁定及辅助功能权限。窗口发现中的 APIDisabled 和通信错误仍会失败;不支持或缺失的可选 AX 属性可以产生空观察。不存在或属于其他应用的窗口不会返回空成功结果。遍历中 AX 元素失效与已定位的子项列表缺口共用缩进的 `[One child could not be read.]` 标记,并设置 `hasUnreadableElements: true`;可读的兄弟节点仍会返回。只有自身元数据和动作成功读出的节点才获得 ID;不可读的子项列表条目没有 ID。通过截图查看未知内容。`AXChildren -25200` 使用范围读取恢复有效兄弟节点,整次观察共用额外请求数和时间预算。缺口保留位置但没有元素 ID;无法确定位置时在父节点显示 `[Child list incomplete.]`。未遇到不可读节点或子项列表条目时,macOS 省略 `hasUnreadableElements`;`truncated` 独立表示遍历上限。观察准备失败时不发布快照。准备阶段元素失效返回 `AX_OBSERVATION_UNAVAILABLE`;观察任一阶段的 AX `cannotComplete` 返回 `AX_COMMUNICATION_FAILED`,两者均保留失败的 AX 操作。权限、身份、取消和结果格式错误仍使读取失败。重新读状态或使用截图,不重复此前的输入。原生元素目标需要 `appHandle`、`snapshotId` 和字符串 `elementId`。`click` 和 `mouseMove` 可附带 `windowId`。它必须与元素所属窗口或 sheet 一致,对窗口级快照还必须与快照的窗口一致,否则在发送输入前返回 `STALE_SNAPSHOT`。坐标目标使用 `windowId`、`x`、`y`,可以附带来自该窗口或应用的快照。混用元素 ID 和坐标会返回 `INVALID_ARGUMENT`。Host 在发送请求前换算相对坐标,原生 JSONL 协议会拒绝 `relative` 字段。原生引用不跨 JSON 传递。刷新窗口列表会释放已关闭窗口的快照。进程身份、快照代次和窗口归属检查不会锁住桌面,用户或应用仍可同时改变状态。
窗口隐藏本身不会使 AX 快照失效。刷新清单时,只有同一窗口 ID 仍存在且观察到的尺寸未变,才能继续使用此前截图的像素坐标。观察到尺寸变化后需要重新截图;窗口销毁后不能继续操作。清单中省略窗口不会阻止按已知 ID 发起输入。窗口归属、尺寸和输入检查仍然生效,成功分派不代表应用已接收。
diff --git a/packages/experimental/cua-macos/native/Sources/CuaNative/AXTreeProjection.swift b/packages/experimental/cua-macos/native/Sources/CuaNative/AXTreeProjection.swift
index c5c250dd97..c2a11229d5 100644
--- a/packages/experimental/cua-macos/native/Sources/CuaNative/AXTreeProjection.swift
+++ b/packages/experimental/cua-macos/native/Sources/CuaNative/AXTreeProjection.swift
@@ -23,8 +23,8 @@ enum AXTreeProjection {
}
var elements: [JSONValue] = []
var indexed: [Int: AXUIElement] = [:]
- var pending = roots.entries.enumerated().reversed().map { (element: $0.element, level: 0, depth: 0, path: String($0.offset)) }
- while let (entry, level, depth, path) = pending.popLast() {
+ var pending = roots.entries.reversed().map { (element: $0, level: 0, depth: 0) }
+ while let (entry, level, depth) = pending.popLast() {
try checkCancellation()
let hash = entry.map { CFHash($0) }
if let element = entry, let hash, visited[hash, default: []].contains(where: { CFEqual($0, element) }) { continue }
@@ -41,7 +41,7 @@ enum AXTreeProjection {
do { observation = try read(element) }
catch let failure as NativeFailure where failure.accessibilityError == AXError.invalidUIElement.rawValue {
hasUnreadableElements = true
- lines.append(String(repeating: " ", count: level) + "- [unavailable branch \(path): invalidUIElement; contents unknown]")
+ lines.append(AXTextFormatter.unreadableChildLine(level: level, positioned: true))
continue
}
var node = observation.text
@@ -70,12 +70,11 @@ enum AXTreeProjection {
if children.hasUnreadableElements { hasUnreadableElements = true }
if children.elementLimitReached { elementLimitReached = true }
if children.parentIncomplete { lines.append(AXTextFormatter.unreadableChildLine(level: childLevel, positioned: false)) }
- for (childIndex, child) in children.entries.enumerated().reversed() {
- pending.append((child, childLevel, depth + 1, "\(path).\(childIndex)"))
+ for child in children.entries.reversed() {
+ pending.append((child, childLevel, depth + 1))
}
}
if menusCollapsed { lines.append("Menu contents omitted; request includeMenus=true to expand.") }
- if hasUnreadableElements { lines.append("Accessibility observation incomplete: unavailable branches have unknown contents and no element IDs. Use a screenshot to inspect them.") }
if elementLimitReached || depthLimitReached { lines.append(AXTextFormatter.truncation(maxElements: elementLimitReached ? maxElements : nil, maxDepth: depthLimitReached ? maxDepth : nil)) }
return AXProjection(tree: lines.joined(separator: "\n"), elements: elements, indexed: indexed,
focusedWindowID: focusedWindowID, truncated: elementLimitReached || depthLimitReached, hasUnreadableElements: hasUnreadableElements)
diff --git a/packages/experimental/cua-macos/native/tests/swift/AXTreeProjectionTests.swift b/packages/experimental/cua-macos/native/tests/swift/AXTreeProjectionTests.swift
index bf4a97db93..157bc26589 100644
--- a/packages/experimental/cua-macos/native/tests/swift/AXTreeProjectionTests.swift
+++ b/packages/experimental/cua-macos/native/tests/swift/AXTreeProjectionTests.swift
@@ -38,9 +38,8 @@ private func project(_ roots: [AXUIElement], maxElements: Int = 20, maxDepth: In
AX scope=window offsets=UTF-16
- AXWindow "Window"
- [0] AXButton "Before"
- - [unavailable branch 0.1: invalidUIElement; contents unknown]
+ [One child could not be read.]
- [1] AXButton "After"
- Accessibility observation incomplete: unavailable branches have unknown contents and no element IDs. Use a screenshot to inspect them.
""")
#expect(result.elements.map { $0["elementId"].string } == ["0", "1"])
#expect(result.indexed.count == 2)
@@ -55,7 +54,7 @@ private func project(_ roots: [AXUIElement], maxElements: Int = 20, maxDepth: In
throw NativeFailure(code: "NATIVE_ERROR", message: "read AXRole", accessibilityError: AXError.invalidUIElement.rawValue)
}
#expect(result.hasUnreadableElements)
- #expect(result.tree.contains("[unavailable branch 0: invalidUIElement; contents unknown]"))
+ #expect(result.tree == "AX scope=window offsets=UTF-16\n[One child could not be read.]")
#expect(result.indexed.isEmpty)
#expect(result.elements.isEmpty)
}
@@ -99,7 +98,7 @@ func otherAXFailuresStillRejectTheObservation(code: AXError) throws {
}
#expect(reads == 2)
#expect(result.hasUnreadableElements && result.truncated)
- #expect(result.tree.components(separatedBy: "[unavailable branch").count == 2)
+ #expect(result.tree.components(separatedBy: "[One child could not be read.]").count == 2)
#expect(result.tree.contains("maxElements=2"))
}
@@ -139,7 +138,7 @@ func otherAXFailuresStillRejectTheObservation(code: AXError) throws {
])])
}
-@Test func rangeGapsAndInvalidNodesShareOneCompletenessFlag() throws {
+@Test func rangeGapsAndInvalidNodesShareOneMarkerAndCompletenessFlag() throws {
let nodes = (1...4).map { AXUIElementCreateApplication(Int32($0)) }
let result = try project([nodes[0]]) { element in
if CFEqual(element, nodes[0]) {
@@ -152,8 +151,14 @@ func otherAXFailuresStillRejectTheObservation(code: AXError) throws {
return readNode("AXButton", title: CFEqual(element, nodes[1]) ? "Before" : "After")
}
#expect(result.hasUnreadableElements && !result.truncated)
- #expect(result.tree.contains("[One child could not be read.]"))
- #expect(result.tree.contains("[unavailable branch 0.2: invalidUIElement; contents unknown]"))
+ #expect(result.tree == """
+ AX scope=window offsets=UTF-16
+ - AXWindow
+ - [0] AXButton "Before"
+ [One child could not be read.]
+ [One child could not be read.]
+ - [1] AXButton "After"
+ """)
#expect(result.elements.map { $0["elementId"].string } == ["0", "1"])
#expect(CFEqual(try #require(result.indexed[0]), nodes[1]))
#expect(CFEqual(try #require(result.indexed[1]), nodes[3]))
diff --git a/packages/experimental/cua/tests/api.spec.ts b/packages/experimental/cua/tests/api.spec.ts
index 94a77ff160..91f5f97d53 100644
--- a/packages/experimental/cua/tests/api.spec.ts
+++ b/packages/experimental/cua/tests/api.spec.ts
@@ -628,7 +628,7 @@ describe('application and window observations', () => {
const app = await f.api.getApp('Editor')
await app.getAccessibilityTree()
await app.pressKey('Return')
- const tree = '- [0] AXButton "Save"\n- [unavailable branch 0.1: invalidUIElement; contents unknown]'
+ const tree = '- [0] AXButton "Save"\n[One child could not be read.]'
f.dispatch.mockResolvedValueOnce(state({ tree, hasUnreadableElements: true }))
await expect(app.getAccessibilityTree()).resolves.toBe(tree)
await app.invoke(element('0'))
diff --git a/snapshots/session/cua-native/session.v4.jsonl b/snapshots/session/cua-native/session.v4.jsonl
index fc4e400842..598b204d19 100644
--- a/snapshots/session/cua-native/session.v4.jsonl
+++ b/snapshots/session/cua-native/session.v4.jsonl
@@ -339,7 +339,7 @@
{"type":"step/start","data":{"turn":1,"step":66}}
{"type":"assistant/message","data":{"turn":1,"step":66,"message":{"role":"assistant","content":[{"type":"tool-call","id":"cua-partial-read","name":"cua","arguments":"{\"method\":\"getState\",\"params\":{\"appHandle\":\"fixture-app\",\"windowId\":\"7\"}}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash-vision-exp"},"id":"{{message:134}}"},"usage":{"inputTokens":3,"outputTokens":3},"stream":[{"type":"chunk","time":1794462777225,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1794462777225,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"cua-partial-read","name":"cua","arguments":"{\"method\":\"getState\",\"params\":{\"appHandle\":\"fixture-app\",\"windowId\":\"7\"}}"}}},{"type":"chunk","time":1794462777225,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}}},{"type":"chunk","time":1794462777225,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":66,"callId":"cua-partial-read","name":"cua","arguments":"{\"method\":\"getState\",\"params\":{\"appHandle\":\"fixture-app\",\"windowId\":\"7\"}}"}}
-{"type":"tool/result","data":{"turn":1,"step":66,"message":{"role":"tool","source":{"kind":"tool","callId":"cua-partial-read"},"toolCallId":"cua-partial-read","content":[{"type":"text","text":"{\"appHandle\":\"fixture-app\",\"windowId\":\"7\",\"snapshotId\":\"fixture-snapshot-18\",\"tree\":\"AX scope=window offsets=UTF-16\\n- AXWindow \\\"Fixture\\\"\\n - [0] AXButton \\\"Increment\\\"\\n - [unavailable branch 0.1: invalidUIElement; contents unknown]\\n - AXStaticText \\\"Readable sibling\\\"\\nAccessibility observation incomplete: unavailable branches have unknown contents and no element IDs. Use a screenshot to inspect them.\",\"windows\":[{\"windowId\":\"7\",\"appName\":\"Fixture\",\"title\":\"CUA fixture\",\"bounds\":{\"x\":40,\"y\":60,\"width\":320,\"height\":200},\"isOnScreen\":true,\"onCurrentSpace\":true},{\"windowId\":\"8\",\"appName\":\"Fixture\",\"title\":\"AXless canvas\",\"bounds\":{\"x\":40,\"y\":60,\"width\":320,\"height\":200},\"isOnScreen\":true,\"onCurrentSpace\":true},{\"windowId\":\"9\",\"appName\":\"Fixture\",\"title\":\"Transformed window\",\"bounds\":{\"x\":16,\"y\":512,\"width\":131,\"height\":145},\"isOnScreen\":true,\"onCurrentSpace\":true},{\"windowId\":\"10\",\"appName\":\"Fixture\",\"title\":\"Floating panel\",\"bounds\":{\"x\":100,\"y\":120,\"width\":240,\"height\":140},\"isOnScreen\":true,\"onCurrentSpace\":true}],\"truncated\":false,\"hasUnreadableElements\":true}"}],"isError":false,"id":"{{message:135}}"}},"sourceEventSeqs":[339],"surfaceOp":"append"}
+{"type":"tool/result","data":{"turn":1,"step":66,"message":{"role":"tool","source":{"kind":"tool","callId":"cua-partial-read"},"toolCallId":"cua-partial-read","content":[{"type":"text","text":"{\"appHandle\":\"fixture-app\",\"windowId\":\"7\",\"snapshotId\":\"fixture-snapshot-18\",\"tree\":\"AX scope=window offsets=UTF-16\\n- AXWindow \\\"Fixture\\\"\\n - [0] AXButton \\\"Increment\\\"\\n [One child could not be read.]\\n - AXStaticText \\\"Readable sibling\\\"\",\"windows\":[{\"windowId\":\"7\",\"appName\":\"Fixture\",\"title\":\"CUA fixture\",\"bounds\":{\"x\":40,\"y\":60,\"width\":320,\"height\":200},\"isOnScreen\":true,\"onCurrentSpace\":true},{\"windowId\":\"8\",\"appName\":\"Fixture\",\"title\":\"AXless canvas\",\"bounds\":{\"x\":40,\"y\":60,\"width\":320,\"height\":200},\"isOnScreen\":true,\"onCurrentSpace\":true},{\"windowId\":\"9\",\"appName\":\"Fixture\",\"title\":\"Transformed window\",\"bounds\":{\"x\":16,\"y\":512,\"width\":131,\"height\":145},\"isOnScreen\":true,\"onCurrentSpace\":true},{\"windowId\":\"10\",\"appName\":\"Fixture\",\"title\":\"Floating panel\",\"bounds\":{\"x\":100,\"y\":120,\"width\":240,\"height\":140},\"isOnScreen\":true,\"onCurrentSpace\":true}],\"truncated\":false,\"hasUnreadableElements\":true}"}],"isError":false,"id":"{{message:135}}"}},"sourceEventSeqs":[339],"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":66}}
{"type":"step/start","data":{"turn":1,"step":67}}
{"type":"assistant/message","data":{"turn":1,"step":67,"message":{"role":"assistant","content":[{"type":"tool-call","id":"cua-communication-arm","name":"cua","arguments":"{\"method\":\"pressKey\",\"params\":{\"appHandle\":\"fixture-app\",\"key\":\"F3\"}}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash-vision-exp"},"id":"{{message:136}}"},"usage":{"inputTokens":3,"outputTokens":3},"stream":[{"type":"chunk","time":1794462777245,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1794462777245,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"cua-communication-arm","name":"cua","arguments":"{\"method\":\"pressKey\",\"params\":{\"appHandle\":\"fixture-app\",\"key\":\"F3\"}}"}}},{"type":"chunk","time":1794462777245,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}}},{"type":"chunk","time":1794462777245,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
diff --git a/snapshots/session/cua-native/workspace/native-helper.mjs b/snapshots/session/cua-native/workspace/native-helper.mjs
index e31f2570a4..b24a965579 100755
--- a/snapshots/session/cua-native/workspace/native-helper.mjs
+++ b/snapshots/session/cua-native/workspace/native-helper.mjs
@@ -188,7 +188,7 @@ function createApplicationState(socket, record, application, captureBroker, conn
if (partialObservation) {
partialObservation = false
return { appHandle: app.appHandle, windowId: params.windowId ?? null, snapshotId,
- tree: 'AX scope=window offsets=UTF-16\n- AXWindow "Fixture"\n - [0] AXButton "Increment"\n - [unavailable branch 0.1: invalidUIElement; contents unknown]\n - AXStaticText "Readable sibling"\nAccessibility observation incomplete: unavailable branches have unknown contents and no element IDs. Use a screenshot to inspect them.',
+ tree: 'AX scope=window offsets=UTF-16\n- AXWindow "Fixture"\n - [0] AXButton "Increment"\n [One child could not be read.]\n - AXStaticText "Readable sibling"',
elements: [], windows: windows(), truncated: false, hasUnreadableElements: true }
}
if (params.windowId === panel.windowId && application.panelVisibility !== 'closed') return {