Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion docs/getting-started/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Native recording and replay use operating system controls:

| Surface | Typical local requirements |
| --- | --- |
| macOS | Screen Recording and Input Monitoring for capture; Accessibility for actuation |
| macOS before 27.3 | Screen Recording and Input Monitoring for capture; Accessibility for app control |
| macOS 27.3 or later | Screen Recording and Input Monitoring for capture; System & App Protection Override for app control, with the selected target included |
| Windows | An interactive desktop; UI Automation and input rights at the target integrity level |
| Linux | An interactive X11 or approved portal session plus AT-SPI for structural evidence |
| RDP / Citrix | Access to the exact visible local client window and its input path |
Expand All @@ -27,3 +28,48 @@ openadapt doctor --backend macos

Run `openadapt flow record --help` and `openadapt flow replay --help` for the
exact installed target options.

## macOS 27.3 setup

Apple introduced the new app-control settings in **macOS 27.3 beta 2** on
November 16, 2026. Existing grants remain in effect. Apple notes that some known apps keep
their existing behavior without a new entitlement. See [Apple's announcement](https://developer.apple.com/news/?id=oqng0zjk).

1. Open **System Settings > Privacy & Security > System & App Protection Override**.
2. Click **+** and add the app that launches OpenAdapt, such as the installed
desktop app or your terminal host.
3. Select **Choose Apps**, add the intended target apps, and choose **Ask First**
or **At Any Time** for each target. An Ask First grant can require another
confirmation during use.
4. For unrestricted control, use the system-protection override option, review
its five action confirmations and authenticate when asked. This is broader
than selecting target apps; it is not required by this guide.
5. Restart the launching app and re-check the intended target. For earlier macOS,
use **Privacy & Security > Accessibility** instead.

[Apple's permission guide](https://support.apple.com/en-us/149699) describes the
scope controls. Screen Recording and Input Monitoring remain separate checks;
this change does not make Full Disk Access a recording requirement. The new-pane
deep-link identifier is not verified, so Desktop opens Privacy & Security and
provides the manual path.

## What the checks establish

`AXIsProcessTrusted` reports trust for the current process. It does not document
which target apps are allowed. On 27.3 or later, doctor and Desktop describe that
result as a process preflight, rather than claiming every target is accessible.
An unavailable API is unknown and must not be reported as granted. Runtime input
continues to refuse when the existing process/target checks cannot establish the
required boundary; a version number never grants access.

No 27.3 machine was available for this change. The relationship between an
override grant and `AXIsProcessTrusted`, read versus posted-input permissions,
and replay under **Choose Apps** still need beta-machine verification. No
replacement trust API or blanket bypass is assumed. No general-availability date
is established here.

Apple's [27.3 beta release notes](https://developer.apple.com/documentation/macos-release-notes/macos-27_3-release-notes)
list interaction issues with Safari and other WebKit apps under the new grant
(192510863). They also list a missing activity indicator for some CoreGraphics
input (192728601). The indicator is not proof that input succeeded or failed;
verify the application's actual effect.
57 changes: 57 additions & 0 deletions docs/results/macos-27-3-permission-guidance-2026-11-20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# macOS 27.3 permission guidance — 2026-11-20

This is a source-only onboarding/diagnostic correction, not beta runtime
qualification. The new PR is held for review and must remain unmerged.

The defect class is using a legacy global-permission label/check as a claim
about newer app-scoped control. The launcher, engine, recorder and Desktop keep
independent installation boundaries; their small dependency-free guidance
helpers share one tested numeric-version/setup model. No package floor, release
version, native entitlement or workflow is changed.

## Validation

| Targeted group | Result |
| --- | --- |
| Launcher guidance and doctor | 53 passed |
| Flow macOS wrappers and refusal/prompt cases | 63 passed |
| Capture input permission cases | 8 passed, 17 deselected |
| Desktop capability and API-result cases | 55 passed |
| Desktop permission dispatch cases | 10 passed, 92 deselected |
| Onboarding UI | 6 passed |
| Desktop TypeScript | Passed, no emit |

Python checks used CPython 3.12.13 with source paths bound to this checkout.
Desktop test additions used task-local dependencies, including Pydantic 2.14.4;
they are not a new locked-runtime qualification. Capture used its existing
complete 3.12.13 test interpreter. UI used Node 22.22.2 and the exact npm lock.
All tests ran headlessly through the shared CPU-slot wrapper, sequential package
processes for Python. No native permission API, desktop input or GUI was driven.

Initial collection failures were environmental: the first Capture interpreter
lacked Flow cryptography; combining the packages collided on their separate
`tests` namespaces; the Flow interpreter lacked Capture's fire dependency.
Each package was then tested separately in its appropriate existing interpreter.
A local path typo was corrected before final formatting/type validation. These
setup failures are not test passes or source defects. The source-growth check
first found dispatch one line over its existing budget; moving the pure guidance
import to module scope removed the extra line without raising the budget. The final Capture group
retains its existing SQLAlchemy deprecation warning; Vite retains its config
loader warning.

## Remaining beta checks

No macOS 27.3 machine was identified. Test the exact new-pane deep link, whether
AX process trust reflects each override mode, UI reads versus posted input,
Choose Apps with allowed/disallowed targets, Ask First cancellation, and old
migrated grants on a beta machine before merging. The code does not invent a
replacement API or bypass a denied preflight. The UI/doctor never treat process
trust as proof of all target-app grants. General-availability timing is unknown.

Primary references and beta2 known-issue identifiers are in
[the permission guide](../getting-started/permissions.md).

The unchanged Desktop release-intent check exits 1 and requests at least a patch
bump from 0.30.6 before eventual delivery. No version bump is included because
this PR is explicitly review-only and must remain unmerged. The check is not
waived; release preparation belongs to a later approved candidate.
17 changes: 15 additions & 2 deletions openadapt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3543,9 +3543,12 @@ def _doctor_macos_permissions() -> list[str]:
click.echo(" [ERROR] macOS permissions could not be checked.")
return ["macos-permissions"]

from openadapt.macos_permissions import control_permission_guidance

guidance = control_permission_guidance()
failures = []
for name, check, pane in (
("Accessibility", client.input_trusted, "Accessibility"),
(guidance["label"], client.input_trusted, guidance["label"]),
(
"Screen Recording",
client.capture_trusted,
Expand All @@ -3558,7 +3561,17 @@ def _doctor_macos_permissions() -> list[str]:
failures.append(name)
click.echo(f" [ERROR] {name}: permission could not be checked.")
continue
if granted:
if name == guidance["label"] and guidance["setup_mode"] != "legacy":
if not granted:
failures.append(name)
state = "WARN" if granted else "UNCONFIRMED"
detail = "passed" if granted else "did not confirm access"
click.echo(
f" [{state}] {name}: AX process trust preflight {detail}; "
"this does not verify access to the selected app. "
+ guidance["instructions"]
)
elif granted:
click.echo(f" [OK] {name}: permission is granted.")
else:
failures.append(name)
Expand Down
54 changes: 54 additions & 0 deletions openadapt/macos_permissions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"""Version-aware macOS permission guidance; never an access decision.

Kept dependency-free in each independently installable package. The shared
conformance cases in tests/test_macos_permission_guidance.py cover all copies.
"""

from __future__ import annotations

import platform
import re


def control_permission_guidance(version: str | None = None) -> dict[str, str]:
"""Describe setup without inferring target access from process AX trust."""
if version is None:
try:
version = platform.mac_ver()[0]
except (OSError, ValueError, TypeError, RuntimeError):
version = ""
valid = re.fullmatch(r"[0-9]+\.[0-9]+(?:\.[0-9]+)?", version)
scope = "unknown"
if valid:
parts = tuple(int(part) for part in version.split(".")[:2])
scope = "app_selection" if parts >= (27, 3) else "legacy"
pane = "x-apple.systempreferences:com.apple.preference.security"
if scope == "legacy":
return {
"setup_mode": scope,
"label": "Accessibility",
"settings_url": pane + "?Privacy_Accessibility",
"instructions": "In System Settings > Privacy & Security > Accessibility, "
"enable the app that launches OpenAdapt, then restart that app.",
}
steps = (
"In System Settings > Privacy & Security > System & App Protection "
"Override, click + and add the app that launches OpenAdapt. Choose Apps, "
"then set each target to Ask First or At Any Time. For unrestricted "
"control, select the system-protection override option, confirm its "
"warnings and authenticate. Restart the launching app, then check the "
"selected target."
)
return {
"setup_mode": scope,
"label": "System & App Protection Override"
if scope == "app_selection"
else "macOS app control",
# No supported direct link to the new pane has been verified.
"settings_url": pane,
"instructions": steps
if scope == "app_selection"
else "On macOS 27.3 or later: "
+ steps
+ " On earlier macOS, use Privacy & Security > Accessibility instead.",
}
8 changes: 5 additions & 3 deletions packages/capture/openadapt_capture/input_observer/darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import time
from typing import Any

from openadapt_capture.macos_permissions import control_permission_guidance

from .base import (
InputCallback,
InputObserverError,
Expand Down Expand Up @@ -167,8 +169,8 @@ def _setup(self) -> None:
)
if not self._has_active_filter_permission():
raise InputObserverPermissionError(
"macOS denied the ordered input barrier. In System Settings > "
f"Privacy & Security > Accessibility, {_PERMISSION_TARGET}"
"macOS process trust for the ordered input barrier is not confirmed. "
+ control_permission_guidance()["instructions"]
)

event_mask = 0
Expand Down Expand Up @@ -243,7 +245,7 @@ def _has_active_filter_permission(self) -> bool:
if callable(accessibility_check):
return bool(accessibility_check())
raise InputObserverUnavailableError(
"macOS does not expose the Accessibility permission required for "
"macOS does not expose the process-trust check required for "
"ordered input"
)

Expand Down
54 changes: 54 additions & 0 deletions packages/capture/openadapt_capture/macos_permissions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"""Version-aware macOS permission guidance; never an access decision.

Kept dependency-free in each independently installable package. The shared
conformance cases in tests/test_macos_permission_guidance.py cover all copies.
"""

from __future__ import annotations

import platform
import re


def control_permission_guidance(version: str | None = None) -> dict[str, str]:
"""Describe setup without inferring target access from process AX trust."""
if version is None:
try:
version = platform.mac_ver()[0]
except (OSError, ValueError, TypeError, RuntimeError):
version = ""
valid = re.fullmatch(r"[0-9]+\.[0-9]+(?:\.[0-9]+)?", version)
scope = "unknown"
if valid:
parts = tuple(int(part) for part in version.split(".")[:2])
scope = "app_selection" if parts >= (27, 3) else "legacy"
pane = "x-apple.systempreferences:com.apple.preference.security"
if scope == "legacy":
return {
"setup_mode": scope,
"label": "Accessibility",
"settings_url": pane + "?Privacy_Accessibility",
"instructions": "In System Settings > Privacy & Security > Accessibility, "
"enable the app that launches OpenAdapt, then restart that app.",
}
steps = (
"In System Settings > Privacy & Security > System & App Protection "
"Override, click + and add the app that launches OpenAdapt. Choose Apps, "
"then set each target to Ask First or At Any Time. For unrestricted "
"control, select the system-protection override option, confirm its "
"warnings and authenticate. Restart the launching app, then check the "
"selected target."
)
return {
"setup_mode": scope,
"label": "System & App Protection Override"
if scope == "app_selection"
else "macOS app control",
# No supported direct link to the new pane has been verified.
"settings_url": pane,
"instructions": steps
if scope == "app_selection"
else "On macOS 27.3 or later: "
+ steps
+ " On earlier macOS, use Privacy & Security > Accessibility instead.",
}
29 changes: 26 additions & 3 deletions packages/capture/tests/test_input_observer_darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,7 @@ def test_lifecycle_creates_listen_only_tap_and_releases_run_loop() -> None:

assert quartz.callback is not None
assert quartz.tap_enabled == [True, False]
assert quartz.added_sources == [
(quartz.loop, quartz.source, quartz.kCFRunLoopDefaultMode)
]
assert quartz.added_sources == [(quartz.loop, quartz.source, quartz.kCFRunLoopDefaultMode)]
assert quartz.removed_sources == quartz.added_sources
assert quartz.invalidated_sources == [quartz.source]
assert quartz.invalidated_ports == [quartz.tap]
Expand Down Expand Up @@ -866,3 +864,28 @@ def fail(_event):
assert observer._stop_requested.is_set()
with pytest.raises(InputObserverError, match="callback boom"):
observer.stop()


@pytest.mark.parametrize(
"version, pane",
[
("27.2", "Accessibility"),
("27.3", "System & App Protection Override"),
("27.10", "System & App Protection Override"),
("28.0", "System & App Protection Override"),
],
)
def test_active_barrier_permission_guidance_tracks_macos_without_bypassing_denial(
monkeypatch, version, pane
):
monkeypatch.setattr(
"openadapt_capture.macos_permissions.platform.mac_ver", lambda: (version, (), "")
)
quartz = FakeQuartz()
observer = make_observer(
quartz, lambda _event: None, application_services=FakeApplicationServices(trusted=False)
)
with pytest.raises(InputObserverPermissionError) as error:
observer.start()
assert pane in str(error.value)
assert quartz.callback is None
9 changes: 9 additions & 0 deletions packages/desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# CHANGELOG


## v0.32.3 (2026-11-23)

### Bug Fixes

- **desktop**: keep permission guidance within the size budget
- **macos**: guide 27.3 app-control permissions conservatively



## Unreleased


Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/openadapt_desktop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
+-- backends/ Storage backend plugins
"""

__version__ = "0.32.2"
__version__ = "0.32.3"
Loading
Loading