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
ui: derive pipe store categories dynamically from pipe metadata
Louis Beaumontba213d4c3f98
diff --git a/Cargo.lock b/Cargo.lockindex 2e52750a9..4efa62fa8 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -6513,7 +6513,7 @@ dependencies = [[[package]]name = "screenpipe-audio"-version = "0.3.187"+version = "0.3.188"dependencies = ["anyhow","audiopipe",@@ -6572,7 +6572,7 @@ dependencies = [[[package]]name = "screenpipe-config"-version = "0.3.187"+version = "0.3.188"dependencies = ["dirs 6.0.0","serde",@@ -6585,7 +6585,7 @@ dependencies = [[[package]]name = "screenpipe-connect"-version = "0.3.187"+version = "0.3.188"dependencies = ["anyhow","async-trait",@@ -6611,7 +6611,7 @@ dependencies = [[[package]]name = "screenpipe-core"-version = "0.3.187"+version = "0.3.188"dependencies = ["accessibility","accessibility-sys",@@ -6654,7 +6654,7 @@ dependencies = [[[package]]name = "screenpipe-db"-version = "0.3.187"+version = "0.3.188"dependencies = ["anyhow","chrono",@@ -6679,7 +6679,7 @@ dependencies = [[[package]]name = "screenpipe-engine"-version = "0.3.187"+version = "0.3.188"dependencies = ["anyhow","async-trait",@@ -6747,7 +6747,7 @@ dependencies = [[[package]]name = "screenpipe-events"-version = "0.3.187"+version = "0.3.188"dependencies = ["anyhow","chrono",@@ -6765,7 +6765,7 @@ dependencies = [[[package]]name = "screenpipe-screen"-version = "0.3.187"+version = "0.3.188"dependencies = ["accessibility-sys","anyhow",@@ -6805,7 +6805,7 @@ dependencies = [[[package]]name = "screenpipe-vault"-version = "0.3.187"+version = "0.3.188"dependencies = ["argon2","chacha20poly1305",diff --git a/apps/screenpipe-app-tauri/components/pipe-store.tsx b/apps/screenpipe-app-tauri/components/pipe-store.tsxindex feeb8b38f..f674015c9 100644--- a/apps/screenpipe-app-tauri/components/pipe-store.tsx+++ b/apps/screenpipe-app-tauri/components/pipe-store.tsx@@ -117,7 +117,9 @@ interface LocalPipe {// --- Helpers ----const CATEGORIES = ["All", "Productivity", "Dev", "Health", "Social", "Other"];+// Categories are derived dynamically from pipe metadata — no hardcoded taxonomy.+// Only PUBLISH_CATEGORIES is kept as a suggestion list for the publish form.+const PUBLISH_CATEGORIES = ["Productivity", "Dev", "Health", "Social", "Other"];const SORT_OPTIONS = [{ value: "popular", label: "Popular" },{ value: "newest", label: "Newest" },@@ -303,6 +305,18 @@ function DiscoverView() {const [category, setCategory] = useState("All");const [sort, setSort] = useState("popular");+ // Derive unique categories from pipe data+ const dynamicCategories = useMemo(() => {+ const counts = new Map<string, number>();+ for (const p of pipes) {+ const cat = p.category || "other";+ const label = cat.charAt(0).toUpperCase() + cat.slice(1);+ counts.set(label, (counts.get(label) || 0) + 1);+ }+ // Sort by count descending+ return ["All", ...Array.from(counts.entries()).sort((a, b) => b[1] - a[1]).map(([name]) => name)];+ }, [pipes]);+// Detail viewconst [selectedPipe, setSelectedPipe] = useState<PipeDetail | null>(null);const [detailLoading, setDetailLoading] = useState(false);@@ -375,10 +389,10 @@ function DiscoverView() {}, [searchQuery]);// Fetch pipes with stale-while-revalidate caching+ // Category filtering is done client-side so we always have all categories for the pillsconst fetchPipes = useCallback(async () => {const params = new URLSearchParams();if (debouncedQuery) params.set("q", debouncedQuery);- if (category !== "All") params.set("category", category.toLowerCase());if (sort) params.set("sort", sort);const cacheKey = `pipes/store?${params}`;@@ -410,7 +424,7 @@ function DiscoverView() {} finally {setLoading(false);}- }, [debouncedQuery, category, sort]);+ }, [debouncedQuery, sort]);useEffect(() => {fetchPipes();@@ -602,7 +616,16 @@ function DiscoverView() {);}- const featuredPipes = pipes.filter((p) => p.featured);+ // Client-side category filter+ const filteredPipes = useMemo(() => {+ if (category === "All") return pipes;+ return pipes.filter((p) => {+ const cat = (p.category || "other").charAt(0).toUpperCase() + (p.category || "other").slice(1);+ return cat === category;+ });+ }, [pipes, category]);++ const featuredPipes = filteredPipes.filter((p) => p.featured);return (<div className="space-y-6">@@ -648,7 +671,7 @@ function DiscoverView() {{/* Category pills */}<div className="flex items-center gap-1.5 overflow-x-auto pb-1">- {CATEGORIES.map((c) => (+ {dynamicCategories.map((c) => (<buttonkey={c}onClick={() => setCategory(c)}@@ -717,7 +740,7 @@ function DiscoverView() {</Card>) : (<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">- {pipes.map((pipe) => (+ {filteredPipes.map((pipe) => (<PipeCardkey={pipe.slug}pipe={pipe}@@ -1530,7 +1553,7 @@ export function PublishDialog({<SelectValue /></SelectTrigger><SelectContent>- {CATEGORIES.filter((c) => c !== "All").map((c) => (+ {PUBLISH_CATEGORIES.map((c) => (<SelectItem key={c} value={c}>{c}</SelectItem>diff --git a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsxindex dab7dcbff..1b9a7b781 100644--- a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx@@ -1191,7 +1191,7 @@ export function PipesSection() {</CardContent></Card>) : (- <div className="space-y-2">+ <div className="border border-border rounded-md divide-y divide-border">{/* Global daily limit / credits exhausted banner — shown once at top */}{(() => {const errors = filteredPipes@@ -1202,7 +1202,7 @@ export function PipesSection() {);if (!limitError) return null;return (- <div className="flex items-center gap-2 text-xs px-4 py-2 border rounded-md">+ <div className="flex items-center gap-2 text-xs px-4 py-2"><span className="text-muted-foreground">{limitError.type === "credits_exhausted"? "no credits remaining — buy more at screenpi.pe"@@ -1226,54 +1226,89 @@ export function PipesSection() {const recentExecs = pipeExecutions[pipe.config.name] || [];const isRunning = pipe.is_running || runningPipe === pipe.config.name;const runningExec = recentExecs.find((e) => e.status === "running");+ const lastExec = recentExecs[0];+ const lastStatus = isRunning+ ? "running"+ : pipe.last_success === false+ ? "error"+ : lastExec?.status === "completed"+ ? "ok"+ : lastExec?.status === "failed"+ ? "error"+ : "idle";return (- <Card key={pipe.config.name} className={cn(!pipe.config.enabled && "opacity-50")}>- <CardContent className="p-4">- {/* Header row */}- <div className="flex items-center gap-2">- <button- onClick={() => toggleExpand(pipe.config.name)}- className="flex items-center gap-1 text-sm font-medium flex-1 text-left min-w-0"+ <div key={pipe.config.name} className={cn("group", !pipe.config.enabled && "opacity-50")}>+ {/* Table row */}+ <div className="flex items-center gap-3 px-4 py-2.5 hover:bg-accent/50 transition-colors">+ {/* Status dot */}+ <span+ className={cn(+ "h-2 w-2 rounded-full shrink-0",+ lastStatus === "ok" && "bg-green-500",+ lastStatus === "running" && "bg-blue-500 animate-pulse",+ lastStatus === "error" && "bg-red-500",+ lastStatus === "idle" && "bg-muted-foreground/30",+ )}+ title={lastStatus}+ />++ {/* Pipe name — click to expand */}+ <button+ onClick={() => toggleExpand(pipe.config.name)}+ className="text-sm font-medium truncate text-left min-w-0 flex-1 hover:underline"+ >+ {pipe.config.name}+ </button>++ {/* Update badge */}+ {availableUpdates[pipe.config.name] && (+ <Badge+ variant="outline"+ className="text-[10px] shrink-0 cursor-pointer border-amber-500/50 text-amber-600 dark:text-amber-400 hover:bg-amber-500/10 transition-colors"+ onClick={(e) => {+ e.stopPropagation();+ const update = availableUpdates[pipe.config.name];+ const slug = (pipe.config as any).config?.source_slug as string || pipe.source_slug || pipe.config.name;+ if (update.locally_modified) {+ if (confirm(`you have local changes to this pipe. updating to v${update.latest_version} will overwrite them. continue?`)) {+ updatePipe(pipe.config.name, slug);+ }+ } else {+ updatePipe(pipe.config.name, slug);+ }+ }}>- {expanded === pipe.config.name ? (- <ChevronDown className="h-4 w-4 shrink-0" />+ {updatingPipe === pipe.config.name ? (+ <Loader2 className="h-3 w-3 mr-1 animate-spin" />) : (- <ChevronRight className="h-4 w-4 shrink-0" />+ <ArrowUpCircle className="h-3 w-3 mr-1" />)}- <span className="truncate">{pipe.config.name}</span>- </button>-- <Badge variant="outline" className="text-xs shrink-0">- {pipe.config.schedule}+ v{availableUpdates[pipe.config.name].installed_version} → v{availableUpdates[pipe.config.name].latest_version}</Badge>+ )}- {availableUpdates[pipe.config.name] && (- <Badge- variant="outline"- className="text-xs shrink-0 cursor-pointer border-amber-500/50 text-amber-600 dark:text-amber-400 hover:bg-amber-500/10 transition-colors"- onClick={(e) => {- e.stopPropagation();- const update = availableUpdates[pipe.config.name];- const slug = (pipe.config as any).config?.source_slug as string || pipe.source_slug || pipe.config.name;- if (update.locally_modified) {- if (confirm(`you have local changes to this pipe. updating to v${update.latest_version} will overwrite them. continue?`)) {- updatePipe(pipe.config.name, slug);- }- } else {- updatePipe(pipe.config.name, slug);- }- }}- >- {updatingPipe === pipe.config.name ? (- <Loader2 className="h-3 w-3 mr-1 animate-spin" />- ) : (- <ArrowUpCircle className="h-3 w-3 mr-1" />- )}- v{availableUpdates[pipe.config.name].installed_version} → v{availableUpdates[pipe.config.name].latest_version}- </Badge>+ {/* Schedule */}+ <span className="text-xs text-muted-foreground shrink-0 w-24 text-right font-mono">+ {pipe.config.schedule || "manual"}+ </span>++ {/* Last run time */}+ <span className="text-xs text-muted-foreground shrink-0 w-20 text-right font-mono">+ {isRunning && runningExec?.started_at ? (+ <span className="flex items-center justify-end gap-1">+ <Loader2 className="h-2.5 w-2.5 animate-spin" />+ <ElapsedTimer startedAt={runningExec.started_at} />+ </span>+ ) : lastExec?.started_at ? (+ relativeTime(lastExec.started_at)+ ) : (+ "—")}+ </span>+ {/* Hover-reveal actions */}+ <div className="flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0">{/* Run / Stop button */}{isRunning ? (<Button@@ -1303,13 +1338,6 @@ export function PipesSection() {</Button>)}- <Switch- checked={pipe.config.enabled}- onCheckedChange={(checked) =>- togglePipe(pipe.config.name, checked)- }- />-{/* Optimize with AI */}<Buttonvariant="ghost"@@ -1390,109 +1418,30 @@ export function PipesSection() {</DropdownMenu></div>- {/* Live running indicator */}- {isRunning && (- <div className="mt-2 flex items-center gap-2 text-xs">- <Loader2 className="h-3 w-3 animate-spin text-muted-foreground" />- <span className="text-muted-foreground">running</span>- {runningExec?.started_at && (- <span className="font-mono text-muted-foreground">- <ElapsedTimer startedAt={runningExec.started_at} />- </span>- )}- </div>- )}-- {/* Per-pipe error (skip daily_limit/credits_exhausted — shown globally above) */}- {!isRunning && pipe.last_success === false && pipe.last_error && (() => {- const error = parsePipeError(pipe.last_error);- if (error.type === "daily_limit" || error.type === "credits_exhausted") return null;- if (error.type === "rate_limit") {- return (- <p className="mt-2 text-xs text-muted-foreground">{error.message}</p>- );+ {/* Toggle — always visible */}+ <Switch+ checked={pipe.config.enabled}+ onCheckedChange={(checked) =>+ togglePipe(pipe.config.name, checked)}- return (- <p className="mt-2 text-xs text-muted-foreground truncate max-w-full">+ />+ </div>++ {/* Error line (inline, below row) */}+ {!isRunning && pipe.last_success === false && pipe.last_error && (() => {+ const error = parsePipeError(pipe.last_error);+ if (error.type === "daily_limit" || error.type === "credits_exhausted") return null;+ return (+ <div className="px-4 pb-2 -mt-1">+ <p className="text-[11px] text-red-500/80 truncate max-w-full pl-5">{error.message}</p>- );- })()}-- {/* Last run — single line summary */}- {recentExecs.length > 0 && (() => {- const exec = recentExecs[0];- return (- <div className="mt-1.5 flex items-center gap-2 text-[11px] font-mono text-muted-foreground">- <span>- {exec.started_at ? relativeTime(exec.started_at) : "queued"}- </span>- <span className="text-muted-foreground/50">·</span>- {exec.status === "completed" ? (- <span className="text-foreground">ok</span>- ) : exec.status === "running" ? (- <span className="flex items-center gap-1">- <Loader2 className="h-2.5 w-2.5 animate-spin" />- running- {exec.started_at && <ElapsedTimer startedAt={exec.started_at} />}- <button- className="text-[10px] text-primary underline hover:no-underline ml-1"- onClick={(e) => {- e.stopPropagation();- sessionStorage.setItem(- "watchPipe",- JSON.stringify({- pipeName: pipe.config.name,- executionId: exec.id,- presetId: (Array.isArray(pipe.config.preset) ? pipe.config.preset[0] : pipe.config.preset) || null,- })- );- emit("watch_pipe", {- pipeName: pipe.config.name,- executionId: exec.id,- presetId: (Array.isArray(pipe.config.preset) ? pipe.config.preset[0] : pipe.config.preset) || null,- });- }}- title="watch live output"- >- watch- </button>- </span>- ) : exec.status === "failed" ? (- <span className="text-foreground font-medium">failed</span>- ) : exec.status === "timed_out" ? (- <span className="text-muted-foreground">timeout</span>- ) : (- <span>{exec.status}</span>- )}- {exec.duration_ms != null && exec.status !== "running" && (- <>- <span className="text-muted-foreground/50">·</span>- <span>{formatDuration(exec.duration_ms)}</span>- </>- )}- {exec.error_type && (- <>- <span className="text-muted-foreground/50">·</span>- <span className="text-muted-foreground">- {exec.error_type.replace("_", " ")}- </span>- </>- )}- {exec.status === "completed" && exec.stdout && !exec.error_type && (- <>- <span className="text-muted-foreground/50">·</span>- <span className="truncate max-w-[200px]">- {cleanPipeStdout(exec.stdout).split("\n")[0].slice(0, 50) || "done"}- </span>- </>- )}</div>- );- })()}+ );+ })()}- {/* Expanded detail */}- {expanded === pipe.config.name && (+ {/* Expanded detail */}+ {expanded === pipe.config.name && (<div className="mt-4 space-y-4 border-t pt-4"><PipePresetSelectorpipe={pipe}@@ -1832,8 +1781,7 @@ export function PipesSection() {</div>)}- </CardContent>- </Card>+ </div>);})}</div>diff --git a/crates/screenpipe-connect/screenpipe-mcp/src/index.ts b/crates/screenpipe-connect/screenpipe-mcp/src/index.tsindex a51d44bec..a5e4068e2 100644--- a/crates/screenpipe-connect/screenpipe-mcp/src/index.ts+++ b/crates/screenpipe-connect/screenpipe-mcp/src/index.ts@@ -193,6 +193,39 @@ const TOOLS: Tool[] = [},},},+ {+ name: "send-notification",+ description:+ "Send a notification to the screenpipe desktop UI with optional action buttons. " ++ "Actions can re-run pipes with context, call API endpoints, or open deep links.",+ annotations: { title: "Send Notification", destructiveHint: false },+ inputSchema: {+ type: "object",+ properties: {+ title: { type: "string", description: "Notification title" },+ body: { type: "string", description: "Notification body (markdown supported)" },+ pipe_name: { type: "string", description: "Name of the pipe sending this notification" },+ timeout_secs: { type: "integer", description: "Auto-dismiss seconds (default 20)", default: 20 },+ actions: {+ type: "array",+ description: "Up to 5 action buttons",+ items: {+ type: "object",+ properties: {+ id: { type: "string", description: "Unique action ID" },+ label: { type: "string", description: "Button label" },+ type: { type: "string", enum: ["pipe", "api", "deeplink", "dismiss"], description: "Action type" },+ pipe: { type: "string", description: "Pipe name to run (type=pipe)" },+ context: { type: "object", description: "Context passed to pipe (type=pipe)" },+ url: { type: "string", description: "URL for api/deeplink actions" },+ },+ required: ["id", "label", "type"],+ },+ },+ },+ required: ["title", "pipe_name"],+ },+ },];server.setRequestHandler(ListToolsRequestSchema, async () => {@@ -751,6 +784,25 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {};}+ case "send-notification": {+ const notifBody: Record<string, unknown> = {+ title: args.title,+ pipe_name: args.pipe_name,+ };+ if (args.body) notifBody.body = args.body;+ if (args.timeout_secs) notifBody.timeout_secs = args.timeout_secs;+ if (args.actions) notifBody.actions = args.actions;+ const notifResponse = await fetchAPI("/notify", {+ method: "POST",+ body: JSON.stringify(notifBody),+ });+ if (!notifResponse.ok) throw new Error(`HTTP error: ${notifResponse.status}`);+ const notifResult = await notifResponse.json();+ return {+ content: [{ type: "text", text: `Notification sent (id: ${notifResult.id})` }],+ };+ }+default:throw new Error(`Unknown tool: ${name}`);}diff --git a/crates/screenpipe-core/assets/skills/screenpipe-api/SKILL.md b/crates/screenpipe-core/assets/skills/screenpipe-api/SKILL.mdindex dbc669cd9..5ab1ba6af 100644--- a/crates/screenpipe-core/assets/skills/screenpipe-api/SKILL.md+++ b/crates/screenpipe-core/assets/skills/screenpipe-api/SKILL.md@@ -368,7 +368,36 @@ Memories also appear in `/search?content_type=memory`. Use sparingly — only st----## 12. Other Endpoints+## 12. Notifications — `POST /notify`++Send a notification to the screenpipe desktop UI with optional action buttons.++```bash+curl -X POST http://localhost:3030/notify \+ -H "Content-Type: application/json" \+ -d '{"title": "3 new voice memos", "body": "found recordings from today", "pipe_name": "my-pipe", "actions": [{"id": "view", "label": "view", "type": "deeplink", "url": "screenpipe://timeline"}, {"id": "skip", "label": "skip", "type": "dismiss"}]}'+```++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| `title` | string | **Yes** | Notification title |+| `body` | string | No | Markdown body |+| `pipe_name` | string | **Yes** | Pipe sending the notification |+| `timeout_secs` | integer | No | Auto-dismiss (default 20) |+| `actions` | array | No | Up to 5 action buttons |++**Action types**: `pipe` (re-run a pipe with context), `api` (call a local API endpoint), `deeplink` (open a screenpipe URL), `dismiss` (close notification).++`type: "pipe"` example — re-runs a pipe with injected context:+```json+{"id": "transcribe", "label": "transcribe all", "type": "pipe", "pipe": "voice-memos", "context": {"files": ["a.m4a"]}}+```++Returns `{"id": "pipe-my-pipe-1710000000000"}`.++---++## 13. Other Endpoints```bashcurl http://localhost:3030/health # Health check