YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
docs: add pipe permissions guide and reference page
Louis Beaumontb2bb207d5cee
diff --git a/docs/mintlify/docs-mintlify-mig-tmp/docs.json b/docs/mintlify/docs-mintlify-mig-tmp/docs.jsonindex 82ab49b02..bd349b2f4 100644--- a/docs/mintlify/docs-mintlify-mig-tmp/docs.json+++ b/docs/mintlify/docs-mintlify-mig-tmp/docs.json@@ -31,7 +31,7 @@},{"group": "guides",- "pages": ["pipes", "mcp-server", "mcp-apps", "cloud-sync", "cloud-archive", "teams"]+ "pages": ["pipes", "pipe-permissions", "mcp-server", "mcp-apps", "cloud-sync", "cloud-archive", "teams"]},{"group": "integrations",diff --git a/docs/mintlify/docs-mintlify-mig-tmp/pipe-permissions.mdx b/docs/mintlify/docs-mintlify-mig-tmp/pipe-permissions.mdxnew file mode 100644index 000000000..ef2f102c9--- /dev/null+++ b/docs/mintlify/docs-mintlify-mig-tmp/pipe-permissions.mdx@@ -0,0 +1,251 @@+---+title: "pipe permissions"+sidebarTitle: "pipe permissions"+description: "control what API endpoints your pipes can access"+icon: "shield-halved"+---++## overview++pipes can access the screenpipe API to read screen data, manage meetings, send notifications, and more. by default, pipes have **full access** to every endpoint — no restrictions.++if you want to limit what a pipe can do, add a `permissions` block to the YAML frontmatter in `pipe.md`. this is useful for:++- **preventing accidents** — a pipe that reads meetings shouldn't be able to stop one+- **least privilege** — pipes from the store should only access what they need+- **safety** — deny destructive endpoints like `/data/delete-range`++## quick start++```yaml+---+schedule: every 30m+permissions: reader+---++Summarize my screen activity...+```++that's it. this pipe can only read data — it can't start/stop meetings, delete data, or run raw SQL.++## presets++### `reader` — safe read-only defaults++```yaml+permissions: reader+```++allowed endpoints:++| method | endpoint | description |+|--------|----------|-------------|+| GET | `/search` | query screen/audio data |+| GET | `/activity-summary` | app usage overview |+| GET | `/elements` | UI element search |+| GET | `/frames/*` | screenshots (if `allow_frames: true`) |+| GET | `/meetings` | list meetings |+| GET | `/meetings/*` | get meeting details |+| GET | `/meetings/status` | check if in meeting |+| POST | `/notify` | send notifications |+| GET | `/speakers` | list speakers |+| POST | `/speakers/update` | update speaker names |+| GET | `/pipes/info` | pipe metadata |+| GET | `/health` | health check |+| GET | `/connections/*` | connection credentials |++everything else is **denied**.++### `writer` — reader + write operations++```yaml+permissions: writer+```++includes all `reader` endpoints, plus:++| method | endpoint | description |+|--------|----------|-------------|+| POST | `/meetings/start` | start a manual meeting |+| POST | `/meetings/stop` | stop a manual meeting |+| PUT | `/meetings/*` | update meeting details |+| POST | `/meetings/merge` | merge meetings |+| POST | `/memories` | create memories |+| PUT | `/memories/*` | update memories |+| DELETE | `/memories/*` | delete memories |++### `admin` — full access (explicit)++```yaml+permissions: admin+```++allows everything. functionally the same as no `permissions` block, but creates a token for logging/auditing.++## custom rules++for fine-grained control, use `allow` and `deny` lists with `Api(METHOD /path)` patterns:++```yaml+permissions:+ allow:+ - Api(GET /search)+ - Api(GET /meetings/*)+ - Api(POST /notify)+ deny:+ - Api(* /data/delete-*)+```++### pattern syntax++| pattern | matches |+|---------|---------|+| `Api(GET /search)` | exact: GET to /search |+| `Api(GET /meetings/*)` | glob: GET to /meetings/42, /meetings/status, etc. |+| `Api(* /meetings/stop)` | any method to /meetings/stop |+| `Api(POST /notify)` | exact: POST to /notify |+| `Api(* /data/*)` | any method to any /data/ subpath |++`*` in the method position matches GET, POST, PUT, DELETE, etc.+`*` in the path position matches any sequence of characters.++### evaluation order++rules are evaluated in this order — **first match wins**:++1. **deny** — if the request matches any deny rule, it's blocked (403)+2. **allow** — if the request matches any allow rule, it passes+3. **default allowlist** — if `allow` is empty and the pipe uses a preset with defaults (reader/writer), the default list is checked+4. **reject** — if nothing matched, the request is blocked++deny always wins over allow, just like firewall rules.++### examples++**deny specific endpoints (keep full access otherwise):**++```yaml+permissions:+ deny:+ - Api(* /meetings/stop)+ - Api(* /meetings/start)+ - Api(DELETE /meetings/*)+ - Api(* /data/delete-*)+```++**allow only what you need (everything else denied):**++```yaml+permissions:+ allow:+ - Api(GET /search)+ - Api(POST /notify)+```++**reader defaults + custom deny:**++```yaml+permissions:+ deny:+ - Api(GET /frames/*)+```++this uses the reader defaults but also blocks screenshot access.++## data access permissions++separate from endpoint permissions, you can also control **what data** a pipe sees:++```yaml+---+schedule: every 1h+allow_apps: [Slack, Chrome]+deny_apps: [1Password, Signal]+allow_windows: ["*meeting*"]+deny_windows: ["*incognito*", "*bank*"]+allow_content_types: [ocr, audio]+deny_content_types: [input]+time_range: "09:00-17:00"+days: "Mon,Tue,Wed,Thu,Fri"+allow_raw_sql: false+allow_frames: true+---+```++| field | default | description |+|-------|---------|-------------|+| `allow_apps` | all | only data from these apps (case-insensitive substring match) |+| `deny_apps` | none | block data from these apps (wins over allow) |+| `allow_windows` | all | glob patterns for window titles |+| `deny_windows` | none | block matching windows (wins over allow) |+| `allow_content_types` | all | `ocr`, `audio`, `input`, `accessibility` |+| `deny_content_types` | none | block these types (wins over allow) |+| `time_range` | all day | `"09:00-17:00"` — supports midnight wrap (`"22:00-06:00"`) |+| `days` | every day | `"Mon,Tue,Wed,Thu,Fri"` |+| `allow_raw_sql` | true | whether `/raw_sql` endpoint is accessible |+| `allow_frames` | true | whether `/frames/*` (screenshots) are accessible |++data permissions filter the **results** returned by the API. endpoint permissions control **which endpoints** the pipe can call. they work independently.++## how it works++when a pipe has any restrictions (permissions block, data filters, etc.):++1. screenpipe generates a unique token (`sp_pipe_*`) for the pipe session+2. the token is registered with the server middleware+3. every API request from the pipe includes the token in `Authorization: Bearer sp_pipe_*`+4. the middleware checks `is_endpoint_allowed(method, path)` before forwarding+5. the Pi extension also enforces rules client-side (blocks curl commands before they run)+6. when the pipe finishes, the token is cleaned up++pipes without any restrictions run without a token — full access, zero overhead.++## common recipes++### meeting-safe pipe++your pipe reads meeting data but should never interfere with active meetings:++```yaml+---+schedule: every 1h+permissions:+ deny:+ - Api(* /meetings/start)+ - Api(* /meetings/stop)+ - Api(POST /meetings/merge)+ - Api(POST /meetings/bulk-delete)+ - Api(DELETE /meetings/*)+---++Summarize my meetings from the last hour...+```++### read-only analytics pipe++```yaml+---+schedule: daily+permissions: reader+allow_apps: [Chrome, Arc, Firefox]+allow_content_types: [ocr]+---++Generate a daily browsing report...+```++### work-hours-only pipe with full access++```yaml+---+schedule: every 30m+time_range: "09:00-17:00"+days: "Mon,Tue,Wed,Thu,Fri"+---++Track my work activity...+```++no `permissions` block — full API access, but only runs during work hours and the data filters limit what it sees.++need help? [ask in our discord](https://discord.gg/screenpipe)diff --git a/docs/mintlify/docs-mintlify-mig-tmp/pipes.mdx b/docs/mintlify/docs-mintlify-mig-tmp/pipes.mdxindex 5d2697eed..dc929576b 100644--- a/docs/mintlify/docs-mintlify-mig-tmp/pipes.mdx+++ b/docs/mintlify/docs-mintlify-mig-tmp/pipes.mdx@@ -365,6 +365,49 @@ pipe.md (prompt + config)- **lookback = schedule interval** (capped at 8h to prevent context overflow)- **logs saved** to `~/.screenpipe/pipes/{name}/logs/` as JSON+## security & permissions++by default, pipes have **full API access** — they can call any screenpipe endpoint. this is fine for pipes you write yourself, but if a pipe doesn't need write access, you can restrict it.++add `permissions` to your frontmatter:++```yaml+---+schedule: every 30m+permissions: reader+---+```++### presets++| preset | what it allows |+|--------|----------------|+| (none) | **full access** — no restrictions, same as always |+| `reader` | read-only: `/search`, `/activity-summary`, `/meetings` (GET), `/notify`, `/health` |+| `writer` | reader + meeting writes, memory writes |+| `admin` | everything (explicit opt-in, useful for logging) |++### custom rules++use `Api(METHOD /path)` patterns for fine-grained control:++```yaml+---+schedule: every 1h+permissions:+ deny:+ - Api(* /meetings/stop)+ - Api(* /meetings/start)+ - Api(DELETE /meetings/*)+---+```++this pipe has full access **except** it can't start, stop, or delete meetings.++<Tip>if your pipe doesn't need to write data, add `permissions: reader` — it prevents accidental side effects like ending a meeting or deleting data.</Tip>++see the full reference: [pipe permissions →](/pipe-permissions)+## built-in pipesscreenpipe ships with three template pipes (disabled by default):