# car-permissions

Cross-platform permission preflight for [Common Agent Runtime](https://github.com/Parslee-ai/car).

## What it does

Unifies macOS TCC, Windows privacy/consent APIs, and Linux `xdg-desktop-portal` / polkit / filesystem-permission semantics under one surface:

| Function | Purpose |
|----------|---------|
| `status(domain)` | current grant state |
| `request(domain)` | trigger a native prompt if the OS supports one |
| `explain(domain)` | human-readable diagnostic + the user-visible fix |
| `domains()` | which `Domain`s are meaningful on the current OS |

## Honest modeling

A domain that doesn't exist on the current OS returns `PermissionStatus::NotApplicable` — **not** `Denied`. Callers should branch on `NotApplicable` and skip, rather than treating it as failure.

## No private APIs

Backends use only public, documented interfaces. On macOS that means querying TCC through Apple's public Security/AppKit paths (or returning `NotDetermined` when only private access would give better data). This keeps CAR App Store-compatible and audit-friendly.

## Where it fits

Surfaced via the WebSocket `permissions.*` methods. Required by every OS-touching capability in CAR (`car-health`, `car-integrations`, `car-meeting` for system audio, etc.).
