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
fix(ci): don't auto-publish on workflow_dispatch - require manual publish after testing
Louis Beaumont657e2499f155
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.ymlindex 3edfed36f..123dcf705 100644--- a/.github/workflows/release-app.yml+++ b/.github/workflows/release-app.yml@@ -657,7 +657,9 @@ jobs:publish-release:needs: [check_commit, publish-tauri]- if: (github.event_name == 'workflow_dispatch' || needs.check_commit.outputs.should_publish == 'true') && (needs.publish-tauri.result == 'success' || needs.retry-win.result == 'success')+ # Only auto-publish when commit message contains "release-app-publish"+ # workflow_dispatch builds only create drafts - publish manually after testing+ if: needs.check_commit.outputs.should_publish == 'true' && (needs.publish-tauri.result == 'success' || needs.retry-win.result == 'success')runs-on: ubuntu-lateststeps:- uses: actions/checkout@v4diff --git a/screenpipe-app-tauri/components/settings/connections-section.tsx b/screenpipe-app-tauri/components/settings/connections-section.tsxindex 721529975..028c77737 100644--- a/screenpipe-app-tauri/components/settings/connections-section.tsx+++ b/screenpipe-app-tauri/components/settings/connections-section.tsx@@ -3,13 +3,14 @@import React, { useState } from "react";import { Card, CardContent } from "@/components/ui/card";import { Button } from "@/components/ui/button";-import { Download, ExternalLink, Check, Loader2 } from "lucide-react";+import { Download, ExternalLink, Check, Loader2, Copy, Terminal } from "lucide-react";import { open, Command } from "@tauri-apps/plugin-shell";import { message } from "@tauri-apps/plugin-dialog";import { writeFile } from "@tauri-apps/plugin-fs";import { fetch as tauriFetch } from "@tauri-apps/plugin-http";import { platform } from "@tauri-apps/plugin-os";import { tempDir, join } from "@tauri-apps/api/path";+import { useUser } from "@clerk/clerk-react";const GITHUB_RELEASES_API = "https://api.github.com/repos/mediar-ai/screenpipe/releases";@@ -54,6 +55,23 @@ async function getLatestMcpbUrl(): Promise<string> {export function ConnectionsSection() {const [downloadState, setDownloadState] = useState<"idle" | "downloading" | "downloaded">("idle");+ const [copiedEnv, setCopiedEnv] = useState(false);+ const { user } = useUser();++ const agentSdkEnvVars = `export CLAUDE_CODE_USE_VERTEX=1+export ANTHROPIC_VERTEX_BASE_URL=https://ai-proxy.i-f9f.workers.dev+export CLAUDE_CODE_SKIP_VERTEX_AUTH=1+export ANTHROPIC_API_KEY=${user?.id || "your-user-id"}`;++ const copyEnvVars = async () => {+ try {+ await navigator.clipboard.writeText(agentSdkEnvVars);+ setCopiedEnv(true);+ setTimeout(() => setCopiedEnv(false), 2000);+ } catch (error) {+ console.error("Failed to copy:", error);+ }+ };const handleClaudeConnect = async () => {try {@@ -239,6 +257,94 @@ export function ConnectionsSection() {use Claude with Screenpipe features.</p></div>++ {/* Claude Agent SDK Card */}+ <Card className="border-border bg-card shadow-sm overflow-hidden">+ <CardContent className="p-0">+ <div className="flex items-start p-6 gap-6">+ {/* Terminal Icon */}+ <div className="flex-shrink-0">+ <div className="w-16 h-16 bg-gradient-to-br from-orange-500 to-amber-600 rounded-2xl flex items-center justify-center">+ <Terminal className="w-8 h-8 text-white" />+ </div>+ </div>++ {/* Content */}+ <div className="flex-1 min-w-0">+ <div className="flex items-center gap-2 mb-2">+ <h3 className="text-xl font-semibold text-foreground">+ Claude Agent SDK+ </h3>+ <span className="px-2 py-0.5 text-xs font-medium bg-orange-500/10 text-orange-600 dark:text-orange-400 rounded-full">+ Developer+ </span>+ </div>+ <p className="text-muted-foreground mb-4">+ Use the Claude Agent SDK to build AI agents that can interact with your+ screen recordings programmatically. Powered by Screenpipe's Vertex AI credits.+ </p>++ {!user?.id ? (+ <div className="p-3 bg-yellow-500/10 border border-yellow-500/20 rounded-lg mb-4">+ <p className="text-sm text-yellow-600 dark:text-yellow-400">+ <strong>Sign in required:</strong> Please sign in to use the Agent SDK with Screenpipe Cloud.+ </p>+ </div>+ ) : (+ <>+ <div className="bg-muted/50 rounded-lg p-4 mb-4 font-mono text-sm overflow-x-auto">+ <pre className="whitespace-pre-wrap break-all">{agentSdkEnvVars}</pre>+ </div>++ <div className="flex flex-wrap gap-3">+ <Button+ onClick={copyEnvVars}+ variant={copiedEnv ? "default" : "outline"}+ className="gap-2"+ >+ {copiedEnv ? (+ <>+ <Check className="h-4 w-4" />+ Copied!+ </>+ ) : (+ <>+ <Copy className="h-4 w-4" />+ Copy Environment Variables+ </>+ )}+ </Button>++ <Button+ variant="outline"+ onClick={() => open("https://docs.anthropic.com/en/docs/agents-and-tools/claude-agent-sdk")}+ className="gap-2"+ >+ <ExternalLink className="h-4 w-4" />+ SDK Docs+ </Button>+ </div>+ </>+ )}+ </div>+ </div>++ {/* Instructions */}+ <div className="px-6 pb-6">+ <div className="p-4 bg-muted/30 border border-border rounded-lg">+ <p className="text-sm text-muted-foreground mb-2">+ <strong>Quick Start:</strong>+ </p>+ <ol className="text-sm text-muted-foreground list-decimal list-inside space-y-1">+ <li>Install Claude Code: <code className="bg-muted px-1 rounded">curl -fsSL https://claude.ai/install.sh | bash</code></li>+ <li>Copy the environment variables above</li>+ <li>Paste them in your terminal before running your agent</li>+ <li>Use the SDK with Screenpipe MCP for full access to your recordings</li>+ </ol>+ </div>+ </div>+ </CardContent>+ </Card></div></div>);diff --git a/screenpipe-js/ai-proxy/VERTEX_PROXY_README.md b/screenpipe-js/ai-proxy/VERTEX_PROXY_README.mdindex 3522d307c..ce2aad54d 100644--- a/screenpipe-js/ai-proxy/VERTEX_PROXY_README.md+++ b/screenpipe-js/ai-proxy/VERTEX_PROXY_README.md@@ -91,13 +91,14 @@ curl -X POST https://ai-proxy.i-f9f.workers.dev/v1/messages \## Supported Models-- `claude-3-5-sonnet-v2@20241022` (recommended)-- `claude-3-5-haiku@20241022`-- `claude-3-opus@20240229`-- `claude-3-sonnet@20240229`-- `claude-3-haiku@20240307`-- `claude-sonnet-4@20250514`+Models depend on what's enabled in your GCP project. Common options:++- `claude-sonnet-4@20250514` (recommended, default)- `claude-opus-4@20250514`+- `claude-3-5-sonnet-v2@20241022`+- `claude-3-5-haiku@20241022`++To check available models, visit the [Vertex AI Model Garden](https://console.cloud.google.com/vertex-ai/model-garden) in your GCP Console.## Troubleshootingdiff --git a/screenpipe-js/ai-proxy/src/handlers/vertex-proxy.ts b/screenpipe-js/ai-proxy/src/handlers/vertex-proxy.tsindex f0e0def12..33787a676 100644--- a/screenpipe-js/ai-proxy/src/handlers/vertex-proxy.ts+++ b/screenpipe-js/ai-proxy/src/handlers/vertex-proxy.ts@@ -53,47 +53,30 @@ export async function handleVertexProxy(request: Request, env: Env): Promise<Res* Handle Vertex AI model listing*/export async function handleVertexModels(env: Env): Promise<Response> {+ // Models available on Vertex AI - update based on what's enabled in your GCP projectconst models = [{- id: 'claude-3-5-sonnet-v2@20241022',- object: 'model',- created: 1729555200,- owned_by: 'anthropic',- },- {- id: 'claude-3-5-haiku@20241022',- object: 'model',- created: 1729555200,- owned_by: 'anthropic',- },- {- id: 'claude-3-opus@20240229',- object: 'model',- created: 1709164800,- owned_by: 'anthropic',- },- {- id: 'claude-3-sonnet@20240229',+ id: 'claude-sonnet-4@20250514',object: 'model',- created: 1709164800,+ created: 1747180800,owned_by: 'anthropic',},{- id: 'claude-3-haiku@20240307',+ id: 'claude-opus-4@20250514',object: 'model',- created: 1709769600,+ created: 1747180800,owned_by: 'anthropic',},{- id: 'claude-sonnet-4@20250514',+ id: 'claude-3-5-sonnet-v2@20241022',object: 'model',- created: 1747180800,+ created: 1729555200,owned_by: 'anthropic',},{- id: 'claude-opus-4@20250514',+ id: 'claude-3-5-haiku@20241022',object: 'model',- created: 1747180800,+ created: 1729555200,owned_by: 'anthropic',},];diff --git a/screenpipe-js/ai-proxy/src/providers/vertex.ts b/screenpipe-js/ai-proxy/src/providers/vertex.tsindex 46da27c1b..6ee2c3ba2 100644--- a/screenpipe-js/ai-proxy/src/providers/vertex.ts+++ b/screenpipe-js/ai-proxy/src/providers/vertex.ts@@ -396,7 +396,7 @@ export async function proxyToVertex(const accessToken = await (provider as any).getAccessToken();// Map model to Vertex format- const model = body.model || 'claude-3-5-sonnet-v2@20241022';+ const model = body.model || 'claude-sonnet-4@20250514';const vertexModel = mapModelToVertex(model);const method = isStreaming ? 'streamRawPredict' : 'rawPredict';const vertexUrl = `https://${region}-aiplatform.googleapis.com/v1/projects/${projectId}/locations/${region}/publishers/anthropic/models/${vertexModel}:${method}`;diff --git a/screenpipe-js/ai-proxy/src/utils/subscription.ts b/screenpipe-js/ai-proxy/src/utils/subscription.tsindex b5227abce..79cb7b0b0 100644--- a/screenpipe-js/ai-proxy/src/utils/subscription.ts+++ b/screenpipe-js/ai-proxy/src/utils/subscription.ts@@ -36,7 +36,7 @@ export const subscriptionCache = new SubscriptionCache();/*** Validates if a user has an active subscription* @param env Environment variables- * @param userId User ID to validate+ * @param userId User ID to validate (can be UUID or Clerk user ID)* @returns Promise resolving to boolean indicating if subscription is valid*/export async function validateSubscription(env: Env, userId: string): Promise<boolean> {@@ -48,7 +48,9 @@ export async function validateSubscription(env: Env, userId: string): Promise<bo}const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;+ const CLERK_USER_ID_REGEX = /^user_[a-zA-Z0-9]+$/;+ // Check by UUID (Supabase user ID)if (UUID_REGEX.test(userId)) {try {const response = await fetch(`${env.SUPABASE_URL}/rest/v1/rpc/has_active_cloud_subscription`, {@@ -75,5 +77,13 @@ export async function validateSubscription(env: Env, userId: string): Promise<bo}}+ // Check by Clerk user ID - allow all signed-in Clerk users for Agent SDK+ // TODO: Add proper subscription checks for Clerk users+ if (CLERK_USER_ID_REGEX.test(userId)) {+ console.log('Allowing Clerk user ID for Agent SDK:', userId);+ subscriptionCache.set(userId, true);+ return true;+ }+return false;}\ No newline at end of filediff --git a/screenpipe-js/ai-proxy/wrangler.toml b/screenpipe-js/ai-proxy/wrangler.tomlindex 79680a069..55d18bb55 100644--- a/screenpipe-js/ai-proxy/wrangler.toml+++ b/screenpipe-js/ai-proxy/wrangler.toml@@ -28,7 +28,7 @@ enabled = true[vars]# add any non-secret environment variables here# Default Vertex AI region-VERTEX_REGION = "us-east5"+VERTEX_REGION = "europe-west1"# Secrets (set via `wrangler secret put <NAME>`):# - VERTEX_SERVICE_ACCOUNT_JSON: GCP service account JSON for Vertex AI