@roam-agent/roam-computer-use 0.0.0-stage → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +80 -2
- package/assets/reference/img.jpg +0 -0
- package/docs/README.md +45 -0
- package/docs/content/docs/explanation/action-pipeline.mdx +36 -0
- package/docs/content/docs/explanation/architecture.mdx +161 -0
- package/docs/content/docs/explanation/index.mdx +19 -0
- package/docs/content/docs/explanation/meta.json +5 -0
- package/docs/content/docs/explanation/observation-pipeline.mdx +37 -0
- package/docs/content/docs/explanation/platform-boundary.mdx +37 -0
- package/docs/content/docs/explanation/state-and-scheduling.mdx +35 -0
- package/docs/content/docs/how-to-guides/develop-and-validate.mdx +112 -0
- package/docs/content/docs/how-to-guides/index.mdx +12 -0
- package/docs/content/docs/how-to-guides/linux.mdx +68 -0
- package/docs/content/docs/how-to-guides/meta.json +1 -0
- package/docs/content/docs/how-to-guides/troubleshooting.mdx +126 -0
- package/docs/content/docs/index.mdx +67 -0
- package/docs/content/docs/meta.json +5 -0
- package/docs/content/docs/reference/agent/contract.mdx +162 -0
- package/docs/content/docs/reference/agent/index.mdx +8 -0
- package/docs/content/docs/reference/agent/meta.json +8 -0
- package/docs/content/docs/reference/agent/tools.mdx +221 -0
- package/docs/content/docs/reference/codebase.mdx +139 -0
- package/docs/content/docs/reference/configuration.mdx +113 -0
- package/docs/content/docs/reference/index.mdx +28 -0
- package/docs/content/docs/reference/meta.json +10 -0
- package/docs/content/docs/reference/platforms/index.mdx +18 -0
- package/docs/content/docs/reference/platforms/macos/accessibility.mdx +61 -0
- package/docs/content/docs/reference/platforms/macos/actions.mdx +63 -0
- package/docs/content/docs/reference/platforms/macos/capture.mdx +58 -0
- package/docs/content/docs/reference/platforms/macos/implementation.mdx +98 -0
- package/docs/content/docs/reference/platforms/macos/index.mdx +16 -0
- package/docs/content/docs/reference/platforms/macos/meta.json +10 -0
- package/docs/content/docs/reference/platforms/macos/root-targeting.mdx +47 -0
- package/docs/content/docs/reference/platforms/meta.json +8 -0
- package/docs/content/docs/reference/platforms/windows.mdx +75 -0
- package/docs/content/docs/tutorials/getting-started.mdx +46 -0
- package/docs/content/docs/tutorials/index.mdx +10 -0
- package/docs/content/docs/tutorials/meta.json +1 -0
- package/extensions/computer-use.ts +235 -0
- package/native/linux/bridge-rs/Cargo.lock +1204 -0
- package/native/linux/bridge-rs/Cargo.toml +21 -0
- package/native/linux/bridge-rs/src/atspi.rs +670 -0
- package/native/linux/bridge-rs/src/error.rs +65 -0
- package/native/linux/bridge-rs/src/lib.rs +11 -0
- package/native/linux/bridge-rs/src/main.rs +1110 -0
- package/native/linux/bridge-rs/src/protocol.rs +49 -0
- package/native/linux/bridge-rs/src/state.rs +293 -0
- package/native/linux/bridge-rs/src/wayland.rs +89 -0
- package/native/linux/bridge-rs/src/x11.rs +909 -0
- package/native/linux/bridge-rs/tests/protocol_tests.rs +73 -0
- package/native/macos/activity_glow.swift +169 -0
- package/native/macos/bridge.swift +3968 -0
- package/native/windows/bridge-rs/Cargo.lock +396 -0
- package/native/windows/bridge-rs/Cargo.toml +30 -0
- package/native/windows/bridge-rs/src/capture.rs +561 -0
- package/native/windows/bridge-rs/src/error.rs +81 -0
- package/native/windows/bridge-rs/src/input.rs +501 -0
- package/native/windows/bridge-rs/src/lib.rs +85 -0
- package/native/windows/bridge-rs/src/main.rs +1683 -0
- package/native/windows/bridge-rs/src/protocol.rs +53 -0
- package/native/windows/bridge-rs/src/refs.rs +237 -0
- package/native/windows/bridge-rs/src/state.rs +55 -0
- package/native/windows/bridge-rs/src/uia.rs +1252 -0
- package/native/windows/bridge-rs/src/window.rs +718 -0
- package/native/windows/bridge-rs/tests/protocol_tests.rs +252 -0
- package/native/windows/bridge-rs/tests/refs_tests.rs +86 -0
- package/native/windows/bridge-rs/tests/state_tests.rs +33 -0
- package/package.json +104 -5
- package/prebuilt/macos/arm64/bridge +0 -0
- package/prebuilt/macos/x64/bridge +0 -0
- package/roam/README.md +52 -0
- package/roam/bridge/macos/arm64/bridge +0 -0
- package/roam/bridge/macos/x64/bridge +0 -0
- package/roam/bridge/manifest.json +20 -0
- package/roam/helper-path.d.mts +9 -0
- package/roam/helper-path.mjs +36 -0
- package/roam/identity.d.mts +16 -0
- package/roam/identity.mjs +64 -0
- package/roam/index.ts +51 -0
- package/roam/redirect.ts +51 -0
- package/roam/repair.ts +120 -0
- package/scripts/build-native.mjs +286 -0
- package/scripts/setup-helper.mjs +635 -0
- package/src/actions.ts +130 -0
- package/src/bridge.ts +2594 -0
- package/src/cdp.ts +658 -0
- package/src/config.ts +226 -0
- package/src/contract.ts +107 -0
- package/src/extension/index.ts +9 -0
- package/src/find-params.ts +21 -0
- package/src/note.ts +195 -0
- package/src/outline.ts +702 -0
- package/src/output.ts +134 -0
- package/src/permissions.ts +111 -0
- package/src/platform/architecture.ts +23 -0
- package/src/platform/coerce.ts +16 -0
- package/src/platform/index.ts +61 -0
- package/src/platform/linux/backend.ts +186 -0
- package/src/platform/linux/helper.ts +238 -0
- package/src/platform/macos/backend.ts +147 -0
- package/src/platform/macos/browser.ts +110 -0
- package/src/platform/macos/helper.ts +369 -0
- package/src/platform/macos/permissions.ts +146 -0
- package/src/platform/types.ts +229 -0
- package/src/platform/windows/backend.ts +142 -0
- package/src/platform/windows/helper.ts +140 -0
- package/src/root-selection.ts +25 -0
- package/src/runtime.ts +129 -0
- package/src/state.ts +146 -0
- package/src/view.ts +147 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Tool schema reference'
|
|
3
|
+
description: 'Exact Pi tool descriptions, guidance, parameters, enums, and constraints extracted from source.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
{/* This file is generated by scripts/docs-generators/generate-tool-reference.mjs. Do not edit it directly. */}
|
|
7
|
+
|
|
8
|
+
This reference is generated from the registered Pi tool definitions in [`extensions/computer-use.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/extensions/computer-use.ts). Tool descriptions, agent guidance, parameter descriptions, enum values, and array bounds therefore stay aligned with the interface shipped to agents.
|
|
9
|
+
|
|
10
|
+
## `find_roots`
|
|
11
|
+
|
|
12
|
+
Find a bounded, ranked set of controllable UI roots with refs, geometry, and focus state.
|
|
13
|
+
|
|
14
|
+
### agent guidance
|
|
15
|
+
|
|
16
|
+
Find a target root before observe_ui when needed.
|
|
17
|
+
|
|
18
|
+
### parameters
|
|
19
|
+
|
|
20
|
+
| parameter | type | required | description and constraints |
|
|
21
|
+
| --- | --- | --- | --- |
|
|
22
|
+
| `text` | `string` | no | Ranked app or title text |
|
|
23
|
+
| `app` | `string` | no | Exact normalized app name |
|
|
24
|
+
| `bundleId` | `string` | no | Exact bundle id |
|
|
25
|
+
| `pid` | `integer` | no | Exact positive process id minimum: `1`. |
|
|
26
|
+
| `kind` | `window` \| `menu` \| `sheet` \| `popover` \| `dialog` \| `browser_page` | no | Exact root kind |
|
|
27
|
+
|
|
28
|
+
## `observe_ui`
|
|
29
|
+
|
|
30
|
+
Capture the current/frontmost root or one exact @r root and return a compact list of actionable @e controls plus stateId.
|
|
31
|
+
|
|
32
|
+
### agent guidance
|
|
33
|
+
|
|
34
|
+
Primary UI observation tool. Follow with search_ui, expand_ui, inspect_ui, or act_ui.
|
|
35
|
+
|
|
36
|
+
- Use mode=semantic to skip OCR and images, visual to force them, and fused for automatic selection.
|
|
37
|
+
- Use @e outline refs from observe_ui/search_ui for act_ui; pictureOnly refs are coordinate-only and blocked by UI-tree-only policy.
|
|
38
|
+
- Use search_ui for unlisted controls; expand_ui on the root ref or detail=outline for structure.
|
|
39
|
+
|
|
40
|
+
### parameters
|
|
41
|
+
|
|
42
|
+
| parameter | type | required | description and constraints |
|
|
43
|
+
| --- | --- | --- | --- |
|
|
44
|
+
| `root` | `string` | no | Exact @r ref issued by find_roots |
|
|
45
|
+
| `mode` | `semantic` \| `visual` \| `fused` | no | Observation mode, default fused |
|
|
46
|
+
| `detail` | `compact` \| `outline` | no | compact (default) lists actionable refs; outline returns the folded tree |
|
|
47
|
+
|
|
48
|
+
## `search_ui`
|
|
49
|
+
|
|
50
|
+
Return a bounded, deterministically ranked search of the cached outline. At least one predicate is required.
|
|
51
|
+
|
|
52
|
+
### agent guidance
|
|
53
|
+
|
|
54
|
+
Find targets not shown in the compact observe_ui output; refine broad searches instead of paging matches.
|
|
55
|
+
|
|
56
|
+
### parameters
|
|
57
|
+
|
|
58
|
+
| parameter | type | required | description and constraints |
|
|
59
|
+
| --- | --- | --- | --- |
|
|
60
|
+
| `text` | `string` | no | Human-readable text or label |
|
|
61
|
+
| `role` | `string` | no | Exact normalized role, e.g. button |
|
|
62
|
+
| `capability` | `string` | no | Exact capability, e.g. press |
|
|
63
|
+
| `stateId` | `string` | yes | Required state id owning every @e ref used by this operation |
|
|
64
|
+
|
|
65
|
+
## `expand_ui`
|
|
66
|
+
|
|
67
|
+
Unfold bounded local outline context for one @e ref; use the root ref for full structure.
|
|
68
|
+
|
|
69
|
+
### agent guidance
|
|
70
|
+
|
|
71
|
+
Expand a specific ref instead of dumping unrelated UI.
|
|
72
|
+
|
|
73
|
+
### parameters
|
|
74
|
+
|
|
75
|
+
| parameter | type | required | description and constraints |
|
|
76
|
+
| --- | --- | --- | --- |
|
|
77
|
+
| `ref` | `string` | yes | — |
|
|
78
|
+
| `depth` | `number` | no | Subtree depth, default 3 minimum: `1`, maximum: `8`. |
|
|
79
|
+
| `stateId` | `string` | yes | Required state id owning every @e ref used by this operation |
|
|
80
|
+
|
|
81
|
+
## `inspect_ui`
|
|
82
|
+
|
|
83
|
+
Inspect one exact outline ref with fields, geometry, capabilities, and annotations.
|
|
84
|
+
|
|
85
|
+
### agent guidance
|
|
86
|
+
|
|
87
|
+
Use when a target's evidence or provenance matters.
|
|
88
|
+
|
|
89
|
+
### parameters
|
|
90
|
+
|
|
91
|
+
| parameter | type | required | description and constraints |
|
|
92
|
+
| --- | --- | --- | --- |
|
|
93
|
+
| `ref` | `string` | yes | — |
|
|
94
|
+
| `stateId` | `string` | yes | Required state id owning every @e ref used by this operation |
|
|
95
|
+
|
|
96
|
+
## `act_ui`
|
|
97
|
+
|
|
98
|
+
Perform one or more precisely targeted checked actions and return the successor state.
|
|
99
|
+
|
|
100
|
+
### agent guidance
|
|
101
|
+
|
|
102
|
+
Pass dependent click/type steps together and use expect for observable completion.
|
|
103
|
+
|
|
104
|
+
- After clicking an editable region, omit ref from typeText/keypress so input follows the established focus.
|
|
105
|
+
|
|
106
|
+
### parameters
|
|
107
|
+
|
|
108
|
+
| parameter | type | required | description and constraints |
|
|
109
|
+
| --- | --- | --- | --- |
|
|
110
|
+
| `stateId` | `string` | yes | Required state id owning every @e ref used by this operation |
|
|
111
|
+
| `expect` | object (ref: `string`, scopeRef: `string`, text: `string`, role: `string`, value: `string`, until: `present` \| `absent`, timeoutMs: `number`) | no | — |
|
|
112
|
+
| `expect.ref` | `string` | no | Specific @e ref to test |
|
|
113
|
+
| `expect.scopeRef` | `string` | no | Restrict matching to this @e subtree |
|
|
114
|
+
| `expect.text` | `string` | no | Text that must match |
|
|
115
|
+
| `expect.role` | `string` | no | Exact normalized role |
|
|
116
|
+
| `expect.value` | `string` | no | Exact normalized value; normally pair with ref |
|
|
117
|
+
| `expect.until` | `present` \| `absent` | no | Desired condition, default present |
|
|
118
|
+
| `expect.timeoutMs` | `number` | no | Maximum wait, default 10000ms minimum: `100`, maximum: `60000`. |
|
|
119
|
+
| `actions` | array of union | yes | — minItems: `1`, maxItems: `20`. |
|
|
120
|
+
|
|
121
|
+
#### action variants
|
|
122
|
+
|
|
123
|
+
| action | fields |
|
|
124
|
+
| --- | --- |
|
|
125
|
+
| `press` | `ref`: `string` (required) |
|
|
126
|
+
| `click` | `ref`: `string` (required); `button`: `left` \| `right` \| `middle` (optional); `clickCount`: `number` (optional) minimum: `1`, maximum: `3`. |
|
|
127
|
+
| `click` | `x`: `number` (required); `y`: `number` (required); `button`: `left` \| `right` \| `middle` (optional); `clickCount`: `number` (optional) minimum: `1`, maximum: `3`. |
|
|
128
|
+
| `setText` | `ref`: `string` (required); `text`: `string` (required) |
|
|
129
|
+
| `typeText` | `ref`: `string` (optional); `text`: `string` (required) |
|
|
130
|
+
| `keypress` | `ref`: `string` (optional); `keys`: array of `string` (required) minItems: `1`. |
|
|
131
|
+
| `scroll` | `ref`: `string` (optional); `scrollX`: `number` (optional); `scrollY`: `number` (optional) |
|
|
132
|
+
| `drag` | `path`: array of object (x: `number`, y: `number`) (required) minItems: `2`. |
|
|
133
|
+
| `moveMouse` | `x`: `number` (required); `y`: `number` (required) |
|
|
134
|
+
|
|
135
|
+
## `read_text`
|
|
136
|
+
|
|
137
|
+
Read a fixed-size page from an @e UI ref or immutable @o truncated-output ref.
|
|
138
|
+
|
|
139
|
+
### agent guidance
|
|
140
|
+
|
|
141
|
+
Use @e with its stateId; @o continuation refs don't need stateId.
|
|
142
|
+
|
|
143
|
+
### parameters
|
|
144
|
+
|
|
145
|
+
| parameter | type | required | description and constraints |
|
|
146
|
+
| --- | --- | --- | --- |
|
|
147
|
+
| `ref` | `string` | yes | — |
|
|
148
|
+
| `offset` | `number` | no | — minimum: `0`. |
|
|
149
|
+
| `stateId` | `string` | no | Required state id owning every @e ref used by this operation |
|
|
150
|
+
|
|
151
|
+
## `wait_for`
|
|
152
|
+
|
|
153
|
+
Wait for one scoped UI condition and return the successor state.
|
|
154
|
+
|
|
155
|
+
### agent guidance
|
|
156
|
+
|
|
157
|
+
Use after asynchronous UI changes instead of polling observe_ui.
|
|
158
|
+
|
|
159
|
+
### parameters
|
|
160
|
+
|
|
161
|
+
| parameter | type | required | description and constraints |
|
|
162
|
+
| --- | --- | --- | --- |
|
|
163
|
+
| `ref` | `string` | no | Specific @e ref to test |
|
|
164
|
+
| `scopeRef` | `string` | no | Restrict matching to this @e subtree |
|
|
165
|
+
| `text` | `string` | no | Text that must match |
|
|
166
|
+
| `role` | `string` | no | Exact normalized role |
|
|
167
|
+
| `value` | `string` | no | Exact normalized value; normally pair with ref |
|
|
168
|
+
| `until` | `present` \| `absent` | no | Desired condition, default present |
|
|
169
|
+
| `timeoutMs` | `number` | no | Maximum wait, default 10000ms minimum: `100`, maximum: `60000`. |
|
|
170
|
+
| `stateId` | `string` | yes | Required state id owning every @e ref used by this operation |
|
|
171
|
+
|
|
172
|
+
## `launch_browser`
|
|
173
|
+
|
|
174
|
+
Launch the configured Pi-managed CDP browser and return an observed browser-page state.
|
|
175
|
+
|
|
176
|
+
### agent guidance
|
|
177
|
+
|
|
178
|
+
Use for browser work that needs a managed CDP context.
|
|
179
|
+
|
|
180
|
+
- Prefer curl through bash when the page is directly fetchable.
|
|
181
|
+
|
|
182
|
+
### parameters
|
|
183
|
+
|
|
184
|
+
| parameter | type | required | description and constraints |
|
|
185
|
+
| --- | --- | --- | --- |
|
|
186
|
+
| `url` | `string` | no | — |
|
|
187
|
+
|
|
188
|
+
## `navigate_browser`
|
|
189
|
+
|
|
190
|
+
Navigate an observed CDP browser-page state to an HTTP(S) URL.
|
|
191
|
+
|
|
192
|
+
### agent guidance
|
|
193
|
+
|
|
194
|
+
Native browser windows use act_ui; this tool is CDP-only.
|
|
195
|
+
|
|
196
|
+
### parameters
|
|
197
|
+
|
|
198
|
+
| parameter | type | required | description and constraints |
|
|
199
|
+
| --- | --- | --- | --- |
|
|
200
|
+
| `url` | `string` | yes | — |
|
|
201
|
+
| `stateId` | `string` | yes | Required state id owning every @e ref used by this operation |
|
|
202
|
+
|
|
203
|
+
## `evaluate_browser`
|
|
204
|
+
|
|
205
|
+
Evaluate targeted JavaScript in a CDP browser-page state; returned output is strictly bounded.
|
|
206
|
+
|
|
207
|
+
### agent guidance
|
|
208
|
+
|
|
209
|
+
Prefer observe/search/read; return selected fields, aggregates, or bounded slices.
|
|
210
|
+
|
|
211
|
+
### parameters
|
|
212
|
+
|
|
213
|
+
| parameter | type | required | description and constraints |
|
|
214
|
+
| --- | --- | --- | --- |
|
|
215
|
+
| `stateId` | `string` | yes | Required state id owning every @e ref used by this operation |
|
|
216
|
+
| `expression` | `string` | yes | — |
|
|
217
|
+
|
|
218
|
+
<details className="reference-provenance">
|
|
219
|
+
<summary>source provenance</summary>
|
|
220
|
+
<p>Generated from the tools registered by <a href="https://github.com/roam-agent/roam-computer-use/blob/main/extensions/computer-use.ts"><code>extensions/computer-use.ts</code></a> at runtime. Schema drift fails <code>npm run docs:check</code>.</p>
|
|
221
|
+
</details>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Codebase map'
|
|
3
|
+
description: 'Source-tree and repository command index.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
{/* This file is generated by scripts/docs-generators/generate-source-references.mjs. Do not edit it directly. */}
|
|
7
|
+
|
|
8
|
+
This inventory is generated directly from the repository tree and `package.json`.
|
|
9
|
+
|
|
10
|
+
## Runtime and native modules
|
|
11
|
+
|
|
12
|
+
### `extensions/`
|
|
13
|
+
|
|
14
|
+
- [`extensions/computer-use.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/extensions/computer-use.ts)
|
|
15
|
+
|
|
16
|
+
### `roam/`
|
|
17
|
+
|
|
18
|
+
- [`roam/README.md`](https://github.com/roam-agent/roam-computer-use/blob/main/roam/README.md)
|
|
19
|
+
- [`roam/helper-path.d.mts`](https://github.com/roam-agent/roam-computer-use/blob/main/roam/helper-path.d.mts)
|
|
20
|
+
- [`roam/helper-path.mjs`](https://github.com/roam-agent/roam-computer-use/blob/main/roam/helper-path.mjs)
|
|
21
|
+
- [`roam/identity.d.mts`](https://github.com/roam-agent/roam-computer-use/blob/main/roam/identity.d.mts)
|
|
22
|
+
- [`roam/identity.mjs`](https://github.com/roam-agent/roam-computer-use/blob/main/roam/identity.mjs)
|
|
23
|
+
- [`roam/index.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/roam/index.ts)
|
|
24
|
+
- [`roam/redirect.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/roam/redirect.ts)
|
|
25
|
+
- [`roam/repair.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/roam/repair.ts)
|
|
26
|
+
|
|
27
|
+
### `src/`
|
|
28
|
+
|
|
29
|
+
- [`src/actions.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/actions.ts)
|
|
30
|
+
- [`src/bridge.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/bridge.ts)
|
|
31
|
+
- [`src/cdp.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/cdp.ts)
|
|
32
|
+
- [`src/config.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/config.ts)
|
|
33
|
+
- [`src/contract.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/contract.ts)
|
|
34
|
+
- [`src/find-params.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/find-params.ts)
|
|
35
|
+
- [`src/note.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/note.ts)
|
|
36
|
+
- [`src/outline.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/outline.ts)
|
|
37
|
+
- [`src/output.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/output.ts)
|
|
38
|
+
- [`src/permissions.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/permissions.ts)
|
|
39
|
+
- [`src/root-selection.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/root-selection.ts)
|
|
40
|
+
- [`src/runtime.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/runtime.ts)
|
|
41
|
+
- [`src/state.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/state.ts)
|
|
42
|
+
- [`src/view.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/view.ts)
|
|
43
|
+
|
|
44
|
+
### `src/platform/macos/`
|
|
45
|
+
|
|
46
|
+
- [`src/platform/macos/backend.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/platform/macos/backend.ts)
|
|
47
|
+
- [`src/platform/macos/browser.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/platform/macos/browser.ts)
|
|
48
|
+
- [`src/platform/macos/helper.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/platform/macos/helper.ts)
|
|
49
|
+
- [`src/platform/macos/permissions.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/platform/macos/permissions.ts)
|
|
50
|
+
|
|
51
|
+
### `src/platform/windows/`
|
|
52
|
+
|
|
53
|
+
- [`src/platform/windows/backend.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/platform/windows/backend.ts)
|
|
54
|
+
- [`src/platform/windows/helper.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/platform/windows/helper.ts)
|
|
55
|
+
|
|
56
|
+
### `src/platform/linux/`
|
|
57
|
+
|
|
58
|
+
- [`src/platform/linux/backend.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/platform/linux/backend.ts)
|
|
59
|
+
- [`src/platform/linux/helper.ts`](https://github.com/roam-agent/roam-computer-use/blob/main/src/platform/linux/helper.ts)
|
|
60
|
+
|
|
61
|
+
### `native/macos/`
|
|
62
|
+
|
|
63
|
+
- [`native/macos/activity_glow.swift`](https://github.com/roam-agent/roam-computer-use/blob/main/native/macos/activity_glow.swift)
|
|
64
|
+
- [`native/macos/agent_cursor.swift`](https://github.com/roam-agent/roam-computer-use/blob/main/native/macos/agent_cursor.swift)
|
|
65
|
+
- [`native/macos/agent_cursor_motion.swift`](https://github.com/roam-agent/roam-computer-use/blob/main/native/macos/agent_cursor_motion.swift)
|
|
66
|
+
- [`native/macos/agent_cursor_tests.swift`](https://github.com/roam-agent/roam-computer-use/blob/main/native/macos/agent_cursor_tests.swift)
|
|
67
|
+
- [`native/macos/bridge.swift`](https://github.com/roam-agent/roam-computer-use/blob/main/native/macos/bridge.swift)
|
|
68
|
+
|
|
69
|
+
### `native/windows/bridge-rs/src/`
|
|
70
|
+
|
|
71
|
+
- [`native/windows/bridge-rs/src/capture.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/capture.rs)
|
|
72
|
+
- [`native/windows/bridge-rs/src/error.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/error.rs)
|
|
73
|
+
- [`native/windows/bridge-rs/src/input.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/input.rs)
|
|
74
|
+
- [`native/windows/bridge-rs/src/lib.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/lib.rs)
|
|
75
|
+
- [`native/windows/bridge-rs/src/main.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/main.rs)
|
|
76
|
+
- [`native/windows/bridge-rs/src/protocol.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/protocol.rs)
|
|
77
|
+
- [`native/windows/bridge-rs/src/refs.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/refs.rs)
|
|
78
|
+
- [`native/windows/bridge-rs/src/state.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/state.rs)
|
|
79
|
+
- [`native/windows/bridge-rs/src/uia.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/uia.rs)
|
|
80
|
+
- [`native/windows/bridge-rs/src/window.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/windows/bridge-rs/src/window.rs)
|
|
81
|
+
|
|
82
|
+
### `native/linux/bridge-rs/src/`
|
|
83
|
+
|
|
84
|
+
- [`native/linux/bridge-rs/src/atspi.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/linux/bridge-rs/src/atspi.rs)
|
|
85
|
+
- [`native/linux/bridge-rs/src/error.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/linux/bridge-rs/src/error.rs)
|
|
86
|
+
- [`native/linux/bridge-rs/src/lib.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/linux/bridge-rs/src/lib.rs)
|
|
87
|
+
- [`native/linux/bridge-rs/src/main.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/linux/bridge-rs/src/main.rs)
|
|
88
|
+
- [`native/linux/bridge-rs/src/protocol.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/linux/bridge-rs/src/protocol.rs)
|
|
89
|
+
- [`native/linux/bridge-rs/src/state.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/linux/bridge-rs/src/state.rs)
|
|
90
|
+
- [`native/linux/bridge-rs/src/wayland.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/linux/bridge-rs/src/wayland.rs)
|
|
91
|
+
- [`native/linux/bridge-rs/src/x11.rs`](https://github.com/roam-agent/roam-computer-use/blob/main/native/linux/bridge-rs/src/x11.rs)
|
|
92
|
+
|
|
93
|
+
### `scripts/docs-generators/`
|
|
94
|
+
|
|
95
|
+
- [`scripts/docs-generators/README.md`](https://github.com/roam-agent/roam-computer-use/blob/main/scripts/docs-generators/README.md)
|
|
96
|
+
- [`scripts/docs-generators/config.json`](https://github.com/roam-agent/roam-computer-use/blob/main/scripts/docs-generators/config.json)
|
|
97
|
+
- [`scripts/docs-generators/config.schema.json`](https://github.com/roam-agent/roam-computer-use/blob/main/scripts/docs-generators/config.schema.json)
|
|
98
|
+
- [`scripts/docs-generators/generate-source-references.mjs`](https://github.com/roam-agent/roam-computer-use/blob/main/scripts/docs-generators/generate-source-references.mjs)
|
|
99
|
+
- [`scripts/docs-generators/generate-tool-reference.mjs`](https://github.com/roam-agent/roam-computer-use/blob/main/scripts/docs-generators/generate-tool-reference.mjs)
|
|
100
|
+
- [`scripts/docs-generators/reference-evidence.json`](https://github.com/roam-agent/roam-computer-use/blob/main/scripts/docs-generators/reference-evidence.json)
|
|
101
|
+
- [`scripts/docs-generators/reference-evidence.schema.json`](https://github.com/roam-agent/roam-computer-use/blob/main/scripts/docs-generators/reference-evidence.schema.json)
|
|
102
|
+
|
|
103
|
+
## Repository commands
|
|
104
|
+
|
|
105
|
+
- `npm run bridge:refresh`
|
|
106
|
+
- `npm run build:linux`
|
|
107
|
+
- `npm run build:native`
|
|
108
|
+
- `npm run build:windows`
|
|
109
|
+
- `npm run docs:build`
|
|
110
|
+
- `npm run docs:check`
|
|
111
|
+
- `npm run docs:dev`
|
|
112
|
+
- `npm run docs:generate`
|
|
113
|
+
- `npm run docs:site:check`
|
|
114
|
+
- `npm run postinstall`
|
|
115
|
+
- `npm run prepare`
|
|
116
|
+
- `npm run test`
|
|
117
|
+
- `npm run test:act-outcomes`
|
|
118
|
+
- `npm run test:bridge-set`
|
|
119
|
+
- `npm run test:commits`
|
|
120
|
+
- `npm run test:find-params`
|
|
121
|
+
- `npm run test:fork-scope`
|
|
122
|
+
- `npm run test:identity`
|
|
123
|
+
- `npm run test:invariants`
|
|
124
|
+
- `npm run test:lifecycle`
|
|
125
|
+
- `npm run test:linux`
|
|
126
|
+
- `npm run test:linux-live`
|
|
127
|
+
- `npm run test:linux-scripts`
|
|
128
|
+
- `npm run test:macos-native`
|
|
129
|
+
- `npm run test:macos-path`
|
|
130
|
+
- `npm run test:macos-target`
|
|
131
|
+
- `npm run test:output`
|
|
132
|
+
- `npm run test:package-assets`
|
|
133
|
+
- `npm run test:platform`
|
|
134
|
+
- `npm run test:registration`
|
|
135
|
+
- `npm run test:runtime`
|
|
136
|
+
- `npm run test:schema`
|
|
137
|
+
- `npm run test:signing`
|
|
138
|
+
- `npm run test:windows-scripts`
|
|
139
|
+
- `npm run typecheck`
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Configuration'
|
|
3
|
+
description: 'Configuration files, options, environment variables, and browser support reference.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
{/* This file is generated by scripts/docs-generators/generate-source-references.mjs. Do not edit it directly. */}
|
|
7
|
+
|
|
8
|
+
Configuration controls browser access, strict accessibility execution, the macOS agent cursor, and the macOS activity glow.
|
|
9
|
+
|
|
10
|
+
## Files
|
|
11
|
+
|
|
12
|
+
Global config:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
~/.pi/agent/extensions/pi-computer-use.json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Project config:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
.pi/computer-use.json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Project config overrides global config. Environment variables override both.
|
|
25
|
+
|
|
26
|
+
Example:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"browser_use": true,
|
|
31
|
+
"managed_browser": "chrome",
|
|
32
|
+
"headless": false,
|
|
33
|
+
"cursor_overlay": true,
|
|
34
|
+
"activity_glow": true
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Run `/computer-use` in Pi to show the active config and its source.
|
|
39
|
+
|
|
40
|
+
## Options
|
|
41
|
+
|
|
42
|
+
### `browser_use`
|
|
43
|
+
|
|
44
|
+
Default: `true`
|
|
45
|
+
|
|
46
|
+
When `false`, the extension refuses known browser windows. This is useful for projects that should not control browsers.
|
|
47
|
+
|
|
48
|
+
Known browser families include Safari, Chrome and Chromium-family browsers, Firefox, Arc, Brave, Edge, Vivaldi, and Helium.
|
|
49
|
+
|
|
50
|
+
### `managed_browser`
|
|
51
|
+
|
|
52
|
+
Default: `"chrome"`
|
|
53
|
+
|
|
54
|
+
Selects `"helium"` or `"chrome"` for `launch_browser`. The debugging port is always allocated internally and isn't part of the model-facing contract.
|
|
55
|
+
|
|
56
|
+
### `headless`
|
|
57
|
+
|
|
58
|
+
Default: `false`
|
|
59
|
+
|
|
60
|
+
When `true`, actions must remain in the background. Raw pointer events, raw keyboard events, foreground focus fallback, cursor takeover, the agent cursor overlay, and the activity glow are blocked. On macOS, actions that would need synthesized pointer or keyboard input, including every `typeText` and `keypress`, fail with `foreground_required` ([macOS reference](./platforms/macos/actions.mdx#headless-policy)). When `false` (the default), Pi prefers verified semantic activation when it is credible, preserves the focus established by editable clicks for dependent keyboard input, and may retry keyboard input in the foreground when a background attempt conclusively produced no value change. Ambiguous pointer actions are never replayed blindly.
|
|
61
|
+
|
|
62
|
+
### `cursor_overlay`
|
|
63
|
+
|
|
64
|
+
Default: `true`
|
|
65
|
+
|
|
66
|
+
When `true`, macOS pointer actions enqueue a click-through agent cursor animation to the native grounded point during non-headless background delivery. Foreground actions that control the physical cursor don't display the overlay. The overlay doesn't move the system pointer, accept input, or delay the action. Set it to `false` for invisible automation. `headless: true` always suppresses it regardless of this setting ([macOS reference](./platforms/macos/actions.mdx#agent-cursor-overlay)).
|
|
67
|
+
|
|
68
|
+
### `activity_glow`
|
|
69
|
+
|
|
70
|
+
Default: `false`
|
|
71
|
+
|
|
72
|
+
When `true`, macOS displays a click-through pulsing border on every screen while a Pi agent is using one of the extension's tools. The border stays visible until the agent run ends. Each Pi session owns its indicator state, so one session cannot hide another session's active indicator. The helper removes a session's state if its connection closes unexpectedly.
|
|
73
|
+
|
|
74
|
+
The activity glow appears in user screen recordings, but never in the agent's own observations: helper captures always target a single window, so screen-edge overlays are not included. The glow is excluded from accessibility discovery. Other platforms ignore this setting, and `headless: true` always suppresses it ([macOS reference](./platforms/macos/implementation.mdx#activity-glow)).
|
|
75
|
+
|
|
76
|
+
## Environment variables
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
PI_COMPUTER_USE_BROWSER_USE=0
|
|
80
|
+
PI_COMPUTER_USE_BROWSER_USE=1
|
|
81
|
+
PI_COMPUTER_USE_MANAGED_BROWSER=helium
|
|
82
|
+
PI_COMPUTER_USE_MANAGED_BROWSER=chrome
|
|
83
|
+
PI_COMPUTER_USE_CHROME_EXECUTABLE=/absolute/path/to/chrome
|
|
84
|
+
PI_COMPUTER_USE_HELIUM_EXECUTABLE=/absolute/path/to/helium
|
|
85
|
+
PI_COMPUTER_USE_HEADLESS=0
|
|
86
|
+
PI_COMPUTER_USE_HEADLESS=1
|
|
87
|
+
PI_COMPUTER_USE_CURSOR_OVERLAY=0
|
|
88
|
+
PI_COMPUTER_USE_CURSOR_OVERLAY=1
|
|
89
|
+
PI_COMPUTER_USE_ACTIVITY_GLOW=0
|
|
90
|
+
PI_COMPUTER_USE_ACTIVITY_GLOW=1
|
|
91
|
+
PI_COMPUTER_USE_DELIVERY_POLICY=default
|
|
92
|
+
PI_COMPUTER_USE_DELIVERY_POLICY=foreground
|
|
93
|
+
PI_COMPUTER_USE_CDP_PORT=9222
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`PI_COMPUTER_USE_HEADLESS=1` prohibits foreground fallback. `PI_COMPUTER_USE_DELIVERY_POLICY` is a debugging input; normal policy belongs in configuration rather than individual model calls.
|
|
97
|
+
|
|
98
|
+
`launch_browser` searches common platform install locations and `PATH`. Use `PI_COMPUTER_USE_CHROME_EXECUTABLE` or `PI_COMPUTER_USE_HELIUM_EXECUTABLE` for an AppImage, portable install, or any non-standard location. An explicit override is authoritative and must name an executable file.
|
|
99
|
+
|
|
100
|
+
## CDP browser support
|
|
101
|
+
|
|
102
|
+
`PI_COMPUTER_USE_CDP_PORT` enables Chrome DevTools Protocol support for Chromium-family browsers. Launch the browser with `--remote-debugging-port=<port>` and set this variable to the same port.
|
|
103
|
+
|
|
104
|
+
Use a dedicated, non-default profile with `--user-data-dir=<directory>`. Chrome 136 and later ignore remote-debugging switches for the default data directory as a security measure. `launch_browser` already creates a temporary, separate CDP profile and binds discovery to a randomly allocated loopback port.
|
|
105
|
+
|
|
106
|
+
When CDP is active, discovered pages participate in the same root and state system as desktop UI. `launch_browser` configures CDP automatically and returns an observed page state. `navigate_browser` and `evaluate_browser` accept only CDP browser-page states; native browser windows continue to use the normal desktop observe/act tools.
|
|
107
|
+
|
|
108
|
+
With the variable unset, CDP is inactive.
|
|
109
|
+
|
|
110
|
+
<details className="reference-provenance">
|
|
111
|
+
<summary>source provenance</summary>
|
|
112
|
+
<p>Generated from <a href="https://github.com/roam-agent/roam-computer-use/blob/main/src/config.ts"><code>src/config.ts</code></a>. The evidence check requires <code>DEFAULT_CONFIG</code>, <code>browser_use</code>, <code>headless</code>, <code>cursor_overlay</code>, <code>activity_glow</code>; external API citations remain independently maintained.</p>
|
|
113
|
+
</details>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Overview'
|
|
3
|
+
description: 'Lookup map for agent APIs, configuration, platform implementations, and source ownership.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
{/* This file is generated by scripts/docs-generators/generate-source-references.mjs. Do not edit it directly. */}
|
|
7
|
+
|
|
8
|
+
Reference is generated from source-owned documentation blocks and checked evidence symbols. Choose the boundary you need to inspect.
|
|
9
|
+
|
|
10
|
+
## Agent interface
|
|
11
|
+
|
|
12
|
+
- [Agent overview](./agent/index.mdx)
|
|
13
|
+
- [State and action contract](./agent/contract.mdx)
|
|
14
|
+
- [Tool schemas](./agent/tools.mdx)
|
|
15
|
+
|
|
16
|
+
## Configuration
|
|
17
|
+
|
|
18
|
+
- [Configuration files, options, and environment](./configuration.mdx)
|
|
19
|
+
|
|
20
|
+
## Platform implementations
|
|
21
|
+
|
|
22
|
+
- [macOS subsystem index](./platforms/macos/index.mdx)
|
|
23
|
+
- [Windows bridge](./platforms/windows.mdx)
|
|
24
|
+
- [Linux support](../how-to-guides/linux.mdx)
|
|
25
|
+
|
|
26
|
+
## Source ownership
|
|
27
|
+
|
|
28
|
+
- [Codebase map](./codebase.mdx)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Platform reference'
|
|
3
|
+
description: 'Index of native macOS, Windows, and Linux implementation boundaries.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
{/* This file is generated by scripts/docs-generators/generate-source-references.mjs. Do not edit it directly. */}
|
|
7
|
+
|
|
8
|
+
## macOS
|
|
9
|
+
|
|
10
|
+
The macOS helper is indexed by native subsystem: [Accessibility and AX](./macos/accessibility.mdx), [Capture and OCR](./macos/capture.mdx), [Actions and input delivery](./macos/actions.mdx), [Root targeting](./macos/root-targeting.mdx), and the [complete implementation inventory](./macos/implementation.mdx).
|
|
11
|
+
|
|
12
|
+
## Windows
|
|
13
|
+
|
|
14
|
+
The [Windows bridge reference](./windows.mdx) covers UI Automation, capture, input, refs, state, protocol behavior, and constraints.
|
|
15
|
+
|
|
16
|
+
## Linux
|
|
17
|
+
|
|
18
|
+
The [Linux support guide](../../how-to-guides/linux.mdx) covers AT-SPI2 setup, the X11 and Wayland capability matrix, background and headless guarantees, and the portal boundary.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Accessibility and AX'
|
|
3
|
+
description: 'macOS Accessibility trust, root discovery, AX extraction, semantic operations, and limits reference.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
{/* This file is generated by scripts/docs-generators/generate-source-references.mjs. Do not edit it directly. */}
|
|
7
|
+
|
|
8
|
+
This page is the direct reference for macOS Accessibility, usually abbreviated AX. The implementation lives primarily in [`native/macos/bridge.swift`](https://github.com/injaneity/pi-computer-use/blob/main/native/macos/bridge.swift); the TypeScript platform adapter lives in [`src/platform/macos/`](https://github.com/injaneity/pi-computer-use/tree/main/src/platform/macos).
|
|
9
|
+
|
|
10
|
+
## Trust and permission
|
|
11
|
+
|
|
12
|
+
The helper checks trust with [`AXIsProcessTrusted()`](https://developer.apple.com/documentation/applicationservices/1460720-axisprocesstrusted) and requests it with [`AXIsProcessTrustedWithOptions(_:)`](https://developer.apple.com/documentation/applicationservices/1459186-axisprocesstrustedwithoptions). Accessibility permission enables semantic UI observation and AX actions; it does not grant window image capture.
|
|
13
|
+
|
|
14
|
+
The grant must apply to the resolved helper app during normal operation. The helper is installed per user at `~/Applications/pi-computer-use.app` by default; existing writable system-wide installs remain at `/Applications/pi-computer-use.app`, and `PI_COMPUTER_USE_HELPER_APP_PATH` selects an explicit location for development or testing. Setup requests trust before opening System Settings and restarts the helper after recheck. Pane names and listing behavior vary by macOS release, so they are not part of the runtime contract.
|
|
15
|
+
|
|
16
|
+
## AX root discovery
|
|
17
|
+
|
|
18
|
+
Root discovery combines several APIs rather than treating AX as a window registry:
|
|
19
|
+
|
|
20
|
+
1. [`NSWorkspace.runningApplications`](https://developer.apple.com/documentation/appkit/nsworkspace/runningapplications) supplies process identity and frontmost state.
|
|
21
|
+
2. [`AXUIElementCreateApplication`](https://developer.apple.com/documentation/applicationservices/axuielement) creates an application-level AX element for each candidate process.
|
|
22
|
+
3. AX window attributes provide controllable windows, roles, frames, state, and child trees. When an app reports an empty `AXWindows` list, the helper falls back to its `AXMainWindow` and `AXFocusedWindow`.
|
|
23
|
+
4. Core Graphics window data is paired separately to provide capture IDs and visual ordering.
|
|
24
|
+
|
|
25
|
+
Windows, sheets, dialogs, popovers, and open menus can become roots. Menus use the `AXMenu` role when an AX element is available. A visually discovered menu without a matching AX element is returned as `pictureOnly`, so it cannot receive ref-targeted AX actions. An AX root without a matching Core Graphics window is unpaired; the [root targeting reference](./root-targeting.mdx) defines how such roots are addressed and observed.
|
|
26
|
+
|
|
27
|
+
## Tree extraction
|
|
28
|
+
|
|
29
|
+
An observation walks the selected AX subtree breadth-first. It reads available roles, subroles, identifiers, titles, descriptions, values, frames, focus state, supported actions, and settable attributes. The native walk stops at 2,000 nodes or 20 seconds; incomplete ancestors are marked `truncated` rather than presented as complete.
|
|
30
|
+
|
|
31
|
+
The resulting outline preserves native semantics where they are available. It does not infer that every visible control has an AX node. Web views, custom drawing, games, and apps with incomplete accessibility implementations can expose sparse trees.
|
|
32
|
+
|
|
33
|
+
## Semantic operations
|
|
34
|
+
|
|
35
|
+
The helper prefers AX operations before synthesized input:
|
|
36
|
+
|
|
37
|
+
- press and eligible click actions call [`AXUIElementPerformAction`](https://developer.apple.com/documentation/applicationservices/1462091-axuielementperformaction) with `AXPress`;
|
|
38
|
+
- `setText` writes `AXValue` through [`AXUIElementSetAttributeValue`](https://developer.apple.com/documentation/applicationservices/1460434-axuielementsetattributevalue) and reads the value back;
|
|
39
|
+
- semantic scrolling walks the target and its ancestors for supported AX scroll actions;
|
|
40
|
+
- foreground coordinate delivery uses `AXUIElementCopyElementAtPosition` as an occlusion preflight.
|
|
41
|
+
|
|
42
|
+
An advertised AX action is a delivery capability, not proof of an application-level result. Action outcomes remain `worked`, `didnt`, or `unknown` based on read-back or observable state evidence.
|
|
43
|
+
|
|
44
|
+
## Strict headless behavior
|
|
45
|
+
|
|
46
|
+
`headless: true` maps native actions to the `ax_only` policy. AX press, `AXValue` writes outside web content, and semantic scrolling still run. Actions that would fall back to synthesized pointer input, every `typeText` and `keypress`, and web text replacement fail with `foreground_required` before the helper posts events or activates the target. The agent cursor overlay and activity glow are not shown.
|
|
47
|
+
|
|
48
|
+
## Common interpretation rules
|
|
49
|
+
|
|
50
|
+
- An empty outline usually indicates missing Accessibility trust, an inaccessible target, or an app that exposes no useful AX hierarchy.
|
|
51
|
+
- `truncated` means the bounded walk did not retrieve the complete descendant tree.
|
|
52
|
+
- `pictureOnly` means the element came from visual evidence and cannot be targeted by AX ref.
|
|
53
|
+
- A supported action describes what the element reports, not whether the app will honor it.
|
|
54
|
+
- AX frames and Core Graphics windows are paired heuristically; low-confidence pairing must not be treated as exact identity.
|
|
55
|
+
|
|
56
|
+
For the image side of an observation, continue to [Capture and OCR](./capture.mdx). For fallback delivery and checked outcomes, continue to [Actions and input delivery](./actions.mdx). The [complete implementation reference](./implementation.mdx) contains line-level source citations and current limits.
|
|
57
|
+
|
|
58
|
+
<details className="reference-provenance">
|
|
59
|
+
<summary>source provenance</summary>
|
|
60
|
+
<p>Generated from <a href="https://github.com/roam-agent/roam-computer-use/blob/main/native/macos/bridge.swift"><code>native/macos/bridge.swift</code></a>. The evidence check requires <code>AXIsProcessTrustedWithOptions</code>, <code>AXUIElementCreateApplication</code>, <code>AXUIElementPerformAction</code>; external API citations remain independently maintained.</p>
|
|
61
|
+
</details>
|