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
Delete .pi directory
Louis Beaumontf8ba4a4ebd8d
diff --git a/.pi/agents/posthog.md b/.pi/agents/posthog.mddeleted file mode 100644index 50d0ec7f7..000000000--- a/.pi/agents/posthog.md+++ /dev/null@@ -1,390 +0,0 @@-----name: posthog-description: 'Query PostHog for product analytics, create insights, dashboards, and track user behavior. Auto-activates when user asks about analytics, user behavior, funnels, retention, or dashboards. Trigger words: "check posthog", "create insight", "analytics", "user behavior", "dashboard", "funnel", "retention", "user metrics", "usage stats"'-allowed-tools: Bash, Read------# PostHog Analytics Agent--Query and manage PostHog product analytics for Screenpipe.-------## ⚠️ CRITICAL: The One Metric That Matters--### North Star: Users Who Intentionally Use the Product--**DO NOT use `search_performed` raw as an engagement metric.**-It fires server-side on every `/search` API call, including automated timeline data loads.-~99% of events have `query_length = 0` (auto-load). Only `query_length > 0` means a human typed a query.--### The Correct Active User Definition--An **active user** did at least ONE of these intentional actions:--| Event | Source | What It Means | Status |-|-------|--------|---------------|--------|-| `search_performed` **with `query_length > 0`** | Rust server | User typed a search query | ✅ Live (filter required!) |-| `timeline_selection_made` | App frontend | User selected content for AI chat | ✅ Live |-| `shortcut_used` | App frontend | User invoked a keyboard shortcut | ✅ Live |-| `timeline_date_changed` | App frontend | User navigated timeline dates | ✅ Live |-| `timeline_search` | App frontend | User searched in timeline UI | ⏳ Added Feb 3 2026, not in released builds yet |-| `timeline_search_result_found` | App frontend | Search returned results | ⏳ Same |-| `timeline_search_no_result` | App frontend | Search found nothing | ⏳ Same |-| `timeline_ai_query` | App frontend | User asked AI a question | ⏳ Same |-| `timeline_selection_to_chat` | App frontend | User sent selection to chat | ⏳ Same |--### Vanity / Passive Events — NEVER Use for Engagement--| Event | Why It's Noise |-|-------|----------------|-| `resource_usage` | Heartbeat ping every few seconds. Thousands of events from every running app. |-| `app_still_running` | Background heartbeat. Means nothing. |-| `health_check_unhealthy` | Error pings, can be 100K+ from a single user. |-| `app_started` | App opened. Not activation. |-| `timeline_opened` | Timeline auto-opens on launch. Not an intentional action. |-| `search_performed` **(raw, unfiltered)** | 99% automated API calls with empty queries. |-| `enabled_pipes_hourly` | Background hourly check. |-| `$autocapture`, `$pageview`, `$pageleave` | Web SDK noise. |-| `$set`, `$identify` | Identity resolution events. |-------## Standard Queries--Always source the API key first:-```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-```--### 1. Real DAU (The Only DAU That Matters)--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT toDate(timestamp) as day, uniq(distinct_id) as real_dau FROM events WHERE ((event = '\''search_performed'\'' AND JSONExtractInt(properties, '\''query_length'\'') > 0) OR event IN ('\''timeline_selection_made'\'', '\''shortcut_used'\'', '\''timeline_date_changed'\'', '\''timeline_search'\'', '\''timeline_ai_query'\'')) AND timestamp > now() - INTERVAL 14 DAY GROUP BY day ORDER BY day"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "import sys,json; r=json.load(sys.stdin); print('Real DAU (14d):'); [print(f' {row[0]}: {row[1]}') for row in r.get('results',[])]"-```--### 2. Real WAU--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT uniq(distinct_id) as real_wau FROM events WHERE ((event = '\''search_performed'\'' AND JSONExtractInt(properties, '\''query_length'\'') > 0) OR event IN ('\''timeline_selection_made'\'', '\''shortcut_used'\'', '\''timeline_date_changed'\'', '\''timeline_search'\'', '\''timeline_ai_query'\'')) AND timestamp > now() - INTERVAL 7 DAY"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "import sys,json; print(f'Real WAU: {json.load(sys.stdin)[\"results\"][0][0]}')"-```--### 3. Activation Rate (Core Action / App Openers)--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT count(DISTINCT a.distinct_id) as started, count(DISTINCT c.distinct_id) as activated FROM (SELECT DISTINCT distinct_id FROM events WHERE event = '\''app_started'\'' AND timestamp > now() - INTERVAL 7 DAY) a LEFT JOIN (SELECT DISTINCT distinct_id FROM events WHERE ((event = '\''search_performed'\'' AND JSONExtractInt(properties, '\''query_length'\'') > 0) OR event IN ('\''timeline_selection_made'\'', '\''shortcut_used'\'', '\''timeline_date_changed'\'', '\''timeline_search'\'', '\''timeline_ai_query'\'')) AND timestamp > now() - INTERVAL 7 DAY) c ON a.distinct_id = c.distinct_id"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "import sys,json; r=json.load(sys.stdin)['results'][0]; print(f'Activation: {r[1]}/{r[0]} = {r[1]/r[0]*100:.1f}% (target: 40%+)')"-```--### 4. Retention (D1/D7, Cohorted on Real Actions)--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"WITH first_core AS (SELECT distinct_id, min(toDate(timestamp)) as first_day FROM events WHERE ((event = '\''search_performed'\'' AND JSONExtractInt(properties, '\''query_length'\'') > 0) OR event IN ('\''timeline_selection_made'\'', '\''shortcut_used'\'', '\''timeline_date_changed'\'')) AND timestamp > now() - INTERVAL 21 DAY GROUP BY distinct_id HAVING first_day <= today() - 7), returns AS (SELECT DISTINCT distinct_id, toDate(timestamp) as d FROM events WHERE ((event = '\''search_performed'\'' AND JSONExtractInt(properties, '\''query_length'\'') > 0) OR event IN ('\''timeline_selection_made'\'', '\''shortcut_used'\'', '\''timeline_date_changed'\'')) AND timestamp > now() - INTERVAL 21 DAY) SELECT f.first_day as cohort, count(DISTINCT f.distinct_id) as size, countIf(DISTINCT f.distinct_id, r1.distinct_id != '\'''\'' ) as d1, countIf(DISTINCT f.distinct_id, r7.distinct_id != '\'''\'' ) as d7 FROM first_core f LEFT JOIN returns r1 ON f.distinct_id = r1.distinct_id AND r1.d = f.first_day + 1 LEFT JOIN returns r7 ON f.distinct_id = r7.distinct_id AND r7.d = f.first_day + 7 GROUP BY cohort ORDER BY cohort DESC LIMIT 14"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)-print('Cohort | Size | D1 | D1% | D7 | D7%')-print('-'*52)-for row in r.get('results',[]):- d1p = f'{row[2]/row[1]*100:.0f}%' if row[1] > 0 else '-'- d7p = f'{row[3]/row[1]*100:.0f}%' if row[1] > 0 else '-'- print(f'{row[0]:<12} | {row[1]:>4} | {row[2]:>4} | {d1p:>4} | {row[3]:>4} | {d7p:>4}')-"-```--### 5. Core Action Breakdown (What Are Active Users Doing?)--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT event, count() as cnt, uniq(distinct_id) as users FROM events WHERE event IN ('\''timeline_selection_made'\'', '\''shortcut_used'\'', '\''timeline_date_changed'\'', '\''timeline_search'\'', '\''timeline_ai_query'\'', '\''timeline_search_result_found'\'', '\''timeline_search_no_result'\'', '\''timeline_selection_to_chat'\'') AND timestamp > now() - INTERVAL 7 DAY GROUP BY event ORDER BY users DESC"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)-print('Core Actions (7d):')-for row in r.get('results',[]):- print(f' {row[0]:<35} | {row[2]:>4} users | {row[1]:>6} events')-# Also get real search separately-" && \-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT uniq(distinct_id) as users, count() as cnt FROM events WHERE event = '\''search_performed'\'' AND JSONExtractInt(properties, '\''query_length'\'') > 0 AND timestamp > now() - INTERVAL 7 DAY"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)['results'][0]-print(f' search_performed (query_length>0) | {r[0]:>4} users | {r[1]:>6} events')-"-```--### 6. Onboarding Funnel--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-for event in "screenpipe_setup_start" "onboarding_usecases_viewed" "onboarding_usecases_completed" "onboarding_status_viewed" "onboarding_status_completed" "onboarding_completed" "app_login" "onboarding_login_skipped"; do- result=$(curl -s -X POST \- -H "Authorization: Bearer $POSTHOG_API_KEY" \- -H "Content-Type: application/json" \- -d "{\"query\":{\"kind\":\"HogQLQuery\",\"query\":\"SELECT uniq(distinct_id) FROM events WHERE event = '${event}' AND timestamp > now() - INTERVAL 7 DAY\"}}" \- "https://eu.i.posthog.com/api/projects/27525/query/" | python3 -c "import sys,json; print(json.load(sys.stdin)['results'][0][0])")- printf " %-35s | %5s users\n" "$event" "$result"-done-```--### 7. Performance by OS--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT JSONExtractString(properties, '\''os_name'\'') as os, avg(JSONExtractFloat(properties, '\''total_cpu_percent'\'')) as avg_cpu, quantile(0.95)(JSONExtractFloat(properties, '\''total_cpu_percent'\'')) as p95_cpu, avg(JSONExtractFloat(properties, '\''total_memory_gb'\'')) as avg_mem_gb, uniq(distinct_id) as users FROM events WHERE event = '\''resource_usage'\'' AND timestamp > now() - INTERVAL 7 DAY GROUP BY os ORDER BY users DESC LIMIT 10"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)-print(f'{\"OS\":<15} | {\"Avg CPU\":>8} | {\"P95 CPU\":>8} | {\"Avg Mem\":>8} | {\"Users\":>6}')-print('-'*60)-for row in r.get('results',[]):- print(f'{str(row[0]):<15} | {row[1]:>7.1f}% | {row[2]:>7.1f}% | {row[3]:>6.2f}GB | {row[4]:>6}')-"-```--### 8. Version Distribution--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT JSONExtractString(properties, '\''release'\'') as version, uniq(distinct_id) as users FROM events WHERE event = '\''resource_usage'\'' AND timestamp > now() - INTERVAL 7 DAY GROUP BY version ORDER BY users DESC LIMIT 15"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)-print('Version | Users')-for row in r.get('results',[]):- print(f'{str(row[0]):<12} | {row[1]:>5}')-"-```--### 9. Purchase Conversion Funnel (Revenue)--The full purchase funnel, from pricing page to completed payment:--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-echo "=== PURCHASE FUNNEL (last 7 days) ==="-for event in "pricing_page_viewed" "checkout_email_requested" "stripe_checkout_initiated" "purchase_completed" "purchase_success_page_viewed"; do- result=$(curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d "{\"query\":{\"kind\":\"HogQLQuery\",\"query\":\"SELECT uniq(distinct_id) FROM events WHERE event = '${event}' AND timestamp > now() - INTERVAL 7 DAY\"}}" \- "https://eu.i.posthog.com/api/projects/27525/query/" | python3 -c "import sys,json; print(json.load(sys.stdin)['results'][0][0])")- printf " %-35s %5s users\n" "$event" "$result"-done-```--For daily conversion trend:--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-echo "=== DAILY CONVERSION (last 14 days) ==="-for event in "checkout_email_requested" "stripe_checkout_initiated" "purchase_completed"; do- echo "--- $event ---"- curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d "{\"query\":{\"kind\":\"HogQLQuery\",\"query\":\"SELECT toDate(timestamp) as day, uniq(distinct_id) as users FROM events WHERE event = '${event}' AND timestamp > now() - INTERVAL 14 DAY GROUP BY day ORDER BY day\"}}" \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "-import sys,json-for row in json.load(sys.stdin).get('results',[]):- print(f' {row[0]}: {row[1]}')" 2>/dev/null-done-```--**Funnel events (in order):**--| Event | Source | What It Means |-|-------|--------|---------------|-| `pricing_page_viewed` | Website (`PricingSection`) | Saw the pricing page |-| `checkout_email_requested` | Website (`PricingSection`) | Clicked buy, email modal shown |-| `stripe_checkout_initiated` | Website (`PricingSection`) | Submitted email, redirected to Stripe |-| `purchase_completed` | Stripe webhook (server-side) | **Payment succeeded** — the real conversion |-| `purchase_success_page_viewed` | Website (success page) | Landed on download page after payment |--⚠️ `purchase_completed` was added Feb 4, 2026. No historical data before that date.-⚠️ `pricing_page_viewed` fires from both `screenpi.pe/onboarding` AND `rewind.sh` — filter by `$current_url` if needed.-------## Event Source Reference--### Server-side (Rust, `screenpipe-server`)-These fire from the backend, tagged `$lib: screenpipe-server`:--| Event | File | Notes |-|-------|------|-------|-| `search_performed` | `server.rs:590` | Every `/search` API call. **Must filter `query_length > 0` for real searches.** |-| `resource_usage` | `resource_monitor.rs` | Periodic heartbeat with CPU/mem stats. |-| `vision_pipeline_health` | `server.rs` | Vision pipeline metrics every 60s (frames captured/skipped/dropped, OCR latency, etc.) |-| `audio_pipeline_health` | `server.rs` | Audio pipeline metrics every 60s (chunks sent, VAD pass/reject, transcriptions, words/min). **The key event for audio quality monitoring.** |-| `system_will_sleep` | `sleep_monitor.rs` | macOS sleep detected. |-| `system_did_wake` | `sleep_monitor.rs` | macOS wake detected. |-| `macos_version_below_12` | `analytics.rs` | Unsupported macOS version warning. |-| `macos_version_below_14` | `analytics.rs` | Suboptimal macOS version warning. |--### Client-side (TypeScript, Tauri app)-These fire from the frontend via `posthog.capture()`:--**Onboarding:**-`screenpipe_setup_start`, `onboarding_usecases_viewed`, `onboarding_usecases_selected`, `onboarding_usecases_completed`, `onboarding_status_viewed`, `onboarding_status_completed`, `onboarding_completed`, `onboarding_login_completed`, `onboarding_login_skipped`, `onboarding_permission_skipped`, `onboarding_startup_skipped`--**Timeline (core engagement):**-`timeline_opened`, `timeline_selection_made`, `timeline_date_changed`, `timeline_search` ⏳, `timeline_search_result_found` ⏳, `timeline_search_no_result` ⏳, `timeline_ai_query` ⏳, `timeline_ai_panel_expanded` ⏳, `timeline_selection_to_chat` ⏳, `timeline_export_started`, `timeline_export_completed`--**Performance:**-`timeline_frame_load_time`, `timeline_loading_time_total`, `timeline_time_to_first_frame`--**Other:**-`app_started`, `app_login`, `shortcut_used`, `shortcut_reminder_shown`, `shortcut_reminder_dismissed`, `permission_lost`, `permission_recovery_manual_fix`, `permission_recovery_reset_fix`, `pipe_install`, `pipe_purchase`, `cloud_plan_selected`, `telemetry`--⏳ = Added recently, may not be in released builds yet. Check version distribution before relying on these.--### Website (screenpi.pe + rewind.sh)-These fire from the Next.js website, tagged `$lib: web`:--**Purchase funnel (in order):**-| Event | Where | Notes |-|-------|-------|-------|-| `pricing_page_viewed` | `PricingSection` component | Fires on `/onboarding` and `/rewind` |-| `pricing_cta_clicked` | `/onboarding` page | New subscription page CTA (if re-enabled) |-| `checkout_email_requested` | `PricingSection` | User clicked buy, email modal shown |-| `stripe_checkout_initiated` | `PricingSection` | Submitted email, going to Stripe |-| `checkout_started` | `/onboarding` subscription flow | New subscription checkout (if re-enabled) |-| `purchase_completed` | Stripe webhook (`$lib: stripe-webhook`) | **Payment succeeded.** Has `amount`, `currency`, `product_id`, `purchase_type`, `origin`. Added Feb 4 2026. |-| `purchase_success_page_viewed` | `/purchase-success` page | Client-side backup — landed on download page |-| `subscription_success_page_viewed` | `/subscription-success` page | Subscription flow success page |-| `get-it-free` | `PricingSection` | Clicked "build it yourself" |-------## Configuration--- **Host:** `https://eu.i.posthog.com` (EU region)-- **Project ID:** `27525`-- **SDK Key (public):** `phc_Bt8GoTBPgkCpDrbaIZzJIEYt0CrJjhBiuLaBck1clce`-- **Personal API Key:** In `.env.local` as `POSTHOG_API_KEY`-------## Audio Pipeline Health--Tracked via `audio_pipeline_health` event (fires every 60s from Rust server, respects `--disable-telemetry`).--### Audio Pipeline Funnel--The audio pipeline has 4 stages where data can be lost. Each is tracked:--```-Stage 1: chunks_sent → Audio chunks sent to transcription engine-Stage 2: vad_passed / vad_rejected → VAD filter (speech vs silence)-Stage 3: transcriptions_completed → Engine produced text-Stage 4: db_inserted → Stored in database-```--### Key Metrics--| Property | Description | Healthy Range |-|----------|-------------|---------------|-| `chunks_sent` | Audio chunks sent to transcription | >0 means recording works |-| `chunks_channel_full` | Dropped because whisper queue full | 0 is ideal |-| `stream_timeouts` | Device went silent >30s (hijack/idle) | Low for input devices |-| `vad_passed` | Chunks that had enough speech | — |-| `vad_rejected` | Chunks rejected by VAD (no speech) | — |-| `vad_passthrough_rate` | vad_passed / (passed + rejected) | 0.3-0.8 during calls |-| `avg_speech_ratio` | Average speech density in chunks | >0.1 during calls |-| `transcriptions_completed` | Non-empty results from engine | — |-| `transcriptions_empty` | Engine returned empty string | Low is good |-| `transcription_errors` | Engine errors | 0 is ideal |-| `db_inserted` | Successfully stored in DB | Should ≈ transcriptions_completed |-| `db_duplicates_blocked` | Exact duplicates caught | — |-| `db_overlaps_trimmed` | Partial overlaps cleaned | — |-| `total_words` | Cumulative words transcribed | — |-| `words_per_minute` | Transcription density | 40-150 during speech |--### Query: Audio Pipeline Overview (7d)--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT toDate(timestamp) as day, sum(JSONExtractUInt(properties, '\''chunks_sent'\'')) as chunks, sum(JSONExtractUInt(properties, '\''vad_rejected'\'')) as vad_dropped, sum(JSONExtractUInt(properties, '\''db_inserted'\'')) as stored, avg(JSONExtractFloat(properties, '\''vad_passthrough_rate'\'')) as avg_vad_rate, avg(JSONExtractFloat(properties, '\''words_per_minute'\'')) as avg_wpm, uniq(distinct_id) as users FROM events WHERE event = '\''audio_pipeline_health'\'' AND timestamp > now() - INTERVAL 7 DAY GROUP BY day ORDER BY day"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)-print(f'{\"Day\":<12} | {\"Chunks\":>7} | {\"VAD Drop\":>8} | {\"Stored\":>7} | {\"VAD Rate\":>8} | {\"WPM\":>5} | {\"Users\":>5}')-print('-'*72)-for row in r.get('results',[]):- print(f'{row[0]:<12} | {int(row[1] or 0):>7} | {int(row[2] or 0):>8} | {int(row[3] or 0):>7} | {row[4]*100 if row[4] else 0:>7.1f}% | {row[5] or 0:>5.0f} | {row[6]:>5}')-"-```--### Query: Audio Pipeline by Version (regression detection)--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT JSONExtractString(properties, '\''$lib_version'\'') as version, avg(JSONExtractFloat(properties, '\''vad_passthrough_rate'\'')) as avg_vad_rate, avg(JSONExtractFloat(properties, '\''words_per_minute'\'')) as avg_wpm, sum(JSONExtractUInt(properties, '\''chunks_channel_full'\'')) as channel_drops, sum(JSONExtractUInt(properties, '\''transcription_errors'\'')) as errors, uniq(distinct_id) as users FROM events WHERE event = '\''audio_pipeline_health'\'' AND timestamp > now() - INTERVAL 7 DAY GROUP BY version ORDER BY users DESC LIMIT 10"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)-print(f'{\"Version\":<14} | {\"VAD Rate\":>8} | {\"WPM\":>5} | {\"Ch.Full\":>7} | {\"Errors\":>6} | {\"Users\":>5}')-print('-'*60)-for row in r.get('results',[]):- print(f'{str(row[0]):<14} | {row[1]*100 if row[1] else 0:>7.1f}% | {row[2] or 0:>5.0f} | {int(row[3] or 0):>7} | {int(row[4] or 0):>6} | {row[5]:>5}')-"-```--### Query: Users with broken audio (high VAD rejection)--```bash-source /Users/louisbeaumont/Documents/screenpipe/.env.local-curl -s -X POST -H "Authorization: Bearer $POSTHOG_API_KEY" -H "Content-Type: application/json" \- -d '{"query":{"kind":"HogQLQuery","query":"SELECT distinct_id, avg(JSONExtractFloat(properties, '\''vad_passthrough_rate'\'')) as avg_vad_rate, sum(JSONExtractUInt(properties, '\''vad_rejected'\'')) as total_rejected, sum(JSONExtractUInt(properties, '\''db_inserted'\'')) as total_stored, sum(JSONExtractUInt(properties, '\''stream_timeouts'\'')) as timeouts FROM events WHERE event = '\''audio_pipeline_health'\'' AND timestamp > now() - INTERVAL 3 DAY GROUP BY distinct_id HAVING avg_vad_rate < 0.2 AND total_rejected > 100 ORDER BY total_rejected DESC LIMIT 20"}}' \- "https://eu.i.posthog.com/api/projects/27525/query/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)-print('Users with low VAD passthrough (<20%):')-print(f'{\"User\":>40} | {\"VAD Rate\":>8} | {\"Rejected\":>8} | {\"Stored\":>7} | {\"Timeouts\":>8}')-for row in r.get('results',[]):- print(f'{str(row[0])[:40]:>40} | {row[1]*100:>7.1f}% | {int(row[2]):>8} | {int(row[3]):>7} | {int(row[4]):>8}')-"-```-------## Rate Limits--- Analytics endpoints: 240/min, 1,200/hour-- Query endpoint: 2,400/hour-------## Key Gotchas--1. **`search_performed` is mostly auto-loads.** Always filter `query_length > 0` for real user searches.-2. **`timeline_opened` is passive.** The timeline opens on app launch. Not an intentional action.-3. **New events (timeline_search, timeline_ai_query, etc.) have zero data** until users update to builds that include them. Check version distribution first.-4. **Most users are on old versions.** Version adoption is slow. New tracking won't populate quickly.-5. **`health_check_unhealthy` can be 100K+ events from a single user.** Always check `uniq(distinct_id)`.-6. **`resource_usage` fires every few seconds.** Great for performance monitoring, useless for engagement.diff --git a/.pi/agents/screenpipe-health.md b/.pi/agents/screenpipe-health.mddeleted file mode 100644index afe315f73..000000000--- a/.pi/agents/screenpipe-health.md+++ /dev/null@@ -1,205 +0,0 @@-----name: screenpipe-health-description: Check Screenpipe health status, process state, and diagnose common issues-tools:- - Bash- - WebFetch------# Screenpipe Health Agent--You are a specialized agent for checking Screenpipe's health status and diagnosing issues.--## Quick Health Check--### 1. Check if Screenpipe is Running-```bash-# Check for screenpipe processes-pgrep -fl screenpipe--# Check if API is responding-curl -s http://localhost:3030/health | head -100-```--### 2. Check Recording Status-```bash-# Get health with recording info-curl -s http://localhost:3030/health | jq '.frame_status, .audio_status' 2>/dev/null || curl -s http://localhost:3030/health-```--### 3. Check Disk Usage-```bash-# Screenpipe data directory size-du -sh ~/.screenpipe/--# Database size-ls -lh ~/.screenpipe/db.sqlite* 2>/dev/null--# Video/audio cache-du -sh ~/.screenpipe/data/ 2>/dev/null-```--### 4. Check Recent Logs for Errors-```bash-# Last 10 errors from today-grep -i "error" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log 2>/dev/null | tail -10-```--## Detailed Diagnostics--### Process Information-```bash-# Detailed process info-ps aux | grep -i screenpipe | grep -v grep--# Memory usage-ps aux | grep -i screenpipe | grep -v grep | awk '{sum+=$6} END {print "Total Memory: " sum/1024 " MB"}'--# Check if app or CLI-pgrep -fl "screenpipe-app" && echo "Desktop app running"-pgrep -fl "screenpipe$" && echo "CLI running"-```--### API Endpoints Check-```bash-# Health endpoint (includes vision + audio pipeline stats)-curl -s http://localhost:3030/health--# Search endpoint (test query)-curl -s "http://localhost:3030/search?limit=1" | head -50--# List audio devices-curl -s http://localhost:3030/audio/list--# List monitors-curl -s http://localhost:3030/vision/list--# Vision pipeline metrics (raw counters)-curl -s http://localhost:3030/vision/metrics--# Audio pipeline metrics (raw counters)-curl -s http://localhost:3030/audio/metrics-```--### Audio Pipeline Diagnostics-```bash-# Quick audio pipeline health — is transcription actually working?-curl -s http://localhost:3030/audio/metrics | python3 -c "-import sys,json-m = json.load(sys.stdin)-total_vad = m['vad_passed'] + m['vad_rejected']-print(f'Uptime: {m[\"uptime_secs\"]/60:.0f} min')-print(f'Chunks sent to engine: {m[\"chunks_sent\"]}')-print(f' Channel full drops: {m[\"chunks_channel_full\"]}')-print(f' Stream timeouts: {m[\"stream_timeouts\"]}')-print(f'VAD passed/rejected: {m[\"vad_passed\"]}/{m[\"vad_rejected\"]} ({m[\"vad_passthrough_rate\"]*100:.0f}% passthrough)')-print(f' Avg speech ratio: {m[\"avg_speech_ratio\"]:.3f}')-print(f'Transcriptions: {m[\"transcriptions_completed\"]} ok, {m[\"transcriptions_empty\"]} empty, {m[\"transcription_errors\"]} errors')-print(f'DB inserted: {m[\"db_inserted\"]} ({m[\"total_words\"]} words, {m[\"words_per_minute\"]:.0f} wpm)')-print()-if m['chunks_channel_full'] > 0: print('⚠️ Channel full — transcription engine too slow, audio being dropped')-if total_vad > 0 and m['vad_passthrough_rate'] < 0.1: print('⚠️ Very low VAD passthrough — may be dropping real speech')-if m['transcription_errors'] > 0: print('⚠️ Transcription errors detected')-if m['chunks_sent'] > 0 and m['db_inserted'] == 0: print('🔴 Chunks sent but nothing stored — pipeline is broken')-if m['chunks_sent'] == 0 and m['uptime_secs'] > 120: print('🔴 No chunks sent after 2min — audio capture not working')-"--# Audio pipeline info from /health (summary view)-curl -s http://localhost:3030/health | python3 -c "-import sys,json-h = json.load(sys.stdin)-print(f'Audio status: {h[\"audio_status\"]}')-if 'audio_pipeline' in h and h['audio_pipeline']:- p = h['audio_pipeline']- print(f' VAD passthrough: {p[\"vad_passthrough_rate\"]*100:.0f}%')- print(f' Words/min: {p[\"words_per_minute\"]:.0f}')- print(f' DB inserted: {p[\"db_inserted\"]}')-"-```--### Database Health-```bash-# Check database integrity-sqlite3 ~/.screenpipe/db.sqlite "PRAGMA integrity_check;" 2>/dev/null--# Database size and tables-sqlite3 ~/.screenpipe/db.sqlite "SELECT name, (SELECT COUNT(*) FROM main WHERE name=t.name) FROM sqlite_master t WHERE type='table';" 2>/dev/null--# Recent frame count-sqlite3 ~/.screenpipe/db.sqlite "SELECT COUNT(*) as frames_today FROM frames WHERE timestamp > datetime('now', '-1 day');" 2>/dev/null-```--### Permissions Check (macOS)-```bash-# Check screen recording permission-sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "SELECT client,allowed FROM access WHERE service='kTCCServiceScreenCapture';" 2>/dev/null | grep -i screenpipe--# Check microphone permission-sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "SELECT client,allowed FROM access WHERE service='kTCCServiceMicrophone';" 2>/dev/null | grep -i screenpipe--# Or use tccutil (if available)-echo "Check System Preferences > Privacy & Security > Screen Recording and Microphone for screenpipe permissions"-```--## Common Issues & Fixes--### Issue: Screenpipe not running-```bash-# Start CLI-screenpipe--# Or start app-open /Applications/screenpipe.app-```--### Issue: No frames being captured-1. Check screen recording permission in System Preferences-2. Check logs for permission errors:-```bash-grep -i "permission\|denied\|cg\|capture" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | tail -20-```--### Issue: No audio transcription-1. Check microphone permission-2. Check audio pipeline metrics:-```bash-# Is audio being captured at all?-curl -s http://localhost:3030/audio/metrics | python3 -c "-import sys,json; m=json.load(sys.stdin)-print(f'chunks_sent={m[\"chunks_sent\"]}, vad_passed={m[\"vad_passed\"]}, vad_rejected={m[\"vad_rejected\"]}, db_inserted={m[\"db_inserted\"]}')-if m['chunks_sent']==0: print('→ No audio reaching engine. Check device/permissions.')-elif m['vad_passed']==0: print('→ VAD rejecting everything. Check mic input level or lower vad_sensitivity.')-elif m['db_inserted']==0: print('→ Transcription failing. Check engine config or logs.')-"-```-3. Check audio device selection:-```bash-curl -s http://localhost:3030/audio/list-grep -i "audio\|device\|whisper" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | tail -20-```--### Issue: High CPU/Memory-```bash-# Check current usage-top -l 1 -s 0 | grep -i screenpipe--# Check for memory leaks in logs-grep -i "memory\|oom" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log-```--### Issue: Database locked-```bash-# Check for lock-fuser ~/.screenpipe/db.sqlite 2>/dev/null--# Check for multiple processes-pgrep -c screenpipe-```--## Response Format--When reporting health status:-1. Start with overall status (healthy/unhealthy)-2. List any issues found-3. Provide specific error messages if relevant-4. Suggest fixes for identified issuesdiff --git a/.pi/agents/screenpipe-logs.md b/.pi/agents/screenpipe-logs.mddeleted file mode 100644index cc15ff714..000000000--- a/.pi/agents/screenpipe-logs.md+++ /dev/null@@ -1,134 +0,0 @@-----name: screenpipe-logs-description: Retrieve and analyze Screenpipe CLI backend logs and desktop app logs for debugging-tools:- - Bash- - Read- - Grep------# Screenpipe Logs Agent--You are a specialized agent for retrieving and analyzing Screenpipe logs. Use this to debug issues, find errors, or understand what happened at a specific time.--## Log Locations--All logs are stored in `~/.screenpipe/`:--| Log Type | Pattern | Description |-|----------|---------|-------------|-| CLI/Backend | `~/.screenpipe/screenpipe.YYYY-MM-DD.log` | Core recording engine logs (OCR, audio, frames) |-| Desktop App | `~/.screenpipe/screenpipe-app.YYYY-MM-DD.log` | Tauri app logs (UI, settings, pipes) |--## Common Commands--### List Available Logs-```bash-ls -lht ~/.screenpipe/*.log | head -20-```--### Get Today's Logs-```bash-# Today's date-TODAY=$(date +%Y-%m-%d)--# CLI logs (last 100 lines)-tail -100 ~/.screenpipe/screenpipe.$TODAY.log--# App logs (last 100 lines)-tail -100 ~/.screenpipe/screenpipe-app.$TODAY.log-```--### Find Errors-```bash-# Errors in CLI logs-grep -i "error\|failed\|panic" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | tail -50--# Errors in app logs-grep -i "error\|failed\|panic" ~/.screenpipe/screenpipe-app.$(date +%Y-%m-%d).log | tail -50-```--### Search for Specific Issues-```bash-# Search for text in recent logs-grep -i "SEARCH_TERM" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log--# Search with context (5 lines before/after)-grep -i -B5 -A5 "SEARCH_TERM" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log-```--### Filter by Time-```bash-# Get logs from specific hour (e.g., 14:00-14:59)-grep "^2026-01-22T14:" ~/.screenpipe/screenpipe.2026-01-22.log--# Get logs from last N minutes-SINCE=$(date -v-30M +%Y-%m-%dT%H:%M)-awk -v since="$SINCE" '$0 >= since' ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | tail -100-```--### Log Analysis-```bash-# Count errors by type-grep -io "error[^:]*:" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | sort | uniq -c | sort -rn--# Check recording status-grep -i "recording\|started\|stopped" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | tail -20--# Check OCR processing-grep -i "ocr\|frame" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | tail -20--# Check audio processing-grep -i "audio\|transcription\|whisper" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | tail -20-```--## Log Format--Logs use tracing format:-```-2026-01-22T10:30:45.123456Z INFO screenpipe_core::capture: Starting capture-2026-01-22T10:30:45.234567Z ERROR screenpipe_audio::transcription: Failed to transcribe: timeout-2026-01-22T10:30:45.345678Z DEBUG screenpipe_vision::ocr: Processing frame 12345-```--Fields:-- Timestamp (ISO 8601 with microseconds)-- Level: TRACE, DEBUG, INFO, WARN, ERROR-- Target: module path-- Message--## Common Issues to Look For--### Recording Issues-```bash-grep -i "capture\|monitor\|screen\|permission" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | grep -i "error\|fail\|denied"-```--### Audio Issues-```bash-grep -i "audio\|microphone\|device\|whisper" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | grep -i "error\|fail"-```--### Database Issues-```bash-grep -i "sqlite\|database\|db\|insert\|query" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log | grep -i "error\|fail\|lock"-```--### Memory/Performance-```bash-grep -i "memory\|oom\|killed\|slow" ~/.screenpipe/screenpipe.$(date +%Y-%m-%d).log-```--### Pipe Issues-```bash-grep -i "pipe\|plugin" ~/.screenpipe/screenpipe-app.$(date +%Y-%m-%d).log | grep -i "error\|fail"-```--## Response Guidelines--When analyzing logs:-1. Start with the most recent errors/warnings-2. Provide timestamp and context for issues found-3. Suggest potential causes and fixes-4. If logs are large, summarize patterns rather than dumping everything-5. Note if screenpipe service appears to be running or stoppeddiff --git a/.pi/agents/screenpipe-query.md b/.pi/agents/screenpipe-query.mddeleted file mode 100644index 2b817807f..000000000--- a/.pi/agents/screenpipe-query.md+++ /dev/null@@ -1,205 +0,0 @@-----name: screenpipe-query-description: Query your Screenpipe data (screen OCR, audio transcriptions, UI/accessibility events) via REST API or direct SQL-tools:- - Bash- - WebFetch------# Screenpipe Query Agent--You are a specialized agent for querying Screenpipe data. Screenpipe captures three modalities:-1. **Vision (OCR)** - Screen text from screenshots-2. **Audio** - Transcribed speech from microphone/system audio-3. **UI Events (Accessibility)** - Keyboard input, mouse clicks, app switches, clipboard (macOS)--## Data Access Methods--### Method 1: REST API (Preferred)-The Screenpipe server runs at `http://localhost:3030`. Full API reference (60+ endpoints): https://docs.screenpi.pe/llms-full.txt--Use curl to query:--```bash-# Search all content (OCR + audio)-curl "http://localhost:3030/search?q=QUERY&limit=20"--# Filter by content type: ocr, audio, input, accessibility, all-curl "http://localhost:3030/search?q=QUERY&content_type=ocr"--# Filter by time range (ISO 8601 UTC)-curl "http://localhost:3030/search?q=QUERY&start_time=2024-01-01T00:00:00Z&end_time=2024-01-02T00:00:00Z"--# Filter by app/window-curl "http://localhost:3030/search?q=QUERY&app_name=Chrome&window_name=GitHub"--# Search input events (clicks, keystrokes, clipboard, app switches)-curl "http://localhost:3030/search?content_type=input&limit=50"--# Search accessibility text-curl "http://localhost:3030/search?content_type=accessibility&limit=50"--# Pagination-curl "http://localhost:3030/search?q=QUERY&limit=50&offset=0"--# Health check-curl "http://localhost:3030/health"-```--### Method 2: Direct SQL (if CLI available)-If the `screenpipe` CLI is available, you can query the SQLite database directly:--```bash-# Check if CLI is available-which screenpipe || where screenpipe--# Query via CLI (if supported)-screenpipe query "SELECT * FROM ocr_text LIMIT 10"--# Or query the database directly with sqlite3-sqlite3 ~/.screenpipe/db.sqlite "SELECT * FROM ocr_text ORDER BY frame_id DESC LIMIT 10"-```--## Database Schema Reference--### OCR Text (Screen Content)-```sql--- ocr_text: captured screen text-SELECT ot.text, ot.app_name, ot.window_name, f.timestamp-FROM ocr_text ot-JOIN frames f ON ot.frame_id = f.id-WHERE ot.text LIKE '%search_term%'-ORDER BY f.timestamp DESC-LIMIT 20;-```--### Audio Transcriptions-```sql--- audio_transcriptions: speech-to-text-SELECT transcription, device, timestamp, is_input_device-FROM audio_transcriptions-WHERE transcription LIKE '%search_term%'-ORDER BY timestamp DESC-LIMIT 20;-```--### UI Monitoring (Legacy)-```sql--- ui_monitoring: captured UI elements (legacy table)-SELECT text_output, app, window, timestamp-FROM ui_monitoring-WHERE text_output LIKE '%search_term%'-ORDER BY timestamp DESC-LIMIT 20;-```--### UI Events (Accessibility - macOS)-```sql--- ui_events: keyboard input, mouse clicks, app switches, clipboard--- Event types: click, text, scroll, key, app_switch, window_focus, clipboard---- Recent keyboard input (what was typed)-SELECT text_content, app_name, window_title, timestamp-FROM ui_events-WHERE event_type = 'text'-ORDER BY timestamp DESC-LIMIT 20;---- Recent mouse clicks with element context-SELECT app_name, window_title, x, y, element_label, timestamp-FROM ui_events-WHERE event_type = 'click'-ORDER BY timestamp DESC-LIMIT 20;---- App switches (which apps were used)-SELECT app_name, window_title, timestamp-FROM ui_events-WHERE event_type = 'app_switch'-ORDER BY timestamp DESC-LIMIT 50;---- Clipboard history-SELECT text_content, app_name, timestamp-FROM ui_events-WHERE event_type = 'clipboard'-ORDER BY timestamp DESC-LIMIT 20;-```--### Useful Queries--```sql--- What apps have I used today? (from frames)-SELECT DISTINCT app_name, COUNT(*) as frames-FROM frames-WHERE timestamp > datetime('now', '-1 day')-GROUP BY app_name-ORDER BY frames DESC;---- What apps have I used today? (from UI events - more accurate for activity)-SELECT app_name, event_type, COUNT(*) as count-FROM ui_events-WHERE timestamp > datetime('now', '-1 day')-GROUP BY app_name, event_type-ORDER BY count DESC;---- Recent screen content from specific app-SELECT ot.text, f.timestamp, f.window_name-FROM ocr_text ot-JOIN frames f ON ot.frame_id = f.id-WHERE f.app_name = 'Code'- AND f.timestamp > datetime('now', '-1 hour')-ORDER BY f.timestamp DESC-LIMIT 10;---- Recent audio from meetings-SELECT transcription, timestamp, device-FROM audio_transcriptions-WHERE timestamp > datetime('now', '-2 hours')- AND LENGTH(transcription) > 50-ORDER BY timestamp DESC;---- What did I type in the last hour?-SELECT text_content, app_name, window_title, timestamp-FROM ui_events-WHERE event_type = 'text'- AND timestamp > datetime('now', '-1 hour')-ORDER BY timestamp DESC;---- Most clicked elements today-SELECT app_name, element_label, COUNT(*) as clicks-FROM ui_events-WHERE event_type = 'click'- AND timestamp > datetime('now', '-1 day')- AND element_label IS NOT NULL-GROUP BY app_name, element_label-ORDER BY clicks DESC-LIMIT 20;-```--## Response Format--When returning results to the user:-1. Summarize what was found (count, time range)-2. Present the most relevant results clearly-3. Include timestamps and app context-4. For long results, group by app or time period--## Common Tasks--- **"What was I working on?"** → Search recent OCR, group by app-- **"Find mentions of X"** → Full-text search across all content types-- **"Meeting notes about Y"** → Search audio transcriptions-- **"Code I was looking at"** → Search OCR filtered by IDE apps (Code, Cursor, etc.)-- **"Time spent in app X"** → Query UI events stats or frames table by app_name-- **"What did I type?"** → Query UI events with event_type=text-- **"What did I click on?"** → Query UI events with event_type=click-- **"What apps did I use?"** → Query UI events stats endpoint or app_switch events-- **"What did I copy/paste?"** → Query UI events with event_type=clipboard--## Error Handling--- If API returns connection error: "Screenpipe server may not be running. Start it with `screenpipe` or check the Screenpipe app."-- If no results: Suggest broadening the search (time range, remove filters)-- If CLI not found: Fall back to REST APIdiff --git a/.pi/agents/sentry.md b/.pi/agents/sentry.mddeleted file mode 100644index d57bb15fa..000000000--- a/.pi/agents/sentry.md+++ /dev/null@@ -1,301 +0,0 @@-----name: sentry-description: Query Sentry for application errors, issues, and events. Use when user asks about errors, exceptions, crashes, or debugging production issues.-tools: Bash, Read------# Sentry Error Tracking Skill--Query Sentry issues for Screenpipe applications.--## Configuration--**Org:** `mediar`-**Projects:**-- `screenpipe-desktop-app` - Desktop app (Tauri/Rust) - primary project for app crashes-- `screenpipe-cli` - CLI/server (Rust) - for CLI crashes-- `screenpipe-ai-proxy` - AI proxy service-- Other projects may exist - list them with the projects query--**Credentials:** Read `SENTRY_AUTH_TOKEN` from `.env.local`--### Loading the Token--**IMPORTANT:** Before running any Sentry query, first load the token from `.env.local`:--```bash-export SENTRY_AUTH_TOKEN=$(grep SENTRY_AUTH_TOKEN /Users/louisbeaumont/Documents/screenpipe/.env.local | cut -d'=' -f2)-```--### Getting a Sentry Auth Token--1. Go to https://sentry.io/settings/account/api/auth-tokens/-2. Click "Create New Token"-3. Select scopes: `project:read`, `org:read`, `issue:read`, `issue:write` (optional for resolving)-4. Set env var: `export SENTRY_AUTH_TOKEN=sntrys_xxx...`-------## Bash Queries (macOS/Linux)--### Auto-Detect Organization Slug--Run this first to find your organization slug:--```bash-curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- "https://sentry.io/api/0/organizations/" | \- python3 -c "import sys,json; orgs=json.load(sys.stdin); [print(f'[{o[\"slug\"]}] {o[\"name\"]}') for o in orgs]"-```--### List Projects--```bash-ORG_SLUG="mediar" # Replace with actual org slug from above-curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- "https://sentry.io/api/0/organizations/$ORG_SLUG/projects/" | \- python3 -c "import sys,json; projects=json.load(sys.stdin); [print(f'[{p[\"slug\"]}] {p[\"name\"]} - {p.get(\"platform\", \"unknown\")}') for p in projects]"-```--### Recent Unresolved Issues (All Projects)--```bash-ORG_SLUG="mediar"-curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- "https://sentry.io/api/0/organizations/$ORG_SLUG/issues/?query=is:unresolved&sort=date&limit=15" | \- python3 -c "-import sys,json-issues=json.load(sys.stdin)-for i in issues:- print(f'[{i[\"shortId\"]}] {i[\"title\"]}')- print(f' Events: {i[\"count\"]} | Last seen: {i[\"lastSeen\"]} | Project: {i.get(\"project\", {}).get(\"slug\", \"?\")}')- print()-"-```--### Issues for Specific Project (e.g., screenpipe-app)--```bash-ORG_SLUG="mediar"-PROJECT_SLUG="screenpipe-app"-curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- "https://sentry.io/api/0/projects/$ORG_SLUG/$PROJECT_SLUG/issues/?query=is:unresolved&limit=15" | \- python3 -c "-import sys,json-issues=json.load(sys.stdin)-for i in issues:- print(f'[{i[\"shortId\"]}] {i[\"title\"]}')- print(f' Events: {i[\"count\"]} | Last: {i[\"lastSeen\"]}')-"-```--### Issues in Last 24 Hours--```bash-ORG_SLUG="mediar"-curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- "https://sentry.io/api/0/organizations/$ORG_SLUG/issues/?query=is:unresolved+lastSeen:-24h&sort=freq&limit=20" | \- python3 -c "-import sys,json-issues=json.load(sys.stdin)-for i in issues:- print(f'[{i[\"shortId\"]}] {i[\"title\"]}')- print(f' Events: {i[\"count\"]} | Users: {i.get(\"userCount\", 0)} | Project: {i.get(\"project\", {}).get(\"slug\", \"?\")}')-"-```--### Get Issue Details--```bash-ISSUE_ID="SCREENPIPE-APP-123" # Replace with actual issue ID-curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- "https://sentry.io/api/0/issues/$ISSUE_ID/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)-print(f'Issue: {r[\"shortId\"]}')-print(f'Title: {r[\"title\"]}')-print(f'Culprit: {r.get(\"culprit\", \"unknown\")}')-print(f'Status: {r[\"status\"]}')-print(f'Events: {r[\"count\"]}')-print(f'Users: {r.get(\"userCount\", 0)}')-print(f'First: {r[\"firstSeen\"]}')-print(f'Last: {r[\"lastSeen\"]}')-"-```--### Get Latest Event (Stack Trace)--```bash-ISSUE_ID="SCREENPIPE-APP-123" # Replace with actual issue ID-curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- "https://sentry.io/api/0/issues/$ISSUE_ID/events/latest/" | \- python3 -c "-import sys,json-r=json.load(sys.stdin)-print(f'Event: {r.get(\"eventID\", \"?\")}')-print(f'Message: {r.get(\"message\", r.get(\"title\", \"?\"))}')-print(f'Timestamp: {r.get(\"dateCreated\", \"?\")}')-print()-print('Tags:')-for t in r.get('tags', []):- print(f' {t[\"key\"]}: {t[\"value\"]}')-print()-print('Exception/Stack trace:')-for entry in r.get('entries', []):- if entry.get('type') == 'exception':- for exc in entry.get('data', {}).get('values', []):- print(f' {exc.get(\"type\", \"?\")}: {exc.get(\"value\", \"?\")}')- for frame in exc.get('stacktrace', {}).get('frames', [])[-5:]:- print(f' at {frame.get(\"filename\", \"?\")}:{frame.get(\"lineNo\", \"?\")} in {frame.get(\"function\", \"?\")}')-"-```-------## PowerShell Queries (Windows)--### Auto-Detect Organization Slug--```powershell-$headers = @{ 'Authorization' = "Bearer $env:SENTRY_AUTH_TOKEN" }-$response = Invoke-RestMethod -Uri 'https://sentry.io/api/0/organizations/' -Headers $headers-$response | ForEach-Object { Write-Host "[$($_.slug)] $($_.name)" }-```--### List Projects--```powershell-$orgSlug = 'mediar' # Replace with actual org slug-$headers = @{ 'Authorization' = "Bearer $env:SENTRY_AUTH_TOKEN" }-$response = Invoke-RestMethod -Uri "https://sentry.io/api/0/organizations/$orgSlug/projects/" -Headers $headers-$response | ForEach-Object { Write-Host "[$($_.slug)] $($_.name) - $($_.platform)" }-```--### Recent Unresolved Issues (All Projects)--```powershell-$orgSlug = 'mediar'-$headers = @{ 'Authorization' = "Bearer $env:SENTRY_AUTH_TOKEN" }-$response = Invoke-RestMethod -Uri "https://sentry.io/api/0/organizations/$orgSlug/issues/?query=is:unresolved&sort=date&limit=15" -Headers $headers-$response | ForEach-Object {- Write-Host "[$($_.shortId)] $($_.title)"- Write-Host " Events: $($_.count) | Last seen: $($_.lastSeen)"- Write-Host ''-}-```--### Issues for Specific Project--```powershell-$orgSlug = 'mediar'-$projectSlug = 'screenpipe-app'-$headers = @{ 'Authorization' = "Bearer $env:SENTRY_AUTH_TOKEN" }-$response = Invoke-RestMethod -Uri "https://sentry.io/api/0/projects/$orgSlug/$projectSlug/issues/?query=is:unresolved&limit=15" -Headers $headers-$response | ForEach-Object {- Write-Host "[$($_.shortId)] $($_.title)"- Write-Host " Events: $($_.count) | Last: $($_.lastSeen)"-}-```--### Get Issue Details--```powershell-$issueId = 'SCREENPIPE-APP-123' # Replace with actual issue ID-$headers = @{ 'Authorization' = "Bearer $env:SENTRY_AUTH_TOKEN" }-$response = Invoke-RestMethod -Uri "https://sentry.io/api/0/issues/$issueId/" -Headers $headers-Write-Host "Issue: $($response.shortId)"-Write-Host "Title: $($response.title)"-Write-Host "Culprit: $($response.culprit)"-Write-Host "Status: $($response.status)"-Write-Host "Events: $($response.count)"-Write-Host "Users: $($response.userCount)"-Write-Host "First: $($response.firstSeen)"-Write-Host "Last: $($response.lastSeen)"-```--### Get Latest Event (Stack Trace)--```powershell-$issueId = 'SCREENPIPE-APP-123' # Replace with actual issue ID-$headers = @{ 'Authorization' = "Bearer $env:SENTRY_AUTH_TOKEN" }-$response = Invoke-RestMethod -Uri "https://sentry.io/api/0/issues/$issueId/events/latest/" -Headers $headers-Write-Host "Event: $($response.eventID)"-Write-Host "Message: $($response.message)"-Write-Host "Timestamp: $($response.dateCreated)"-Write-Host ''-Write-Host 'Tags:'-$response.tags | ForEach-Object { Write-Host " $($_.key): $($_.value)" }-Write-Host ''-Write-Host 'Full response (for stack trace):'-$response | ConvertTo-Json -Depth 10-```-------## Write Operations (Ask First)--### Resolve an Issue--```bash-ISSUE_ID="SCREENPIPE-APP-123"-curl -s -X PUT -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- -H "Content-Type: application/json" \- -d '{"status": "resolved"}' \- "https://sentry.io/api/0/issues/$ISSUE_ID/"-```--### Ignore an Issue--```bash-ISSUE_ID="SCREENPIPE-APP-123"-curl -s -X PUT -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- -H "Content-Type: application/json" \- -d '{"status": "ignored"}' \- "https://sentry.io/api/0/issues/$ISSUE_ID/"-```-------## Query Syntax--### Filters-- `is:unresolved` / `is:resolved` / `is:ignored`-- `environment:production` / `environment:staging`-- `lastSeen:-24h` / `lastSeen:-7d`-- `level:error` / `level:warning`-- `os:windows` / `os:macos` / `os:linux`--### Sort-- `sort=date` - Most recent-- `sort=freq` - Most frequent-- `sort=user` - Most users affected--### Examples-```-is:unresolved environment:production lastSeen:-24h-is:unresolved level:error sort:user-is:unresolved os:windows-```-------## Debugging Windows Onboarding Crash--When investigating Windows-specific crashes (like onboarding issues):--1. First, list all issues filtered by Windows:-```bash-ORG_SLUG="mediar"-curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- "https://sentry.io/api/0/organizations/$ORG_SLUG/issues/?query=is:unresolved+os:windows&sort=date&limit=20"-```--2. Search for onboarding-related issues:-```bash-ORG_SLUG="mediar"-curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \- "https://sentry.io/api/0/organizations/$ORG_SLUG/issues/?query=is:unresolved+onboarding&sort=date&limit=20"-```--3. Get the stack trace of the most recent crash to identify the root cause.diff --git a/.pi/agents/supabase.md b/.pi/agents/supabase.mddeleted file mode 100644index 0b9c5f7bf..000000000--- a/.pi/agents/supabase.md+++ /dev/null@@ -1,231 +0,0 @@-----name: supabase-description: Query Supabase for user data, subscriptions, credits, and support issues. Use when user asks about customers, credits, subscriptions, or needs to look up user information.-tools: Bash, Read------# Supabase Database Skill--Query and manage Supabase data for Screenpipe applications.--## Configuration--**URL:** Read `NEXT_PUBLIC_SUPABASE_URL` from `.env.local`-**Service Key:** Read `SUPABASE_SERVICE_KEY` from `.env.local`--### Loading Credentials--**IMPORTANT:** Before running any Supabase query, load credentials:--```bash-export SUPABASE_URL=$(grep NEXT_PUBLIC_SUPABASE_URL .env.local | cut -d'"' -f2)-export SUPABASE_KEY=$(grep SUPABASE_SERVICE_KEY .env.local | cut -d'"' -f2)-```--Or for screenpipe repo specifically:-```bash-export SUPABASE_URL=$(grep NEXT_PUBLIC_SUPABASE_URL /Users/louisbeaumont/Documents/screenpipe/.env.local | cut -d'"' -f2)-export SUPABASE_KEY=$(grep SUPABASE_SERVICE_KEY /Users/louisbeaumont/Documents/screenpipe/.env.local | cut -d'"' -f2)-```-------## Database Schema Overview--### Key Tables--| Table | Purpose |-|-------|---------|-| `users` | User accounts (email, clerk_id, credits) |-| `credits` | User credit balances |-| `pending_credits` | Unclaimed purchases |-| `cloud_subscriptions` | Active subscriptions |-| `payments` | Payment history |--### Key Functions (RPC)--| Function | Purpose |-|----------|---------|-| `get_user_credit(user_email)` | Get user credit info |-| `increase_user_credit(target_email, amount_to_add)` | Add credits |-| `has_active_subscription_by_email(target_email)` | Check subscription |-| `give_subscription_to_user_by_email(target_email, subscription_price_id)` | Grant subscription |-| `get_subscription_details_by_email(target_email)` | Get subscription details |-------## Common Queries--### Look Up User by Email--```bash-curl -s "$SUPABASE_URL/rest/v1/users?email=eq.USER_EMAIL" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" | python3 -m json.tool-```--### Get User Credit Balance--```bash-curl -s -X POST "$SUPABASE_URL/rest/v1/rpc/get_user_credit" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" \- -H "Content-Type: application/json" \- -d '{"user_email": "USER_EMAIL"}' | python3 -m json.tool-```--### Check Credits Table Directly--```bash-# First get user ID, then query credits-USER_ID="USER_UUID_HERE"-curl -s "$SUPABASE_URL/rest/v1/credits?user_id=eq.$USER_ID" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" | python3 -m json.tool-```--### Add Credits to User--```bash-curl -s -X POST "$SUPABASE_URL/rest/v1/rpc/increase_user_credit" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" \- -H "Content-Type: application/json" \- -d '{"target_email": "USER_EMAIL", "amount_to_add": 100}'-```--### Check Subscription Status--```bash-curl -s -X POST "$SUPABASE_URL/rest/v1/rpc/get_subscription_details_by_email" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" \- -H "Content-Type: application/json" \- -d '{"target_email": "USER_EMAIL"}' | python3 -m json.tool-```--### Check Pending Credits (Unclaimed Purchases)--```bash-curl -s "$SUPABASE_URL/rest/v1/pending_credits?email=eq.USER_EMAIL" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" | python3 -m json.tool-```-------## Support Workflows--### User Says "I Purchased But Have No Credits"--1. Look up user:-```bash-curl -s "$SUPABASE_URL/rest/v1/users?email=eq.USER_EMAIL" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY"-```--2. Check credits table:-```bash-curl -s "$SUPABASE_URL/rest/v1/credits?user_id=eq.USER_ID" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY"-```--3. Check pending credits:-```bash-curl -s "$SUPABASE_URL/rest/v1/pending_credits?email=eq.USER_EMAIL&claimed=eq.false" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY"-```--4. If purchase verified (via Stripe), add credits:-```bash-curl -s -X POST "$SUPABASE_URL/rest/v1/rpc/increase_user_credit" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" \- -H "Content-Type: application/json" \- -d '{"target_email": "USER_EMAIL", "amount_to_add": AMOUNT}'-```--### Grant Free Subscription--```bash-curl -s -X POST "$SUPABASE_URL/rest/v1/rpc/give_subscription_to_user_by_email" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" \- -H "Content-Type: application/json" \- -d '{"target_email": "USER_EMAIL", "subscription_price_id": "PRICE_ID"}'-```-------## Admin Queries--### List Recent Users--```bash-curl -s "$SUPABASE_URL/rest/v1/users?order=created_at.desc&limit=20" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" | \- python3 -c "import sys,json; [print(f'{u[\"email\"]} - {u[\"created_at\"]}') for u in json.load(sys.stdin)]"-```--### List Users with Credits--```bash-curl -s "$SUPABASE_URL/rest/v1/credits?amount=gt.0&order=amount.desc&limit=20" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" | python3 -m json.tool-```--### List Active Subscriptions--```bash-curl -s "$SUPABASE_URL/rest/v1/cloud_subscriptions?status=eq.active" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" | python3 -m json.tool-```--### Get Sales Stats--```bash-curl -s -X POST "$SUPABASE_URL/rest/v1/rpc/get_sales_stats" \- -H "apikey: $SUPABASE_KEY" \- -H "Authorization: Bearer $SUPABASE_KEY" | python3 -m json.tool-```-------## Query Syntax--### Filters-- `eq.VALUE` - Equals-- `neq.VALUE` - Not equals-- `gt.VALUE` - Greater than-- `lt.VALUE` - Less than-- `gte.VALUE` - Greater than or equal-- `lte.VALUE` - Less than or equal-- `like.*pattern*` - Pattern match-- `ilike.*pattern*` - Case-insensitive pattern-- `is.null` / `is.true` / `is.false`--### Ordering-- `order=column.asc`-- `order=column.desc`--### Pagination-- `limit=N`-- `offset=N`--### Select Specific Columns-- `select=col1,col2,col3`-------## Important Notes--1. **Service Key Required:** Use `SUPABASE_SERVICE_KEY` (not anon key) for admin operations-2. **Never expose keys:** Always load from environment variables-3. **User privacy:** Only query specific users when needed for support-4. **Verify payments:** Cross-reference with Stripe before adding credits manuallydiff --git a/.pi/skills/brand-style/SKILL.md b/.pi/skills/brand-style/SKILL.mddeleted file mode 100644index c0936bc1e..000000000--- a/.pi/skills/brand-style/SKILL.md+++ /dev/null@@ -1,259 +0,0 @@-----name: brand-style-description: "Screenpipe brand style guide. Reference this when designing UI components, writing copy, or making visual decisions."-allowed-tools: Read------# Screenpipe Brand Style Guide--## Philosophy--**"Black & White Geometric Minimalism"**--No color. Sharp corners. Clean typography.-------## Core Values--| Value | Description |-|-------|-------------|-| **Privacy First** | 100% local, data never leaves your machine |-| **Open Source** | Inspect, modify, own |-| **Simplicity** | Clean, minimal interface |-| **Transparency** | "You own your data" |-| **Developer-Focused** | APIs, extensibility, power users |-------## Typography--### Font Stack--| Purpose | Font | Fallbacks |-|---------|------|-----------|-| **Headings (sans)** | Space Grotesk | system-ui, sans-serif |-| **Body (serif)** | Crimson Text | Baskerville, Times New Roman, serif |-| **Code (mono)** | IBM Plex Mono | monospace |--### Usage Patterns--- **Headings**: Space Grotesk, lowercase preferred-- **Body text**: Crimson Text for readability-- **Code/technical**: IBM Plex Mono-- **Buttons**: UPPERCASE with tracking-wide-- **Labels**: lowercase, medium weight-------## Colors--### Palette: Grayscale Only--**Light Mode:**-- Background: #FFFFFF (pure white)-- Foreground: #000000 (pure black)-- Muted: #666666 (40% gray)-- Border: #CCCCCC (80% gray)--**Dark Mode:**-- Background: #000000 (pure black)-- Foreground: #FFFFFF (pure white)-- Muted: #999999 (60% gray)-- Border: #333333 (20% gray)--### Text Hierarchy--| Level | Light Mode | Dark Mode |-|-------|------------|-----------|-| Primary | #000000 | #FFFFFF |-| Secondary | #666666 | #999999 |-| Tertiary | #999999 | #666666 |-| Disabled | #B3B3B3 | #4D4D4D |--### Rule: NO COLOR--- No accent colors (no blue, red, green, etc.)-- Status indicators use grayscale only-- Success/warning/error differentiated by icons, not color-------## Geometry--### Border Radius--```---radius: 0-```--**All corners are sharp.** No rounded corners anywhere.--### Borders--- Width: 1px solid-- Style: Sharp, binary (on/off)-- No gradients, no shadows--### Shadows--**None.** Flat design throughout. Use borders for separation.-------## Components--### Buttons--```-- Font: UPPERCASE, tracking-wide-- Border: 1px solid-- Corners: Sharp (0px radius)-- Transition: 150ms-- Hover: Color inversion-```--### Cards--```-- Border: 1px solid-- Shadow: None-- Corners: Sharp-- Padding: 24px (p-6)-```--### Inputs--```-- Style: Command-line aesthetic-- Font: Monospace (IBM Plex Mono)-- Border: 1px solid-- Height: 40px (h-10)-- Focus: Border color change-```--### Dialogs--```-- Border: 1px solid-- Shadow: None-- Animation: 150ms fade-- Title: lowercase-```-------## Motion & Animation--### Principles--- **Fast**: 150ms standard duration-- **Minimal**: Only essential state changes-- **Binary**: On/off, no elaborate easing--### Timing--| Animation | Duration |-|-----------|----------|-| Button hover | 150ms |-| Dialog open/close | 150ms |-| Accordion | 200ms |-| Page transitions | 150ms |-------## Brand Voice--### Tone--- Lowercase, casual, direct-- Technical but accessible-- No marketing fluff-- Developer-oriented--### Examples--**Good:**-- "24/7 memory for your desktop"-- "you own your data"-- "100% local"--**Bad:**-- "REVOLUTIONARY AI-POWERED SOLUTION!"-- "Best-in-class enterprise memory platform"-------## Taglines--- "24/7 memory for your desktop"-- "Rewind but open source. 100% local. You own your data."-- "Memory infrastructure for your computer"-------## Design Checklist--When creating new UI components:--- [ ] Using Space Grotesk for headings-- [ ] Using Crimson Text for body (or IBM Plex Mono for technical)-- [ ] 1px solid border-- [ ] No box shadows-- [ ] 0px border radius (sharp corners)-- [ ] Black, white, or gray only-- [ ] 150ms transitions-- [ ] UPPERCASE for buttons, lowercase for titles-- [ ] Hover state: color inversion-- [ ] Focus ring: 1px solid with offset-------## Key Files--| Purpose | Location |-|---------|----------|-| Design tokens | `screenpipe-app-tauri/app/globals.css` |-| Tailwind config | `screenpipe-app-tauri/tailwind.config.ts` |-| Color constants | `screenpipe-app-tauri/lib/constants/colors.ts` |-| UI components | `screenpipe-app-tauri/components/ui/*.tsx` |-| Website reference | `../screen-pipe-website/app/globals.css` |-------## Website Typography Reference--From `screen-pipe-website/app/layout.tsx`:--```typescript-const fontMono = IBM_Plex_Mono({- subsets: ["latin"],- weight: ["400", "500", "600"],- variable: "--font-mono",-});--const fontSans = Space_Grotesk({- subsets: ["latin"],- weight: ["400", "500", "700"],- variable: "--font-sans",-});--const fontSerif = Crimson_Text({- subsets: ["latin"],- weight: ["400", "600", "700"],- variable: "--font-serif",-});-```--Usage in CSS:-```css-body {- font-family: var(--font-serif), "Crimson Text", serif;-}-h1, h2, h3, h4, h5, h6 {- font-family: var(--font-sans), "Space Grotesk", sans-serif;-}-code, pre, kbd, .font-mono {- font-family: var(--font-mono), "IBM Plex Mono", monospace;-}-```diff --git a/.pi/skills/release/SKILL.md b/.pi/skills/release/SKILL.mddeleted file mode 100644index ed3cb6120..000000000--- a/.pi/skills/release/SKILL.md+++ /dev/null@@ -1,199 +0,0 @@-----name: release-description: "Release the screenpipe monorepo. Bumps versions, generates changelog, triggers GitHub Actions for app, CLI, MCP, and JS packages."-allowed-tools: Bash, Read, Edit, Grep, Write------# Screenpipe Monorepo Release Skill--Automate releasing all components of the screenpipe monorepo.--## Components & Versions--| Component | Version File | Current Pattern | Workflow |-|-----------|--------------|-----------------|----------|-| Desktop App | `screenpipe-app-tauri/src-tauri/Cargo.toml` | `version = "X.Y.Z"` | `release-app.yml` |-| CLI/Server | `Cargo.toml` (workspace.package) | `version = "0.2.X"` | `release-cli.yml` |-| MCP | `screenpipe-integrations/screenpipe-mcp/package.json` | `"version": "X.Y.Z"` | `release-mcp.yml` |-| JS Browser SDK | `screenpipe-js/browser-sdk/package.json` | `"version": "X.Y.Z"` | npm publish |-| JS Node SDK | `screenpipe-js/node-sdk/package.json` | `"version": "X.Y.Z"` | npm publish |-| JS CLI | `screenpipe-js/cli/package.json` | `"version": "X.Y.Z"` | npm publish |--## When to Release What--**Always release CLI** when there are changes to core screenpipe code:-- `screenpipe-core/`-- `screenpipe-vision/`-- `screenpipe-audio/`-- `screenpipe-server/`-- `screenpipe-db/`-- `screenpipe-events/`-- `screenpipe-integrations/`--**App-only release** is fine when changes are only in:-- `screenpipe-app-tauri/` (UI/frontend changes)--To check what changed since last CLI release:-```bash-# Find last CLI release commit-git log --oneline --all | grep -E "CLI to v" | head -1--# Check if core code changed since then-git diff <COMMIT>..HEAD --stat -- screenpipe-core screenpipe-vision screenpipe-audio screenpipe-server screenpipe-db screenpipe-events screenpipe-integrations-```--## Release Workflow--### 1. Check Current Versions-```bash-echo "=== App ===" && grep '^version' screenpipe-app-tauri/src-tauri/Cargo.toml | head -1-echo "=== CLI ===" && grep '^version' Cargo.toml | head -1-echo "=== MCP ===" && grep '"version"' screenpipe-integrations/screenpipe-mcp/package.json | head -1-```--### 2. Generate Changelog--**Automated (preferred)**: Run the changelog generation script in the website repo:--```bash-cd ~/Documents/website-screenpipe-bun scripts/generate-changelog.ts --since <LAST_BUMP_COMMIT> --version v<NEW_VERSION>-```--This uses Claude Haiku to summarize commits into a structured JSON entry at-`content/changelogs/<version>.json`, which renders on https://screenpi.pe/changelog.--Requires `ANTHROPIC_API_KEY` in environment.--**Manual fallback**: If the script isn't available, create the JSON manually:--```bash-# Get commits since last release-git log <LAST_TAG>..HEAD --oneline --no-merges-```--Then create `~/Documents/website-screenpipe/content/changelogs/<version>.json`:--```json-{- "version": "2.0.XXX",- "date": "YYYY-MM-DD",- "summary": "One sentence summary of the release",- "features": ["new feature descriptions"],- "improvements": ["improvement descriptions"],- "fixes": ["bug fix descriptions"],- "commitCount": 30-}-```--Guidelines:-- Only include changes that bring clear **customer value**-- Skip: CI changes, refactors, dependency bumps, merge commits-- Be concise but descriptive — max 5 items per category-- Write for non-technical users--After generating, commit and push the website repo to deploy.--### 3. Bump Version--Edit `screenpipe-app-tauri/src-tauri/Cargo.toml` to update version.--### 4. Commit & Push-```bash-git add -A && git commit -m "Bump app to vX.Y.Z" && git pull --rebase && git push-```--### 5. Trigger Release (Draft Only)-```bash-gh workflow run release-app.yml-```--**Important**: `workflow_dispatch` creates a **draft only** - does NOT auto-publish. This allows manual testing before publishing.--### 6. Monitor Build Status-```bash-# Get latest run ID-gh run list --workflow=release-app.yml --limit=1--# Check status-gh run view <RUN_ID> --json status,conclusion,jobs --jq '{status: .status, conclusion: .conclusion, jobs: [.jobs[] | {name: (.name | split(",")[0]), status: .status, conclusion: .conclusion}]}'-```--### 7. Test the Draft Release-- Download from CrabNebula Cloud: https://web.crabnebula.cloud/mediar/screenpipe/releases-- Test on macOS and Windows-- Verify updater artifacts exist (.tar.gz, .sig files)--### 8. Publish Release-After testing, publish manually via CrabNebula Cloud dashboard, OR commit with magic words:-```bash-git commit --allow-empty -m "release-app-publish" && git push-```--## Quick Release (App Only)--```bash-# 1. Generate changelog (Claude does this)-# 2. Bump version in Cargo.toml-# 3. Commit and push-git add -A && git commit -m "Bump app to vX.Y.Z" && git push--# 4. Trigger release (draft)-gh workflow run release-app.yml--# 5. Monitor-sleep 5 && gh run list --workflow=release-app.yml --limit=1-```--## Build Status Format--```-Build <RUN_ID>:-| Platform | Status |-|----------|--------|-| macOS aarch64 | ✅ success / 🔄 in_progress / ❌ failure |-| macOS x86_64 | ✅ success / 🔄 in_progress / ❌ failure |-| Windows | ✅ success / 🔄 in_progress / ❌ failure |-```--## Troubleshooting--### Build Failed-```bash-gh run view <RUN_ID> --log-failed 2>&1 | tail -100-```--### Cancel Running Build-```bash-gh run cancel <RUN_ID>-```--### Re-run Failed Jobs-```bash-gh run rerun <RUN_ID> --failed-```--### Missing Updater Artifacts (.tar.gz, .sig)-The CI copies `tauri.prod.conf.json` to `tauri.conf.json` before building. If artifacts are missing:-1. Check `tauri.prod.conf.json` has `"createUpdaterArtifacts": true`-2. Check the "Use production config" step ran successfully--## Configuration--### Dev vs Prod Configs-- `tauri.conf.json` - Dev config (identifier: `screenpi.pe.dev`)-- `tauri.prod.conf.json` - Prod config (identifier: `screenpi.pe`, updater enabled)--CI automatically uses prod config for releases by copying it before build.--### Auto-Publish Behavior-- `workflow_dispatch` (manual trigger) → Draft only, no publish-- Commit with "release-app-publish" → Auto-publish after successful build--## Notes--- Linux desktop app is disabled (bundling issues)-- App builds take ~25-35 minutes-- CLI builds take ~15-20 minutes-- Always pull before push to avoid conflicts-- Updater artifacts: macOS uses `.tar.gz`/`.sig`, Windows uses `.nsis.zip`/`.sig`diff --git a/.pi/skills/supabase-read.md b/.pi/skills/supabase-read.mddeleted file mode 100644index 0408fd3fa..000000000--- a/.pi/skills/supabase-read.md+++ /dev/null@@ -1,113 +0,0 @@-----name: supabase-read-description: "Read-only Supabase agent. Single-file TS agent doc using dotenv env vars."-allowed-tools: Read------# Supabase Read-Only Agent (TypeScript, Single-File)--**Goal:** Read public Supabase tables only using environment variables loaded from `.env` via `dotenv`.--## ✅ Safety Rules--- **Read-only**: no inserts/updates/deletes.-- **Public tables only**: do not query private tables (users, sessions, logs, api_keys, etc.).-- **No secrets in repo**: never commit keys, only read from `.env`.--## Environment--Create `.env` (gitignored):--```env-SUPABASE_URL=https://your-project.supabase.co-SUPABASE_PUBLIC_KEY=your_public_anon_key-```--Load with dotenv:--```bash-bun add dotenv @supabase/supabase-js-```--## Agent (TypeScript)--```ts-// supabase-read-agent.ts-import "dotenv/config";-import { createClient } from "@supabase/supabase-js";--const supabaseUrl = process.env.SUPABASE_URL;-const supabaseKey = process.env.SUPABASE_PUBLIC_KEY;--if (!supabaseUrl || !supabaseKey) {- throw new Error("Missing SUPABASE_URL or SUPABASE_PUBLIC_KEY in .env");-}--const supabase = createClient(supabaseUrl, supabaseKey);--export async function getActiveFeatures() {- const { data, error } = await supabase- .from("features")- .select("id, name, enabled, description, created_at, updated_at")- .eq("enabled", true)- .order("created_at", { ascending: false });-- if (error) throw new Error(error.message);- return data ?? [];-}--export async function getPricingTiers() {- const { data, error } = await supabase- .from("pricing_tiers")- .select(- "id, name, monthly_price, features, storage_gb, api_calls_month, created_at"- )- .order("monthly_price", { ascending: true });-- if (error) throw new Error(error.message);- return data ?? [];-}--export async function getAnalytics({- eventType,- startDate,- endDate,- limit = 100,-}: {- eventType?: string;- startDate?: Date;- endDate?: Date;- limit?: number;-}) {- let query = supabase- .from("user_analytics")- .select("id, event_type, event_count, date, created_at");-- if (eventType) query = query.eq("event_type", eventType);- if (startDate)- query = query.gte("date", startDate.toISOString().split("T")[0]);- if (endDate) query = query.lte("date", endDate.toISOString().split("T")[0]);-- query = query.limit(Math.min(limit, 1000));-- const { data, error } = await query;- if (error) throw new Error(error.message);- return data ?? [];-}-```--## Safe Tables (Public)--- `features`-- `pricing_tiers`-- `user_analytics`--## Blocked Tables (Do Not Touch)--`users`, `sessions`, `api_keys`, `logs`, `audit_trail`, `payment_info`, `support_tickets`, `error_logs`--## Notes--- This agent **must** use `SUPABASE_PUBLIC_KEY` only.-- **Never** hardcode keys or commit `.env` files.-- If data is missing, it likely means RLS blocks the table.