Commit 826fbef
committed
feat(cua-driver): embedded mode — inherit host TCC grants, never prompt
Adds explicit embedded mode (CUA_DRIVER_EMBEDDED=1 / --embedded
[--host-bundle-id <id>]) so a host app (e.g. OpenClaw) can embed the
driver as a direct child and have macOS attribute Accessibility +
Screen Recording to the host it already trusted — one grant, one
Settings entry, no com.trycua.driver prompts.
In embedded mode the driver:
- skips the responsibility-disclaim re-exec (stays in the host's chain)
- skips the daemon auto-relaunch via the CuaDriver.app bundle
- opts out of the startup permissions gate and never calls
request_accessibility / request_screen_recording (check_permissions
ignores prompt=true)
- reports check_permissions source.attribution = "host" with the
advisory host bundle id, keeping the live SCShareableContent probe
Fail-closed property preserved: the caller-controlled env var only ever
downgrades attribution (host, never driver-daemon); daemon attribution
stays keyed on the non-spoofable bundle-path signal. Standalone
behavior is unchanged when the flag is off.
Ships Skills/cua-driver/EMBEDDING.md (integration guide +
troubleshooting) and examples/embedded-host-macos/ (signed AppKit
reference host + one-grant demo script).1 parent 73fe822 commit 826fbef
12 files changed
Lines changed: 839 additions & 38 deletions
File tree
- docs/content/docs/reference/cua-driver
- libs/cua-driver/rust
- Skills/cua-driver
- crates
- cua-driver-core/src
- cua-driver/src
- platform-macos/src
- permissions
- tools
- examples/embedded-host-macos
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
15 | 35 | | |
16 | 36 | | |
17 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
204 | 209 | | |
205 | 210 | | |
206 | 211 | | |
| |||
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
257 | 272 | | |
258 | 273 | | |
259 | 274 | | |
| |||
540 | 555 | | |
541 | 556 | | |
542 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
543 | 564 | | |
544 | 565 | | |
545 | 566 | | |
| |||
590 | 611 | | |
591 | 612 | | |
592 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
593 | 618 | | |
594 | 619 | | |
595 | 620 | | |
| |||
846 | 871 | | |
847 | 872 | | |
848 | 873 | | |
849 | | - | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
850 | 877 | | |
851 | 878 | | |
852 | 879 | | |
853 | 880 | | |
854 | 881 | | |
855 | 882 | | |
856 | | - | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
857 | 886 | | |
858 | 887 | | |
859 | 888 | | |
| |||
2019 | 2048 | | |
2020 | 2049 | | |
2021 | 2050 | | |
2022 | | - | |
| 2051 | + | |
| 2052 | + | |
2023 | 2053 | | |
2024 | 2054 | | |
2025 | 2055 | | |
2026 | | - | |
| 2056 | + | |
| 2057 | + | |
2027 | 2058 | | |
2028 | 2059 | | |
2029 | 2060 | | |
| |||
2067 | 2098 | | |
2068 | 2099 | | |
2069 | 2100 | | |
2070 | | - | |
| 2101 | + | |
| 2102 | + | |
2071 | 2103 | | |
2072 | 2104 | | |
2073 | | - | |
| 2105 | + | |
| 2106 | + | |
2074 | 2107 | | |
2075 | 2108 | | |
2076 | 2109 | | |
| |||
Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
20 | 29 | | |
21 | 30 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
| |||
164 | 174 | | |
165 | 175 | | |
166 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
167 | 186 | | |
168 | 187 | | |
169 | 188 | | |
| |||
Lines changed: 22 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
170 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| |||
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
184 | | - | |
| 186 | + | |
185 | 187 | | |
186 | 188 | | |
187 | 189 | | |
| |||
595 | 597 | | |
596 | 598 | | |
597 | 599 | | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | 600 | | |
| 601 | + | |
| 602 | + | |
606 | 603 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
| 604 | + | |
614 | 605 | | |
615 | 606 | | |
616 | 607 | | |
| |||
652 | 643 | | |
653 | 644 | | |
654 | 645 | | |
| 646 | + | |
655 | 647 | | |
656 | 648 | | |
657 | 649 | | |
658 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
659 | 663 | | |
660 | 664 | | |
661 | 665 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments