# Slipout Lock Screen Live Status — AI Agent Integration Guide

Official integration guide for connecting any AI coding agent to **Slipout** (`https://slipout.app`) on macOS.

## Helper Binary Location

Slipout bundles a native, zero-dependency helper binary inside the app:

- Default path: `/Applications/Slipout.app/Contents/MacOS/slipout-status`

Verify it is executable (`test -x /Applications/Slipout.app/Contents/MacOS/slipout-status`) before configuring.

---

## Integration Priority (Pick the Best Method Supported by This Agent)

### Method 1 (Preferred): Native Lifecycle Hooks (Zero Token Cost)

If this AI coding tool supports local lifecycle hooks (shell commands triggered on prompt submit, tool use, permission wait, and turn completion), configure hooks to invoke `slipout-status` non-blockingly:

- **When a task starts / model is thinking or running tools**:
  ```bash
  "/Applications/Slipout.app/Contents/MacOS/slipout-status" running "<Session Title>" --id "<session-id>"
  ```
- **When waiting for user approval / permission**:
  ```bash
  "/Applications/Slipout.app/Contents/MacOS/slipout-status" waiting "<Session Title>" --id "<session-id>"
  ```
- **When the task completes**:
  ```bash
  "/Applications/Slipout.app/Contents/MacOS/slipout-status" done "<Session Title>" --id "<session-id>"
  ```
- **When the task fails**:
  ```bash
  "/Applications/Slipout.app/Contents/MacOS/slipout-status" fail "<Session Title>" --id "<session-id>"
  ```
- **When the session closes**:
  ```bash
  "/Applications/Slipout.app/Contents/MacOS/slipout-status" clear --id "<session-id>"
  ```

Wrap hook commands defensively (`if [ -x '...' ]; then ...; fi`) so removing or moving `Slipout.app` never interrupts the agent. Always preserve existing user hooks and back up config files before editing.

### Method 2: Local stdio MCP Server

If this AI coding tool supports MCP (Model Context Protocol) servers (e.g. Windsurf, Trae, Cline, Roo Code, Zed, zCode), register Slipout as a local stdio MCP server in the tool's MCP config:

```json
{
  "mcpServers": {
    "slipout": {
      "command": "/Applications/Slipout.app/Contents/MacOS/slipout-status",
      "args": ["mcp"]
    }
  }
}
```

Exposed MCP tools:
- `update_lock_status`:
  - `state` (required): `"running"` | `"waiting"` | `"done"` | `"failed"`
  - `summary` (optional): short privacy-safe task title (max 44 chars, no secrets or file paths)
  - `task_id` (optional): stable session or task identifier
- `clear_lock_status`:
  - `task_id` (optional): removes the item from the lock screen

### Method 3: Shell / Script Wrapper

For long-running shell tasks (builds, tests, exports):

```bash
"/Applications/Slipout.app/Contents/MacOS/slipout-status" running "Building release" --id "build" \
  && swift build \
  && "/Applications/Slipout.app/Contents/MacOS/slipout-status" done "Building release" --id "build"
```

---

## Privacy Guidelines

- Only pass concise task or session titles (never API keys, passwords, raw code, or full local file paths).
- Everything stays 100% local on this Mac (`~/Library/Application Support/local.still.screen-lock/live-status/`).
