# macOS App

## Overview

The macOS companion application serves as a menu-bar interface for OpenClaw, managing permissions and exposing system capabilities. It owns permissions, manages/attaches to the Gateway locally and provides access to macOS-specific tools.

## Core Functionality

Key responsibilities include:

- Native notifications and menu-bar status display
- TCC prompt management (Notifications, Accessibility, Screen Recording, etc.)
- Gateway connection handling (local or remote)
- macOS tool exposure (Canvas, Camera, Screen Recording, system execution)

## Operating Modes

The app supports two configurations:

1. **Local mode** (default): Attaches to running local Gateway; enables launchd service if needed
2. **Remote mode**: Connects via SSH/Tailscale; starts node host service for remote Gateway access

## Node Capabilities

Common command categories available through the macOS node:

- Canvas operations (`canvas.present`, `canvas.navigate`, etc.)
- Camera functions (`camera.snap`, `camera.clip`)
- Screen recording (`screen.record`)
- System commands (`system.run`, `system.notify`)

## Security Features

**Exec approvals** control `system.run` execution through a local configuration file. The system uses pattern-matching for allowlists and stores settings in `~/.openclaw/exec-approvals.json`.

## Deep Link Integration

The app registers `openclaw://` URLs for triggering agent requests with optional parameters like message content and session keys.

## Development

Building requires:

```bash
cd apps/macos && swift build
```

Packaging via provided scripts.
