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
security: remove unauthenticated WebSocket Deepgram proxy
Louis Beaumont396767b519d7
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs b/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rsindex 60ccf89a1..d890f738e 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs@@ -123,7 +123,6 @@ pub async fn start_embedded_server(if config.audio_transcription_engine == AudioTranscriptionEngine::Deepgram {if let Some(ref user_id) = config.user_id {std::env::set_var("DEEPGRAM_API_URL", "https://api.screenpi.pe/v1/listen");- std::env::set_var("DEEPGRAM_WEBSOCKET_URL", "wss://api.screenpi.pe");std::env::set_var("CUSTOM_DEEPGRAM_API_TOKEN", user_id);info!("Using screenpipe cloud for audio transcription");}diff --git a/packages/ai-gateway/src/index.ts b/packages/ai-gateway/src/index.tsindex 22ed97b74..905a49b80 100644--- a/packages/ai-gateway/src/index.ts+++ b/packages/ai-gateway/src/index.ts@@ -6,7 +6,7 @@ import { RateLimiter, checkRateLimit } from './utils/rate-limiter';import { trackUsage, getUsageStatus, isModelAllowed, getTierConfig } from './services/usage-tracker';import { handleChatCompletions } from './handlers/chat';import { handleModelListing } from './handlers/models';-import { handleFileTranscription, handleWebSocketUpgrade } from './handlers/transcription';+import { handleFileTranscription } from './handlers/transcription';import { handleVoiceTranscription, handleVoiceQuery, handleTextToSpeech, handleVoiceChat } from './handlers/voice';import { handleVertexProxy, handleVertexModels } from './handlers/vertex-proxy';import { handleWebSearch } from './handlers/web-search';@@ -35,13 +35,6 @@ async function handleRequest(request: Request, env: Env, ctx: ExecutionContext):console.log('path', path);- // Handle WebSocket upgrade for real-time transcription (no auth required)- const upgradeHeader = request.headers.get('upgrade')?.toLowerCase();- if (path === '/v1/listen' && upgradeHeader === 'websocket') {- console.log('websocket request to /v1/listen detected, bypassing auth');- return await handleWebSocketUpgrade(request, env);- }-// Authenticate and get tier info for all other endpointsconst authResult = await validateAuth(request, env);console.log('auth result:', { tier: authResult.tier, deviceId: authResult.deviceId });