Skip to content

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

Screenpipe js refactor and fix all pipes build issues. (#1079)

neo773afe059a08604
diff --git a/pipes/archive/pipe-anthropic-computer-use-meeting-assistant/package.json b/pipes/archive/pipe-anthropic-computer-use-meeting-assistant/package.json
index 6565f6c16..735d49a26 100644
--- a/pipes/archive/pipe-anthropic-computer-use-meeting-assistant/package.json
+++ b/pipes/archive/pipe-anthropic-computer-use-meeting-assistant/package.json
@@ -10,6 +10,7 @@
},
"dependencies": {
"@anthropic-ai/sdk": "^0.32.1",
- "@screenpipe/js": "^0.1.3"
+ "@screenpipe/js": "^0.1.13",
+ "@screenpipe/browser": "0.1.12"
}
}
\ No newline at end of file
diff --git a/pipes/archive/pipe-llama32-comment-linear-while-you-work/package.json b/pipes/archive/pipe-llama32-comment-linear-while-you-work/package.json
index 624730a0a..507738b05 100644
--- a/pipes/archive/pipe-llama32-comment-linear-while-you-work/package.json
+++ b/pipes/archive/pipe-llama32-comment-linear-while-you-work/package.json
@@ -10,7 +10,8 @@
},
"dependencies": {
"@linear/sdk": "^33.0.0",
- "@screenpipe/js": "^0.1.3",
+ "@screenpipe/js": "^0.1.13",
+ "@screenpipe/browser": "0.1.12",
"ai": "^4.0.10",
"ollama-ai-provider": "^1.0.0",
"zod": "^3.23.8"
diff --git a/pipes/archive/pipe-obsidian-time-logs/package.json b/pipes/archive/pipe-obsidian-time-logs/package.json
index 5e11c46b9..21f971392 100644
--- a/pipes/archive/pipe-obsidian-time-logs/package.json
+++ b/pipes/archive/pipe-obsidian-time-logs/package.json
@@ -5,6 +5,7 @@
"dependencies": {
"@ai-sdk/openai": "^1.0.7",
"@screenpipe/js": "0.1.3",
+ "@screenpipe/browser": "0.1.12",
"ai": "^4.0.13",
"ollama-ai-provider": "^1.1.0",
"zod": "^3.23.8"
diff --git a/pipes/archive/pipe-screen-time-storyteller/package.json b/pipes/archive/pipe-screen-time-storyteller/package.json
index a091c806a..c0b52d0dc 100644
--- a/pipes/archive/pipe-screen-time-storyteller/package.json
+++ b/pipes/archive/pipe-screen-time-storyteller/package.json
@@ -11,7 +11,8 @@
"dependencies": {
"@ai-sdk/anthropic": "^1.0.2",
"@ai-sdk/openai": "^1.0.5",
- "@screenpipe/js": "^0.1.3",
+ "@screenpipe/js": "^0.1.13",
+ "@screenpipe/browser": "0.1.12",
"ai": "^4.0.10",
"zod": "^3.23.8"
}
diff --git a/pipes/data-table/package.json b/pipes/data-table/package.json
index b372a8017..b6ebd6437 100644
--- a/pipes/data-table/package.json
+++ b/pipes/data-table/package.json
@@ -24,6 +24,7 @@
"@radix-ui/react-toast": "^1.2.3",
"@radix-ui/react-tooltip": "^1.1.5",
"@screenpipe/js": "0.1.10-beta.24",
+ "@screenpipe/browser": "0.1.12",
"@shadcn/ui": "^0.0.4",
"@tanstack/react-query": "^5.62.7",
"@tanstack/react-table": "^8.20.6",
diff --git a/pipes/data-table/src/app/api/settings/route.ts b/pipes/data-table/src/app/api/settings/route.ts
index 8d4a2b4fc..51d5c8d20 100644
--- a/pipes/data-table/src/app/api/settings/route.ts
+++ b/pipes/data-table/src/app/api/settings/route.ts
@@ -27,6 +27,7 @@ export async function GET() {
enableFrameCache: true,
enableUiMonitoring: false,
aiMaxContextChars: 128000,
+ user: {}
};
try {
diff --git a/pipes/data-table/src/lib/hooks/use-settings.tsx b/pipes/data-table/src/lib/hooks/use-settings.tsx
index ffbb35ea0..0595e358a 100644
--- a/pipes/data-table/src/lib/hooks/use-settings.tsx
+++ b/pipes/data-table/src/lib/hooks/use-settings.tsx
@@ -1,7 +1,7 @@
"use client";
import { useState, useEffect } from "react";
-import type { Settings } from "@screenpipe/js";
+import type { Settings } from "@screenpipe/browser";
export function useSettings() {
const defaultSettings: Settings = {
diff --git a/pipes/identify-speakers/bun.lockb b/pipes/identify-speakers/bun.lockb
index b9e52cc76..378c8d1e8 100755
Binary files a/pipes/identify-speakers/bun.lockb and b/pipes/identify-speakers/bun.lockb differ
diff --git a/pipes/identify-speakers/package.json b/pipes/identify-speakers/package.json
index d8a876105..18a2e5ad6 100644
--- a/pipes/identify-speakers/package.json
+++ b/pipes/identify-speakers/package.json
@@ -23,6 +23,7 @@
"@radix-ui/react-toast": "^1.2.3",
"@radix-ui/react-tooltip": "^1.1.5",
"@screenpipe/js": "0.1.10-beta.24",
+ "@screenpipe/browser": "0.1.12",
"@shadcn/ui": "^0.0.4",
"@tanstack/react-query": "^5.62.7",
"@types/js-levenshtein": "^1.1.3",
diff --git a/pipes/identify-speakers/src/lib/hooks/use-settings.tsx b/pipes/identify-speakers/src/lib/hooks/use-settings.tsx
index ffbb35ea0..0595e358a 100644
--- a/pipes/identify-speakers/src/lib/hooks/use-settings.tsx
+++ b/pipes/identify-speakers/src/lib/hooks/use-settings.tsx
@@ -1,7 +1,7 @@
"use client";
import { useState, useEffect } from "react";
-import type { Settings } from "@screenpipe/js";
+import type { Settings } from "@screenpipe/browser";
export function useSettings() {
const defaultSettings: Settings = {
diff --git a/pipes/linkedin_ai_assistant/app/api/chrome/route.ts b/pipes/linkedin_ai_assistant/app/api/chrome/route.ts
index 19a62ac3c..797e86b47 100644
--- a/pipes/linkedin_ai_assistant/app/api/chrome/route.ts
+++ b/pipes/linkedin_ai_assistant/app/api/chrome/route.ts
@@ -1,5 +1,5 @@
import { NextResponse } from 'next/server';
-import { exec } from 'child_process';
+import { exec, spawn } from 'child_process';
import { promisify } from 'util';
import { quitBrowser } from '@/lib/browser_setup';
const execPromise = promisify(exec);
@@ -14,7 +14,7 @@ export async function POST() {
const chromePath = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
const chromeLaunchCommand = `"${chromePath}" --remote-debugging-port=9222 --restore-last-session`;
- const chromeProcess = exec(chromeLaunchCommand, { detached: true, stdio: 'ignore' });
+ const chromeProcess = spawn(chromeLaunchCommand, { detached: true, stdio: 'ignore' });
chromeProcess.unref();
@@ -47,6 +47,6 @@ async function quitChrome() {
await execPromise(killCommand);
console.log('chrome killed');
} catch (error) {
- console.log('no chrome process found to kill');
+ console.log('no chrome process found to kill', error);
}
}
\ No newline at end of file
diff --git a/pipes/linkedin_ai_assistant/app/api/chrome/status/route.ts b/pipes/linkedin_ai_assistant/app/api/chrome/status/route.ts
index 52c91e83b..b428c327c 100644
--- a/pipes/linkedin_ai_assistant/app/api/chrome/status/route.ts
+++ b/pipes/linkedin_ai_assistant/app/api/chrome/status/route.ts
@@ -7,7 +7,7 @@ export async function GET() {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
- const data = await response.json();
+ const data = await response.json() as { webSocketDebuggerUrl: string };
return NextResponse.json({
wsUrl: data.webSocketDebuggerUrl,
diff --git a/pipes/linkedin_ai_assistant/app/api/messages/check/route.ts b/pipes/linkedin_ai_assistant/app/api/messages/check/route.ts
index 0268012de..9554054f9 100644
--- a/pipes/linkedin_ai_assistant/app/api/messages/check/route.ts
+++ b/pipes/linkedin_ai_assistant/app/api/messages/check/route.ts
@@ -7,7 +7,7 @@ export async function POST() {
return NextResponse.json(result);
} catch (error) {
return NextResponse.json(
- { success: false, error: error.message },
+ { success: false, error: (error as Error).message },
{ status: 500 }
);
}
diff --git a/pipes/linkedin_ai_assistant/app/api/workflow/status/route.ts b/pipes/linkedin_ai_assistant/app/api/workflow/status/route.ts
index 738fabace..4eb49f6d7 100644
--- a/pipes/linkedin_ai_assistant/app/api/workflow/status/route.ts
+++ b/pipes/linkedin_ai_assistant/app/api/workflow/status/route.ts
@@ -1,45 +1,6 @@
-import { NextResponse } from 'next/server';
-
-type WorkflowStep = {
- step: string;
- status: 'pending' | 'running' | 'done' | 'error';
- details?: string;
-};
-
-type QueueStats = {
- total: number;
- alreadyVisited: number;
- alreadyQueued: number;
- newlyQueued: number;
- currentQueueSize: number;
- totalVisited: number;
-};
+import { setRunningState, currentSteps, queueStats } from './state';
let isRunning = false;
-let currentSteps: WorkflowStep[] = [];
-let queueStats: QueueStats | null = null;
-
-export function setRunningState(state: boolean) {
- isRunning = state;
- if (state) {
- currentSteps = [];
- queueStats = null;
- }
-}
-
-export function updateWorkflowStep(step: string, status: WorkflowStep['status'], details?: string) {
- const existingStep = currentSteps.find(s => s.step === step);
- if (existingStep) {
- existingStep.status = status;
- existingStep.details = details;
- } else {
- currentSteps.push({ step, status, details });
- }
-}
-
-export function updateQueueStats(stats: QueueStats) {
- queueStats = stats;
-}
export async function GET() {
return new Response(JSON.stringify({
diff --git a/pipes/linkedin_ai_assistant/app/api/workflow/status/state.ts b/pipes/linkedin_ai_assistant/app/api/workflow/status/state.ts
new file mode 100644
index 000000000..ed36315c8
--- /dev/null
+++ b/pipes/linkedin_ai_assistant/app/api/workflow/status/state.ts
@@ -0,0 +1,48 @@
+type WorkflowStep = {
+ step: string;
+ status: 'pending' | 'running' | 'done' | 'error';
+ details?: string;
+};
+
+type QueueStats = {
+ total: number;
+ alreadyVisited: number;
+ alreadyQueued: number;
+ newlyQueued: number;
+ currentQueueSize: number;
+ totalVisited: number;
+};
+
+let isRunning = false;
+export let currentSteps: WorkflowStep[] = [];
+export let queueStats: QueueStats | null = null;
+
+export function setRunningState(state: boolean) {
+ isRunning = state;
+ if (state) {
+ currentSteps = [];
+ queueStats = null;
+ }
+}
+
+export function updateWorkflowStep(step: string, status: WorkflowStep['status'], details?: string) {
+ const existingStep = currentSteps.find(s => s.step === step);
+ if (existingStep) {
+ existingStep.status = status;
+ existingStep.details = details;
+ } else {
+ currentSteps.push({ step, status, details });
+ }
+}
+
+export function updateQueueStats(stats: QueueStats) {
+ queueStats = stats;
+}
+
+export function getState() {
+ return {
+ isRunning,
+ steps: currentSteps,
+ queueStats
+ };
+}
\ No newline at end of file
diff --git a/pipes/linkedin_ai_assistant/bun.lockb b/pipes/linkedin_ai_assistant/bun.lockb
index 634dfe9b5..754560f70 100755
Binary files a/pipes/linkedin_ai_assistant/bun.lockb and b/pipes/linkedin_ai_assistant/bun.lockb differ
diff --git a/pipes/linkedin_ai_assistant/components/settings_editor.tsx b/pipes/linkedin_ai_assistant/components/settings_editor.tsx
index 49a2c04a2..eb72447b3 100644
--- a/pipes/linkedin_ai_assistant/components/settings_editor.tsx
+++ b/pipes/linkedin_ai_assistant/components/settings_editor.tsx
@@ -10,7 +10,7 @@ import { ChevronDown, Loader2 } from "lucide-react";
import { debounce } from "lodash";
interface TemplateEditorProps {
- initialTemplate: any;
+ initialTemplate: unknown;
defaultOpen?: boolean;
}
@@ -182,7 +182,7 @@ export default function TemplateEditor({ initialTemplate, defaultOpen = true }:
<textarea
className="w-full min-h-[100px] p-4 border rounded-lg font-mono text-sm
bg-white dark:bg-black text-black dark:text-white resize-vertical"
- value={value}
+ value={value as string}
onChange={(e) => handleChange(key, e.target.value)}
placeholder={`Enter ${key}...`}
/>
diff --git a/pipes/linkedin_ai_assistant/components/state_viewer.tsx b/pipes/linkedin_ai_assistant/components/state_viewer.tsx
index facb1e690..1b0b14887 100644
--- a/pipes/linkedin_ai_assistant/components/state_viewer.tsx
+++ b/pipes/linkedin_ai_assistant/components/state_viewer.tsx
@@ -371,8 +371,8 @@ export default function StateViewer({ defaultOpen = true }: StateViewerProps) {
}
transition={{ duration: 0.5 }}
>
- {Object.entries(profile.actions)
- .sort(([_actionA, statusA], [_actionB, statusB]) => {
+ {Object.entries(profile.actions as Record<string, string>)
+ .sort(([, statusA], [, statusB]) => {
return getActionPriority(statusA) - getActionPriority(statusB);
})
.map(([action, status]) => (
diff --git a/pipes/linkedin_ai_assistant/lib/logic_sequence/check_messages.ts b/pipes/linkedin_ai_assistant/lib/logic_sequence/check_messages.ts
index a98c51154..dcd09f661 100644
--- a/pipes/linkedin_ai_assistant/lib/logic_sequence/check_messages.ts
+++ b/pipes/linkedin_ai_assistant/lib/logic_sequence/check_messages.ts
@@ -87,6 +87,6 @@ export async function startMessageCheck() {
return { success: true };
} catch (error) {
console.error('message check automation failed:', error);
- return { success: false, error: error.message };
+ return { success: false, error: (error as Error).message };
}
}
\ No newline at end of file
diff --git a/pipes/linkedin_ai_assistant/lib/logic_sequence/harvest_connections.ts b/pipes/linkedin_ai_assistant/lib/logic_sequence/harvest_connections.ts
index aab5ce5ed..b33e926c1 100644
--- a/pipes/linkedin_ai_assistant/lib/logic_sequence/harvest_connections.ts
+++ b/pipes/linkedin_ai_assistant/lib/logic_sequence/harvest_connections.ts
@@ -1,5 +1,4 @@
import { Page } from 'puppeteer-core';
-import { navigateToSearch } from '../simple_actions/go_to_search_results';
import {
loadConnections,
saveConnection,
@@ -8,7 +7,7 @@ import {
updateConnectionsSent,
} from '../storage/storage';
import { setupBrowser } from '../browser_setup';
-import { updateWorkflowStep } from '../../app/api/workflow/status/route';
+import { updateWorkflowStep } from '../../app/api/workflow/status/state';
import { EventEmitter } from 'events';
import { closeAllMessageDialogues } from '../simple_actions/close_dialogues';
import { cleanProfileUrl } from '../simple_actions/extract_profiles_from_search_results';
@@ -84,7 +83,6 @@ export async function startHarvesting(
console.log('Starting harvesting process');
// Load existing connections
- const connections = await loadConnections();
updateWorkflowStep('setup', 'done', 'connections loaded');
// Browser setup
@@ -96,7 +94,7 @@ export async function startHarvesting(
throw new Error('chrome not connected');
}
- const { browser, page } = await setupBrowser(statusData.wsUrl);
+ const { page } = await setupBrowser(statusData.wsUrl);
updateWorkflowStep('browser', 'done', 'browser connected');
// Navigate to LinkedIn search results
@@ -320,7 +318,7 @@ async function clickNextConnectButton(
const profileLink = container.querySelector(
'a.EvQUJBaxIRgFetdTQjAXvpGhCNvVbYEbE'
);
- return profileLink?.href || null;
+ return profileLink?.getAttribute('href') || null;
}, connectButton);
if (!profileUrl) {
@@ -635,7 +633,7 @@ export async function navigateToSearch(
});
} catch (error) {
// If navigation was aborted but page loaded, we can continue
- if (error.message.includes('net::ERR_ABORTED')) {
+ if ((error as Error).message.includes('net::ERR_ABORTED')) {
// Verify page actually loaded by checking for key elements
try {
await page.waitForSelector(
diff --git a/pipes/linkedin_ai_assistant/lib/logic_sequence/intro_requester.ts b/pipes/linkedin_ai_assistant/lib/logic_sequence/intro_requester.ts
index 39c2adee9..f852321a0 100644
--- a/pipes/linkedin_ai_assistant/lib/logic_sequence/intro_requester.ts
+++ b/pipes/linkedin_ai_assistant/lib/logic_sequence/intro_requester.ts
@@ -24,7 +24,7 @@ import { clickSend } from '../simple_actions/click_send';
import { cleanProfileUrl } from '../simple_actions/extract_profiles_from_search_results';
import { closeAllMessageDialogues } from '../simple_actions/close_dialogues';
import { hasRecentMessages } from '../simple_actions/check_recent_messages';
-import { setRunningState, updateWorkflowStep, updateQueueStats } from '../../app/api/workflow/status/route';
+import { setRunningState, updateWorkflowStep, updateQueueStats } from '../../app/api/workflow/status/state';
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
@@ -245,7 +245,7 @@ export async function startAutomation(maxProfiles: number = Infinity) {
} catch (error) {
console.error('automation failed:', error);
- updateWorkflowStep('error', 'error', error.message);
+ updateWorkflowStep('error', 'error', (error as Error).message);
} finally {
setRunningState(false);
}
diff --git a/pipes/linkedin_ai_assistant/lib/simple_actions/click_first_connect_button.ts b/pipes/linkedin_ai_assistant/lib/simple_actions/click_first_connect_button.ts
index 4bd199910..290df382a 100644
--- a/pipes/linkedin_ai_assistant/lib/simple_actions/click_first_connect_button.ts
+++ b/pipes/linkedin_ai_assistant/lib/simple_actions/click_first_connect_button.ts
@@ -19,7 +19,7 @@ export async function clickFirstConnectButton(page: Page): Promise<{
// Get profile URL before clicking connect
const profileUrl = await page.evaluate(() => {
const link = document.querySelector('a.EvQUJBaxIRgFetdTQjAXvpGhCNvVbYEbE');
- return link?.href;
+ return link?.getAttribute('href');
});
console.log('found connect button');
@@ -56,10 +56,10 @@ export async function clickFirstConnectButton(page: Page): Promise<{
}
} catch {
// No weekly limit modal appeared, connection was successful
- return { success: true, profileUrl };
+ return { success: true, profileUrl: profileUrl || undefined };
}
- return { success: true, profileUrl };
+ return { success: true, profileUrl: profileUrl || undefined };
} catch (e) {
console.error('failed to click connect button:', e);
return { success: false };
diff --git a/pipes/linkedin_ai_assistant/lib/simple_actions/extract_messages.ts b/pipes/linkedin_ai_assistant/lib/simple_actions/extract_messages.ts
index 00890e48f..e9c5ce120 100644
--- a/pipes/linkedin_ai_assistant/lib/simple_actions/extract_messages.ts
+++ b/pipes/linkedin_ai_assistant/lib/simple_actions/extract_messages.ts
@@ -22,8 +22,8 @@ export async function getMessages(page: Page): Promise<Message[]> {
const messageElements = document.querySelectorAll('.msg-s-message-list__event');
console.log(`found ${messageElements.length} message events`);
- let lastSender = null;
- let lastTimestamp = null;
+ let lastSender: string | null = null;
+ let lastTimestamp: string | null = null;
return Array.from(messageElements).map(el => {
// Try multiple selectors for sender
const senderSelectors = [
@@ -71,7 +71,7 @@ export async function getMessages(page: Page): Promise<Message[]> {
});
// Standardize timestamps before returning
- const messages = standardizeTimestamps(rawMessages);
+ const messages = standardizeTimestamps(rawMessages as Message[]);
console.log('standardized messages:', JSON.stringify(messages, null, 2));
return messages;
diff --git a/pipes/linkedin_ai_assistant/lib/simple_actions/test_click_connect_button.ts b/pipes/linkedin_ai_assistant/lib/simple_actions/test_click_connect_button.ts
index 2b06b1d43..7c53d1f00 100644
--- a/pipes/linkedin_ai_assistant/lib/simple_actions/test_click_connect_button.ts
+++ b/pipes/linkedin_ai_assistant/lib/simple_actions/test_click_connect_button.ts
@@ -1,5 +1,5 @@
-const { setupBrowser } = require('../browser_setup');
-const { clickFirstConnectButton } = require('./click_first_connect_button');
+import { setupBrowser } from '../browser_setup';
+import { clickFirstConnectButton } from './click_first_connect_button';
async function testClickConnect() {
try {
diff --git a/pipes/linkedin_ai_assistant/lib/simple_actions/test_click_message.ts b/pipes/linkedin_ai_assistant/lib/simple_actions/test_click_message.ts
index 5f0bb26d8..5d889ec0e 100644
--- a/pipes/linkedin_ai_assistant/lib/simple_actions/test_click_message.ts
+++ b/pipes/linkedin_ai_assistant/lib/simple_actions/test_click_message.ts
@@ -1,5 +1,5 @@
-const { setupBrowser } = require('../browser_setup');
-const { clickFirstMessageButton } = require('./click_message');
+import { setupBrowser } from '../browser_setup';
+import { clickFirstMessageButton } from './click_message';
async function testClickMessage() {
try {
diff --git a/pipes/linkedin_ai_assistant/lib/simple_actions/test_extract_messages.ts b/pipes/linkedin_ai_assistant/lib/simple_actions/test_extract_messages.ts
index c9dd82a79..ad36c7b87 100644
--- a/pipes/linkedin_ai_assistant/lib/simple_actions/test_extract_messages.ts
+++ b/pipes/linkedin_ai_assistant/lib/simple_actions/test_extract_messages.ts
@@ -1,5 +1,5 @@
-const { setupBrowser } = require('../browser_setup');
-const { getMessages } = require('./extract_messages');
+import { setupBrowser } from '../browser_setup';
+import { getMessages } from './extract_messages';
async function testExtractMessages() {
try {
diff --git a/pipes/linkedin_ai_assistant/package.json b/pipes/linkedin_ai_assistant/package.json
index 9419bf63e..678819d95 100644
--- a/pipes/linkedin_ai_assistant/package.json
+++ b/pipes/linkedin_ai_assistant/package.json
@@ -14,6 +14,7 @@
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.1",
"@screenpipe/js": "latest",
+ "@screenpipe/browser": "0.1.12",
"@sentry/nextjs": "^8.42.0",
"@tauri-apps/api": "^2.1.1",
"chrome-launcher": "^1.1.2",
@@ -41,8 +42,6 @@
"@types/react": "^18",
"@types/react-dom": "^18",
"bun-types": "latest",
- "eslint": "^8",
- "eslint-config-next": "14.2.15",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
diff --git a/pipes/linkedin_ai_assistant/tsconfig.json b/pipes/linkedin_ai_assistant/tsconfig.json
index 931fb93fe..454914a40 100644
--- a/pipes/linkedin_ai_assistant/tsconfig.json
+++ b/pipes/linkedin_ai_assistant/tsconfig.json
@@ -1,22 +1,19 @@
{
"compilerOptions": {
- "lib": [
- "dom",
- "dom.iterable",
- "esnext"
- ],
+ "target": "ES2017",
+ "lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
- "strict": false,
+ "strict": true,
"noEmit": true,
- "incremental": true,
- "module": "esnext",
"esModuleInterop": true,
- "moduleResolution": "node",
+ "module": "esnext",
+ "moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
- "baseUrl": ".",
+ "incremental": true,
+ "baseUrl": ".",
"paths": {
"@/*": [
"./*"
@@ -27,15 +24,7 @@
"name": "next"
}
],
- "target": "ES2017"
},
- "include": [
- "next-env.d.ts",
- ".next/types/**/*.ts",
- "**/*.ts",
- "**/*.tsx"
- ],
- "exclude": [
- "node_modules"
- ]
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "exclude": ["node_modules"]
}
diff --git a/pipes/meeting/bun.lockb b/pipes/meeting/bun.lockb
index ab47763d5..378c8d1e8 100755
Binary files a/pipes/meeting/bun.lockb and b/pipes/meeting/bun.lockb differ
diff --git a/pipes/meeting/package.json b/pipes/meeting/package.json
index d8a876105..18a2e5ad6 100644
--- a/pipes/meeting/package.json
+++ b/pipes/meeting/package.json
@@ -23,6 +23,7 @@
"@radix-ui/react-toast": "^1.2.3",
"@radix-ui/react-tooltip": "^1.1.5",
"@screenpipe/js": "0.1.10-beta.24",
+ "@screenpipe/browser": "0.1.12",
"@shadcn/ui": "^0.0.4",
"@tanstack/react-query": "^5.62.7",
"@types/js-levenshtein": "^1.1.3",
diff --git a/pipes/meeting/src/lib/hooks/use-settings.tsx b/pipes/meeting/src/lib/hooks/use-settings.tsx
index ffbb35ea0..0595e358a 100644
--- a/pipes/meeting/src/lib/hooks/use-settings.tsx
+++ b/pipes/meeting/src/lib/hooks/use-settings.tsx
@@ -1,7 +1,7 @@
"use client";
import { useState, useEffect } from "react";
-import type { Settings } from "@screenpipe/js";
+import type { Settings } from "@screenpipe/browser";
export function useSettings() {
const defaultSettings: Settings = {
diff --git a/pipes/memories/package.json b/pipes/memories/package.json
index ae926f192..d48d3ea61 100644
--- a/pipes/memories/package.json
+++ b/pipes/memories/package.json
@@ -23,6 +23,7 @@
"@radix-ui/react-toast": "^1.2.3",
"@radix-ui/react-tooltip": "^1.1.5",
"@screenpipe/js": "latest",
+ "@screenpipe/browser": "0.1.12",
"@shadcn/ui": "^0.0.4",
"@tanstack/react-query": "^5.62.7",
"@types/js-levenshtein": "^1.1.3",
diff --git a/pipes/memories/src/components/memories-gallery.tsx b/pipes/memories/src/components/memories-gallery.tsx
index 18d7cc162..27d611b6b 100644
--- a/pipes/memories/src/components/memories-gallery.tsx
+++ b/pipes/memories/src/components/memories-gallery.tsx
@@ -6,7 +6,7 @@ import { Play, Pause, Calendar } from "lucide-react";
import { format } from "date-fns";
import { Button } from "@/components/ui/button";
import { useToast } from "@/components/ui/use-toast";
-import { pipe, ContentItem } from "@screenpipe/js";
+import { pipe, ContentItem } from "@screenpipe/browser";
import { VideoComponent } from "@/components/video";
import { Skeleton } from "@/components/ui/skeleton";
diff --git a/pipes/memories/src/lib/hooks/use-settings.tsx b/pipes/memories/src/lib/hooks/use-settings.tsx
index 4ed2066eb..a24af7855 100644
--- a/pipes/memories/src/lib/hooks/use-settings.tsx
+++ b/pipes/memories/src/lib/hooks/use-settings.tsx
@@ -1,7 +1,7 @@
"use client";
import { useState, useEffect } from "react";
-import type { Settings } from "@screenpipe/js";
+import type { Settings } from "@screenpipe/browser";
export function useSettings() {
const defaultSettings: Settings = {
diff --git a/pipes/obsidian/bun.lockb b/pipes/obsidian/bun.lockb
index aac728970..784701e92 100755
Binary files a/pipes/obsidian/bun.lockb and b/pipes/obsidian/bun.lockb differ
diff --git a/pipes/obsidian/package.json b/pipes/obsidian/package.json
index 5e1bd3122..4fc125f61 100644
--- a/pipes/obsidian/package.json
+++ b/pipes/obsidian/package.json
@@ -23,6 +23,7 @@
"@radix-ui/react-toast": "^1.2.3",
"@radix-ui/react-tooltip": "^1.1.5",
"@screenpipe/js": "0.1.10-beta.24",
+ "@screenpipe/browser": "0.1.12",
"@shadcn/ui": "^0.0.4",
"@tanstack/react-query": "^5.62.7",
"@types/js-levenshtein": "^1.1.3",
diff --git a/pipes/obsidian/src/app/api/log/route.ts b/pipes/obsidian/src/app/api/log/route.ts
index 444738f49..cc21a6739 100644
--- a/pipes/obsidian/src/app/api/log/route.ts
+++ b/pipes/obsidian/src/app/api/log/route.ts
@@ -85,11 +85,11 @@ async function syncLogToObsidian(
export async function GET() {
try {
const settings = await pipe.settings.getNamespaceSettings("obsidian");
- const interval = settings.interval || 3600000;
- const obsidianPath = settings.path;
- const customPrompt = settings.prompt;
- const pageSize = settings.pageSize || 100;
- const model = settings.aiModel;
+ const interval = settings?.interval || 3600000;
+ const obsidianPath = settings?.path;
+ const customPrompt = settings?.prompt;
+ const pageSize = settings?.pageSize || 100;
+ const model = settings?.aiModel;
if (!obsidianPath) {
return NextResponse.json(
diff --git a/pipes/obsidian/src/lib/hooks/use-settings.tsx b/pipes/obsidian/src/lib/hooks/use-settings.tsx
index 4ed2066eb..a24af7855 100644
--- a/pipes/obsidian/src/lib/hooks/use-settings.tsx
+++ b/pipes/obsidian/src/lib/hooks/use-settings.tsx
@@ -1,7 +1,7 @@
"use client";
import { useState, useEffect } from "react";
-import type { Settings } from "@screenpipe/js";
+import type { Settings } from "@screenpipe/browser";
export function useSettings() {
const defaultSettings: Settings = {
diff --git a/pipes/pipe-email-exa-search/bun.lockb b/pipes/pipe-email-exa-search/bun.lockb
index d94e64d77..62ad4c934 100755
Binary files a/pipes/pipe-email-exa-search/bun.lockb and b/pipes/pipe-email-exa-search/bun.lockb differ
diff --git a/pipes/pipe-email-exa-search/package.json b/pipes/pipe-email-exa-search/package.json
index f963472a4..d0f547a33 100644
--- a/pipes/pipe-email-exa-search/package.json
+++ b/pipes/pipe-email-exa-search/package.json
@@ -3,13 +3,15 @@
"module": "pipe.ts",
"type": "module",
"devDependencies": {
- "@types/bun": "latest"
+ "@types/bun": "latest",
+ "@types/nodemailer": "^6.4.17"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
- "@screenpipe/js": "^0.1.3",
+ "@screenpipe/js": "^0.1.13",
+ "@screenpipe/browser": "0.1.12",
"ai": "^4.0.10",
"exa-js": "^1.3.3",
"nodemailer": "^6.9.16",
diff --git a/pipes/pipe-email-exa-search/pipe.ts b/pipes/pipe-email-exa-search/pipe.ts
index bff8f9811..2fbc24245 100644
--- a/pipes/pipe-email-exa-search/pipe.ts
+++ b/pipes/pipe-email-exa-search/pipe.ts
@@ -1,6 +1,6 @@
import * as fs from "node:fs";
import nodemailer from "nodemailer";
-import { ContentItem, pipe } from "@screenpipe/js";
+import { type ContentItem, pipe } from "@screenpipe/js";
import process from "node:process";
import Exa from "exa-js"
import { z } from "zod";
diff --git a/pipes/pipe-for-loom/app/api/file/route.ts b/pipes/pipe-for-loom/app/api/file/route.ts
index 60f6e0e3e..92eadcabd 100644
--- a/pipes/pipe-for-loom/app/api/file/route.ts
+++ b/pipes/pipe-for-loom/app/api/file/route.ts
@@ -24,7 +24,13 @@ export async function GET(req: NextRequest) {
headers.set('Content-Type', contentType);
headers.set('Accept-Ranges', 'bytes');
- return new NextResponse(fileStream, { headers });
+ const transform = new TransformStream();
+ const writer = transform.writable.getWriter();
+
+ fileStream.on('data', (chunk) => writer.write(chunk));
+ fileStream.on('end', () => writer.close());
+
+ return new Response(transform.readable, { headers });
} catch (error :any) {
console.error('Error fetching file:', error);
if (error.code === 'ENOENT') {
diff --git a/pipes/pipe-for-loom/bun.lockb b/pipes/pipe-for-loom/bun.lockb
new file mode 100755
index 000000000..12f6a7f11
Binary files /dev/null and b/pipes/pipe-for-loom/bun.lockb differ
diff --git a/pipes/pipe-for-loom/package.json b/pipes/pipe-for-loom/package.json
index 2cf17b30b..a6021918c 100644
--- a/pipes/pipe-for-loom/package.json
+++ b/pipes/pipe-for-loom/package.json
@@ -29,8 +29,6 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
- "eslint": "^8",
- "eslint-config-next": "14.2.15",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
diff --git a/pipes/pipe-for-loom/tsconfig.json b/pipes/pipe-for-loom/tsconfig.json
index 204de1d85..d8b93235f 100644
--- a/pipes/pipe-for-loom/tsconfig.json
+++ b/pipes/pipe-for-loom/tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
- "target": "es2015",
+ "target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
diff --git a/pipes/pipe-notion-table-logs/bun.lockb b/pipes/pipe-notion-table-logs/bun.lockb
index 183ca4489..e6d3fb1f9 100755
Binary files a/pipes/pipe-notion-table-logs/bun.lockb and b/pipes/pipe-notion-table-logs/bun.lockb differ
diff --git a/pipes/pipe-notion-table-logs/package.json b/pipes/pipe-notion-table-logs/package.json
index 76ca0b212..2c2de2dc9 100644
--- a/pipes/pipe-notion-table-logs/package.json
+++ b/pipes/pipe-notion-table-logs/package.json
@@ -10,7 +10,8 @@
},
"dependencies": {
"@notionhq/client": "^2.2.15",
- "@screenpipe/js": "^0.1.3",
+ "@screenpipe/js": "^0.1.13",
+ "@screenpipe/browser": "0.1.12",
"ai": "^4.0.10",
"ollama-ai-provider": "^1.0.0",
"zod": "^3.23.8"
diff --git a/pipes/pipe-notion-table-logs/pipe.ts b/pipes/pipe-notion-table-logs/pipe.ts
index 22d6eab11..d9b78fa2a 100644
--- a/pipes/pipe-notion-table-logs/pipe.ts
+++ b/pipes/pipe-notion-table-logs/pipe.ts
@@ -2,7 +2,7 @@ import { Client } from "@notionhq/client";
import { z } from "zod";
import { generateObject } from "ai";
import { createOllama } from "ollama-ai-provider";
-import { pipe, ContentItem } from "@screenpipe/js";
+import { pipe, type ContentItem } from "@screenpipe/js";
const engineeringLog = z.object({
title: z.string(),
diff --git a/pipes/pipe-post-questions-on-reddit/bun.lockb b/pipes/pipe-post-questions-on-reddit/bun.lockb
index daea35ddb..d773252fe 100755
Binary files a/pipes/pipe-post-questions-on-reddit/bun.lockb and b/pipes/pipe-post-questions-on-reddit/bun.lockb differ
diff --git a/pipes/pipe-post-questions-on-reddit/package.json b/pipes/pipe-post-questions-on-reddit/package.json
index cd293b868..6976e5ab1 100644
--- a/pipes/pipe-post-questions-on-reddit/package.json
+++ b/pipes/pipe-post-questions-on-reddit/package.json
@@ -3,13 +3,15 @@
"module": "pipe.ts",
"type": "module",
"devDependencies": {
- "@types/bun": "latest"
+ "@types/bun": "latest",
+ "@types/nodemailer": "^6.4.17"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
- "@screenpipe/js": "^0.1.3",
+ "@screenpipe/js": "^0.1.13",
+ "@screenpipe/browser": "0.1.12",
"nodemailer": "^6.9.16"
}
}
\ No newline at end of file
diff --git a/pipes/pipe-post-questions-on-reddit/pipe.ts b/pipes/pipe-post-questions-on-reddit/pipe.ts
index 4d5c9e8fa..112ab94e7 100644
--- a/pipes/pipe-post-questions-on-reddit/pipe.ts
+++ b/pipes/pipe-post-questions-on-reddit/pipe.ts
@@ -1,7 +1,7 @@
import * as fs from "node:fs";
import nodemailer from "nodemailer";
import {
- ContentItem,
+ type ContentItem,
pipe,
} from "@screenpipe/js";
import process from "node:process";
diff --git a/pipes/search/bun.lockb b/pipes/search/bun.lockb
index b9e52cc76..e87d52add 100755
Binary files a/pipes/search/bun.lockb and b/pipes/search/bun.lockb differ
diff --git a/pipes/search/package.json b/pipes/search/package.json
index d8a876105..df126dad8 100644
--- a/pipes/search/package.json
+++ b/pipes/search/package.json
@@ -23,6 +23,7 @@
"@radix-ui/react-toast": "^1.2.3",
"@radix-ui/react-tooltip": "^1.1.5",
"@screenpipe/js": "0.1.10-beta.24",
+ "@screenpipe/browser": "0.1.12",
"@shadcn/ui": "^0.0.4",
"@tanstack/react-query": "^5.62.7",
"@types/js-levenshtein": "^1.1.3",
@@ -59,8 +60,6 @@
"@types/react": "^19",
"@types/react-dom": "^19",
"autoprefixer": "^10.4.20",
- "eslint": "^9",
- "eslint-config-next": "15.1.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.16",
"typescript": "^5"
diff --git a/pipes/search/src/components/search-chat.tsx b/pipes/search/src/components/search-chat.tsx
index e7b93745f..2ca05e03a 100644
--- a/pipes/search/src/components/search-chat.tsx
+++ b/pipes/search/src/components/search-chat.tsx
@@ -4,7 +4,7 @@ import React, { JSX, useEffect, useRef, useState } from "react";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
-import { pipe, ContentItem } from "@screenpipe/js";
+import { pipe, type ContentItem } from "@screenpipe/browser";
import { Skeleton } from "@/components/ui/skeleton";
import { Slider } from "@/components/ui/slider";
import { Switch } from "@/components/ui/switch";
@@ -90,7 +90,7 @@ import {
CommandItem,
Command,
} from "./ui/command";
-import { Speaker } from "@screenpipe/js";
+import { type Speaker } from "@screenpipe/browser";
import {
Popover,
PopoverContent,
@@ -1049,7 +1049,7 @@ export function SearchChat() {
)}
{"tags" in item.content &&
item.content.tags &&
- item.content.tags.map((tag, index) => (
+ item.content.tags.map((tag: string, index: number) => (
<Badge key={index} className="text-xs">
{tag}
</Badge>
diff --git a/pipes/search/src/lib/hooks/use-settings.tsx b/pipes/search/src/lib/hooks/use-settings.tsx
index 18d126fdc..471eb81e5 100644
--- a/pipes/search/src/lib/hooks/use-settings.tsx
+++ b/pipes/search/src/lib/hooks/use-settings.tsx
@@ -1,7 +1,7 @@
"use client";
import { useState, useEffect } from "react";
-import type { Settings } from "@screenpipe/js";
+import type { Settings } from "@screenpipe/browser";
export function useSettings() {
const defaultSettings: Settings = {
diff --git a/pipes/timeline/bun.lockb b/pipes/timeline/bun.lockb
index 02fc5f98a..641cbce03 100755
Binary files a/pipes/timeline/bun.lockb and b/pipes/timeline/bun.lockb differ
diff --git a/pipes/timeline/package.json b/pipes/timeline/package.json
index 77b97c6bb..82702ec26 100644
--- a/pipes/timeline/package.json
+++ b/pipes/timeline/package.json
@@ -24,6 +24,7 @@
"@radix-ui/react-toast": "^1.2.3",
"@radix-ui/react-tooltip": "^1.1.5",
"@screenpipe/js": "0.1.10-beta.24",
+ "@screenpipe/browser": "0.1.12",
"@shadcn/ui": "^0.0.4",
"@tanstack/react-query": "^5.62.7",
"@types/js-levenshtein": "^1.1.3",
@@ -60,8 +61,6 @@
"@types/react": "^19",
"@types/react-dom": "^19",
"autoprefixer": "^10.4.20",
- "eslint": "^9",
- "eslint-config-next": "15.1.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.16",
"typescript": "^5"
diff --git a/pipes/timeline/src/app/page.tsx b/pipes/timeline/src/app/page.tsx
index c2a404813..27d0c7a65 100644
--- a/pipes/timeline/src/app/page.tsx
+++ b/pipes/timeline/src/app/page.tsx
@@ -54,7 +54,7 @@ export default function Timeline() {
const [message, setMessage] = useState<string | null>(null);
const [error, setError] = useState<string | null>(null);
const eventSourceRef = useRef<EventSource | null>(null);
- const retryTimeoutRef = useRef<NodeJS.Timeout>();
+ const retryTimeoutRef = useRef<NodeJS.Timeout | null>(null);
const retryCount = useRef(0);
const [loadedTimeRange, setLoadedTimeRange] = useState<TimeRange | null>(
null
diff --git a/pipes/timeline/src/components/timeline/ai-panel.tsx b/pipes/timeline/src/components/timeline/ai-panel.tsx
index 35a3dc2b3..fd436239c 100644
--- a/pipes/timeline/src/components/timeline/ai-panel.tsx
+++ b/pipes/timeline/src/components/timeline/ai-panel.tsx
@@ -9,7 +9,7 @@ import { Loader2, Send, Square, X, GripHorizontal } from "lucide-react";
import { StreamTimeSeriesResponse } from "@/app/page";
import { useTimelineSelection } from "@/lib/hooks/use-timeline-selection";
import { Agent } from "./agents";
-import { Settings } from "@screenpipe/js";
+import { type Settings } from "@screenpipe/browser";
interface AIPanelProps {
position: { x: number; y: number };
diff --git a/pipes/timeline/src/lib/hooks/use-settings.tsx b/pipes/timeline/src/lib/hooks/use-settings.tsx
index ffbb35ea0..0595e358a 100644
--- a/pipes/timeline/src/lib/hooks/use-settings.tsx
+++ b/pipes/timeline/src/lib/hooks/use-settings.tsx
@@ -1,7 +1,7 @@
"use client";
import { useState, useEffect } from "react";
-import type { Settings } from "@screenpipe/js";
+import type { Settings } from "@screenpipe/browser";
export function useSettings() {
const defaultSettings: Settings = {
diff --git a/screenpipe-js/.gitignore b/screenpipe-js/browser-sdk/.gitignore
similarity index 100%
rename from screenpipe-js/.gitignore
rename to screenpipe-js/browser-sdk/.gitignore
diff --git a/screenpipe-js/browser-sdk/README.md b/screenpipe-js/browser-sdk/README.md
new file mode 100644
index 000000000..6c7dcad0b
--- /dev/null
+++ b/screenpipe-js/browser-sdk/README.md
@@ -0,0 +1,15 @@
+# screenpipe-js
+
+To install dependencies:
+
+```bash
+bun install
+```
+
+To run:
+
+```bash
+bun run ./dist/main.js
+```
+
+This project was created using `bun init` in bun v1.1.42. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
diff --git a/screenpipe-js/browser-sdk/bun.lockb b/screenpipe-js/browser-sdk/bun.lockb
new file mode 100755
index 000000000..0559898c6
Binary files /dev/null and b/screenpipe-js/browser-sdk/bun.lockb differ
diff --git a/screenpipe-js/browser-sdk/package.json b/screenpipe-js/browser-sdk/package.json
new file mode 100644
index 000000000..4cf0b0fa8
--- /dev/null
+++ b/screenpipe-js/browser-sdk/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "@screenpipe/browser",
+ "version": "0.1.12",
+ "type": "module",
+ "main": "./dist/index.cjs",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist"
+ ],
+ "scripts": {
+ "build": "tsup ./src --format esm,cjs --dts --clean",
+ "test": "bun test",
+ "prepublishOnly": "npm run build"
+ },
+ "devDependencies": {
+ "@types/bun": "^1.1.14",
+ "@types/node": "^22.10.4",
+ "bun-types": "latest",
+ "tsup": "^8.0.0"
+ },
+ "dependencies": {
+ "@scarf/scarf": "^1.4.0",
+ "@types/express": "^5.0.0",
+ "@types/node-cron": "^3.0.11",
+ "@types/uuid": "^10.0.0",
+ "express": "^4.21.1",
+ "node-cron": "^3.0.3"
+ },
+ "peerDependencies": {
+ "typescript": "^5.0.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "typesVersions": {
+ "*": {
+ "node": ["./dist/node.d.ts"],
+ "browser": ["./dist/browser.d.ts"]
+ }
+ }
+}
\ No newline at end of file
diff --git a/screenpipe-js/browser.ts b/screenpipe-js/browser-sdk/src/index.ts
similarity index 88%
rename from screenpipe-js/browser.ts
rename to screenpipe-js/browser-sdk/src/index.ts
index c4e97f584..3e698bd2c 100644
--- a/screenpipe-js/browser.ts
+++ b/screenpipe-js/browser-sdk/src/index.ts
@@ -1,16 +1,14 @@
-// browser.ts
import type {
+ InputAction,
+ InputControlResponse,
NotificationOptions,
ScreenpipeQueryParams,
ScreenpipeResponse,
- InputAction,
- InputControlResponse,
-} from "./types";
-
-import { toSnakeCase, convertToCamelCase } from "./next";
+} from "../../common/types";
+import { toSnakeCase, convertToCamelCase } from "../../common/utils";
async function sendInputControl(action: InputAction): Promise<boolean> {
- const apiUrl = process.env.SCREENPIPE_SERVER_URL || "http://localhost:3030";
+ const apiUrl = "http://localhost:3030";
try {
const response = await fetch(`${apiUrl}/experimental/input_control`, {
method: "POST",
@@ -115,7 +113,10 @@ export const pipe: BrowserPipe = {
},
};
-// Export individual functions for more granular usage
-export const sendDesktopNotification = pipe.sendDesktopNotification;
-export const queryScreenpipe = pipe.queryScreenpipe;
-export const input = pipe.input;
+const sendDesktopNotification = pipe.sendDesktopNotification;
+const queryScreenpipe = pipe.queryScreenpipe;
+const input = pipe.input;
+
+export { sendDesktopNotification, queryScreenpipe, input };
+export { toCamelCase, toSnakeCase, convertToCamelCase } from "../../common/utils";
+export * from "../../common/types";
diff --git a/screenpipe-js/browser-sdk/tsconfig.json b/screenpipe-js/browser-sdk/tsconfig.json
new file mode 100644
index 000000000..b1ff481ed
--- /dev/null
+++ b/screenpipe-js/browser-sdk/tsconfig.json
@@ -0,0 +1,27 @@
+{
+ "compilerOptions": {
+ // Enable latest features
+ "lib": ["ESNext", "DOM"],
+ "target": "ESNext",
+ "module": "ESNext",
+ "moduleDetection": "force",
+ "jsx": "react-jsx",
+ "allowJs": true,
+
+ // Bundler mode
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
+ "verbatimModuleSyntax": true,
+ "noEmit": true,
+
+ // Best practices
+ "strict": true,
+ "skipLibCheck": true,
+ "noFallthroughCasesInSwitch": true,
+
+ // Some stricter flags (disabled by default)
+ "noUnusedLocals": false,
+ "noUnusedParameters": false,
+ "noPropertyAccessFromIndexSignature": false
+ }
+}
\ No newline at end of file
diff --git a/screenpipe-js/tsup.config.ts b/screenpipe-js/browser-sdk/tsup.config.ts
similarity index 100%
rename from screenpipe-js/tsup.config.ts
rename to screenpipe-js/browser-sdk/tsup.config.ts
diff --git a/screenpipe-js/bun.lockb b/screenpipe-js/bun.lockb
deleted file mode 100755
index 75025e323..000000000
Binary files a/screenpipe-js/bun.lockb and /dev/null differ
diff --git a/screenpipe-js/types.ts b/screenpipe-js/common/types.ts
similarity index 100%
rename from screenpipe-js/types.ts
rename to screenpipe-js/common/types.ts
diff --git a/screenpipe-js/common/utils.ts b/screenpipe-js/common/utils.ts
new file mode 100644
index 000000000..06e5ebee3
--- /dev/null
+++ b/screenpipe-js/common/utils.ts
@@ -0,0 +1,65 @@
+// Helper functions to flatten/unflatten objects
+const flattenObject = (obj: any, prefix = ""): Record<string, any> => {
+ return Object.keys(obj).reduce((acc: Record<string, any>, k: string) => {
+ const pre = prefix.length ? prefix + "." : "";
+ if (
+ typeof obj[k] === "object" &&
+ obj[k] !== null &&
+ !Array.isArray(obj[k])
+ ) {
+ Object.assign(acc, flattenObject(obj[k], pre + k));
+ } else {
+ acc[pre + k] = obj[k];
+ }
+ return acc;
+ }, {});
+};
+
+const unflattenObject = (obj: Record<string, any>): any => {
+ const result: any = {};
+ for (const key in obj) {
+ const keys = key.split(".");
+ let current = result;
+ for (let i = 0; i < keys.length; i++) {
+ const k = keys[i];
+ if (i === keys.length - 1) {
+ current[k] = obj[key];
+ } else {
+ current[k] = current[k] || {};
+ current = current[k];
+ }
+ }
+ }
+ return result;
+};
+// Helper functions that work in both environments
+function toCamelCase(str: string): string {
+ return str.replace(/([-_][a-z])/g, (group) =>
+ group.toUpperCase().replace("-", "").replace("_", "")
+ );
+}
+
+function toSnakeCase(str: string): string {
+ return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
+}
+
+function convertToCamelCase(obj: any): any {
+ if (Array.isArray(obj)) {
+ return obj.map(convertToCamelCase);
+ } else if (obj !== null && typeof obj === "object") {
+ return Object.keys(obj).reduce((result, key) => {
+ const camelKey = toCamelCase(key);
+ result[camelKey] = convertToCamelCase(obj[key]);
+ return result;
+ }, {} as any);
+ }
+ return obj;
+}
+
+export {
+ flattenObject,
+ unflattenObject,
+ toCamelCase,
+ toSnakeCase,
+ convertToCamelCase,
+};
diff --git a/screenpipe-js/main.ts b/screenpipe-js/main.ts
deleted file mode 100644
index f82954563..000000000
--- a/screenpipe-js/main.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-// main.ts - Universal entry point
-export * from "./types";
-export { toCamelCase, toSnakeCase, convertToCamelCase } from "./next";
-
-// Browser-only exports
-export { sendDesktopNotification, queryScreenpipe, input } from "./browser";
-
-// Export browser pipe as default
-export { pipe as default } from "./browser";
-
-// Note: Node-specific functionality is not exported in browser bundle
-// It will be handled by the package.json "exports" field
diff --git a/screenpipe-js/next.ts b/screenpipe-js/next.ts
deleted file mode 100644
index 78ccc0834..000000000
--- a/screenpipe-js/next.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-// next.ts
-// Types and utilities shared between browser and Node environments
-export * from "./types";
-
-// Helper functions that work in both environments
-export function toCamelCase(str: string): string {
- return str.replace(/([-_][a-z])/g, (group) =>
- group.toUpperCase().replace("-", "").replace("_", "")
- );
-}
-
-export function toSnakeCase(str: string): string {
- return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
-}
-
-export function convertToCamelCase(obj: any): any {
- if (Array.isArray(obj)) {
- return obj.map(convertToCamelCase);
- } else if (obj !== null && typeof obj === "object") {
- return Object.keys(obj).reduce((result, key) => {
- const camelKey = toCamelCase(key);
- result[camelKey] = convertToCamelCase(obj[key]);
- return result;
- }, {} as any);
- }
- return obj;
-}
diff --git a/screenpipe-js/node-sdk/.gitignore b/screenpipe-js/node-sdk/.gitignore
new file mode 100644
index 000000000..4175924ec
--- /dev/null
+++ b/screenpipe-js/node-sdk/.gitignore
@@ -0,0 +1,3 @@
+node_modules
+dist
+
diff --git a/screenpipe-js/node-sdk/README.md b/screenpipe-js/node-sdk/README.md
new file mode 100644
index 000000000..ae2141bcb
--- /dev/null
+++ b/screenpipe-js/node-sdk/README.md
@@ -0,0 +1,15 @@
+# test-screenpipe-node-sdk
+
+To install dependencies:
+
+```bash
+bun install
+```
+
+To run:
+
+```bash
+bun run ./dist/main.js
+```
+
+This project was created using `bun init` in bun v1.1.42. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
diff --git a/screenpipe-js/node-sdk/bun.lockb b/screenpipe-js/node-sdk/bun.lockb
new file mode 100755
index 000000000..70589fdcd
Binary files /dev/null and b/screenpipe-js/node-sdk/bun.lockb differ
diff --git a/screenpipe-js/node-sdk/package.json b/screenpipe-js/node-sdk/package.json
new file mode 100644
index 000000000..e6f8c6b8f
--- /dev/null
+++ b/screenpipe-js/node-sdk/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "@screenpipe/js",
+ "version": "0.1.13",
+ "type": "module",
+ "main": "./dist/index.cjs",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist"
+ ],
+ "scripts": {
+ "build": "tsup ./src --format esm,cjs --dts --clean",
+ "test": "bun test",
+ "prepublishOnly": "npm run build"
+ },
+ "devDependencies": {
+ "@types/bun": "^1.1.14",
+ "@types/node": "^22.10.4",
+ "bun-types": "latest",
+ "tsup": "^8.0.0"
+ },
+ "dependencies": {
+ "@scarf/scarf": "^1.4.0",
+ "@types/express": "^5.0.0",
+ "@types/node-cron": "^3.0.11",
+ "@types/uuid": "^10.0.0",
+ "express": "^4.21.1",
+ "node-cron": "^3.0.3"
+ },
+ "peerDependencies": {
+ "typescript": "^5.0.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "typesVersions": {
+ "*": {
+ "node": ["./dist/node.d.ts"],
+ "browser": ["./dist/browser.d.ts"]
+ }
+ }
+}
\ No newline at end of file
diff --git a/screenpipe-js/node-sdk/src/InboxManager.ts b/screenpipe-js/node-sdk/src/InboxManager.ts
new file mode 100644
index 000000000..235341063
--- /dev/null
+++ b/screenpipe-js/node-sdk/src/InboxManager.ts
@@ -0,0 +1,58 @@
+import { ChildProcess, fork } from "child_process";
+import type { InboxMessage } from "../../common/types";
+import { type AddressInfo, createServer } from "net";
+
+async function getAvailablePort(): Promise<number> {
+ return new Promise((resolve, reject) => {
+ const server = createServer();
+ server.unref();
+ server.on("error", reject);
+ server.listen(0, () => {
+ const port = (server.address() as AddressInfo).port;
+ server.close(() => resolve(port));
+ });
+ });
+}
+
+export class InboxManager {
+ private actionServerPort?: number;
+ private actionServerProcess?: ChildProcess;
+
+ async send(message: InboxMessage): Promise<boolean> {
+ if (!this.actionServerPort) {
+ this.actionServerPort = await getAvailablePort();
+ this.actionServerProcess = fork("./inbox-server.js", [
+ this.actionServerPort.toString(),
+ ]);
+ }
+
+ if (message.actions) {
+ message.actions = message.actions.map((action) => {
+ const actionId = crypto.randomUUID();
+ return {
+ label: action.label,
+ action: actionId,
+ port: this.actionServerPort,
+ callback: action.callback,
+ };
+ });
+ }
+
+ try {
+ const response = await fetch("http://localhost:11435/inbox", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({
+ ...message,
+ type: "inbox",
+ actionServerPort: this.actionServerPort,
+ }),
+ });
+
+ return response.ok;
+ } catch (error) {
+ console.error("failed to send inbox message:", error);
+ return false;
+ }
+ }
+}
diff --git a/screenpipe-js/node-sdk/src/Scheduler.ts b/screenpipe-js/node-sdk/src/Scheduler.ts
new file mode 100644
index 000000000..ebfd7a22f
--- /dev/null
+++ b/screenpipe-js/node-sdk/src/Scheduler.ts
@@ -0,0 +1,24 @@
+import { Task } from "./Task";
+import cron from "node-cron";
+
+export class Scheduler {
+ private tasks: Task[] = [];
+
+ constructor() {}
+
+ task(name: string): Task {
+ const task = new Task(name);
+ this.tasks.push(task);
+ return task;
+ }
+
+ start() {
+ this.tasks.forEach((task) => task.schedule());
+ }
+
+ async stop(): Promise<void> {
+ cron.getTasks().forEach((task: any) => task.stop());
+
+ this.tasks = [];
+ }
+}
diff --git a/screenpipe-js/node-sdk/src/SettingsManger.ts b/screenpipe-js/node-sdk/src/SettingsManger.ts
new file mode 100644
index 000000000..e3015c46d
--- /dev/null
+++ b/screenpipe-js/node-sdk/src/SettingsManger.ts
@@ -0,0 +1,195 @@
+import fs from "fs/promises";
+import path from "path";
+import os from "os";
+import { flattenObject, unflattenObject } from "../../common/utils";
+import type { Settings } from "../../common/types";
+
+const DEFAULT_SETTINGS: Settings = {
+ openaiApiKey: "",
+ deepgramApiKey: "",
+ aiModel: "gpt-4",
+ aiUrl: "https://api.openai.com/v1",
+ customPrompt: `Rules:
+ - You can analyze/view/show/access videos to the user by putting .mp4 files in a code block (we'll render it) like this: \`/users/video.mp4\`, use the exact, absolute, file path from file_path property
+ - Do not try to embed video in links (e.g. [](.mp4) or https://.mp4) instead put the file_path in a code block using backticks
+ - Do not put video in multiline code block it will not render the video (e.g. \`\`\`bash\n.mp4\`\`\` IS WRONG) instead using inline code block with single backtick
+ - Always answer my question/intent, do not make up things`,
+ port: 3030,
+ dataDir: "default",
+ disableAudio: false,
+ ignoredWindows: [],
+ includedWindows: [],
+ aiProviderType: "openai",
+ embeddedLLM: {
+ enabled: false,
+ model: "llama3.2:1b-instruct-q4_K_M",
+ port: 11438,
+ },
+ enableFrameCache: true,
+ enableUiMonitoring: false,
+ aiMaxContextChars: 128000,
+ user: {},
+};
+
+export class SettingsManager {
+ private settings: Settings;
+ private storePath: string;
+ private initialized: boolean = false;
+
+ constructor() {
+ this.settings = DEFAULT_SETTINGS;
+ this.storePath = ""; // will be set in init()
+ }
+
+ private async getStorePath(): Promise<string> {
+ const platform = process.platform;
+ const home = os.homedir();
+
+ // Get base screenpipe data directory path based on platform
+ let baseDir: string;
+ switch (platform) {
+ case "darwin":
+ baseDir = path.join(
+ home,
+ "Library",
+ "Application Support",
+ "screenpipe"
+ );
+ break;
+ case "linux":
+ const xdgData =
+ process.env.XDG_DATA_HOME || path.join(home, ".local", "share");
+ baseDir = path.join(xdgData, "screenpipe");
+ break;
+ case "win32":
+ baseDir = path.join(
+ process.env.LOCALAPPDATA || path.join(home, "AppData", "Local"),
+ "screenpipe"
+ );
+ break;
+ default:
+ throw new Error(`unsupported platform: ${platform}`);
+ }
+
+ // First check profiles.bin to get active profile
+ const profilesPath = path.join(baseDir, "profiles.bin");
+ let activeProfile = "default";
+ try {
+ const profilesData = await fs.readFile(profilesPath);
+ const profiles = JSON.parse(profilesData.toString());
+ if (profiles.activeProfile) {
+ activeProfile = profiles.activeProfile;
+ }
+ } catch (error) {
+ // Profiles file doesn't exist yet, use default
+ }
+
+ // Return store path for active profile
+ return activeProfile === "default"
+ ? path.join(baseDir, "store.bin")
+ : path.join(baseDir, `store-${activeProfile}.bin`);
+ }
+
+ async init(): Promise<void> {
+ if (this.initialized) return;
+
+ if (!fs || !path) throw new Error("failed to load required modules");
+
+ this.storePath = await this.getStorePath();
+
+ try {
+ await fs.mkdir(path.dirname(this.storePath), { recursive: true });
+ const data = await fs.readFile(this.storePath);
+ const rawSettings = JSON.parse(data.toString());
+ this.settings = { ...DEFAULT_SETTINGS, ...unflattenObject(rawSettings) };
+ this.initialized = true;
+ } catch (error) {
+ if ((error as { code?: string }).code === "ENOENT") {
+ await this.save();
+ this.initialized = true;
+ } else {
+ throw error;
+ }
+ }
+ }
+
+ async save(): Promise<void> {
+ await fs.mkdir(path.dirname(this.storePath), { recursive: true });
+ const flattenedSettings = flattenObject(this.settings);
+ await fs.writeFile(
+ this.storePath,
+ JSON.stringify(flattenedSettings, null, 2)
+ );
+ }
+
+ async get<K extends keyof Settings>(key: K): Promise<Settings[K]> {
+ if (!this.initialized) await this.init();
+ return this.settings[key];
+ }
+
+ async set<K extends keyof Settings>(
+ key: K,
+ value: Settings[K]
+ ): Promise<void> {
+ if (!this.initialized) await this.init();
+ this.settings[key] = value;
+ await this.save();
+ }
+
+ async getAll(): Promise<Settings> {
+ await this.init();
+ return { ...this.settings };
+ }
+
+ async update(newSettings: Partial<Settings>): Promise<void> {
+ if (!this.initialized) await this.init();
+ this.settings = { ...this.settings, ...newSettings };
+ await this.save();
+ }
+
+ async reset(): Promise<void> {
+ this.settings = { ...DEFAULT_SETTINGS };
+ await this.save();
+ }
+
+ async resetKey<K extends keyof Settings>(key: K): Promise<void> {
+ if (!this.initialized) await this.init();
+ this.settings[key] = DEFAULT_SETTINGS[key];
+ await this.save();
+ }
+
+ async getCustomSetting(namespace: string, key: string): Promise<any> {
+ if (!this.initialized) await this.init();
+ return this.settings.customSettings?.[namespace]?.[key];
+ }
+
+ async setCustomSetting(
+ namespace: string,
+ key: string,
+ value: any
+ ): Promise<void> {
+ if (!this.initialized) await this.init();
+ this.settings.customSettings = this.settings.customSettings || {};
+ this.settings.customSettings[namespace] =
+ this.settings.customSettings[namespace] || {};
+ this.settings.customSettings[namespace][key] = value;
+ await this.save();
+ }
+
+ async getNamespaceSettings(
+ namespace: string
+ ): Promise<Record<string, any> | undefined> {
+ if (!this.initialized) await this.init();
+ return this.settings.customSettings?.[namespace];
+ }
+
+ async updateNamespaceSettings(
+ namespace: string,
+ settings: Record<string, any>
+ ): Promise<void> {
+ if (!this.initialized) await this.init();
+ this.settings.customSettings = this.settings.customSettings || {};
+ this.settings.customSettings[namespace] = settings;
+ await this.save();
+ }
+}
diff --git a/screenpipe-js/node-sdk/src/Task.ts b/screenpipe-js/node-sdk/src/Task.ts
new file mode 100644
index 000000000..cf194d2b8
--- /dev/null
+++ b/screenpipe-js/node-sdk/src/Task.ts
@@ -0,0 +1,69 @@
+import cron from "node-cron";
+
+export class Task {
+ private _name: string;
+ private _interval: string | number;
+ private _time: string | null = null;
+ private _handler: (() => Promise<void>) | null = null;
+ private _cronTask: any | null = null;
+
+ constructor(name: string) {
+ this._name = name;
+ this._interval = 0;
+ }
+
+ every(interval: string | number): Task {
+ this._interval = interval;
+ return this;
+ }
+
+ at(time: string): Task {
+ this._time = time;
+ return this;
+ }
+
+ do(handler: () => Promise<void>): Task {
+ this._handler = handler;
+ return this;
+ }
+
+ async schedule(): Promise<void> {
+ if (!this._handler) {
+ throw new Error(`No handler defined for task: ${this._name}`);
+ }
+ const cronExpression = this.toCronExpression();
+
+ this._cronTask = cron.schedule(cronExpression, this._handler, {
+ name: this._name,
+ });
+ }
+
+ stop(): void {
+ return this._cronTask?.stop();
+ }
+
+ private toCronExpression(): string {
+ if (typeof this._interval === "number") {
+ const minutes = Math.floor(this._interval / 60000);
+ return `*/${minutes} * * * *`;
+ }
+
+ const [value, unit] = this._interval.split(" ");
+ switch (unit) {
+ case "second":
+ case "seconds":
+ return `*/${value} * * * * *`;
+ case "minute":
+ case "minutes":
+ return `*/${value} * * * *`;
+ case "hour":
+ case "hours":
+ return `0 */${value} * * *`;
+ case "day":
+ case "days":
+ return `0 0 */${value} * *`;
+ default:
+ throw new Error(`Unsupported interval unit: ${unit}`);
+ }
+ }
+}
diff --git a/screenpipe-js/inbox-server.ts b/screenpipe-js/node-sdk/src/inbox-server.ts
similarity index 100%
rename from screenpipe-js/inbox-server.ts
rename to screenpipe-js/node-sdk/src/inbox-server.ts
diff --git a/screenpipe-js/node-sdk/src/index.ts b/screenpipe-js/node-sdk/src/index.ts
new file mode 100644
index 000000000..9c8aa1fc9
--- /dev/null
+++ b/screenpipe-js/node-sdk/src/index.ts
@@ -0,0 +1,137 @@
+import fs from "fs/promises";
+import path from "path";
+import type {
+ PipeConfig,
+ ParsedConfig,
+ InputAction,
+ InputControlResponse,
+ ScreenpipeQueryParams,
+ ScreenpipeResponse,
+} from "../../common/types";
+import { toSnakeCase, convertToCamelCase, toCamelCase } from "../../common/utils";
+import { SettingsManager } from "./SettingsManger";
+import { Scheduler } from "./Scheduler";
+import { InboxManager } from "./InboxManager";
+
+
+class NodePipe {
+ public input = {
+ type: (text: string) => this.sendInputControl({ type: "WriteText", data: text }),
+ press: (key: string) => this.sendInputControl({ type: "KeyPress", data: key }),
+ moveMouse: (x: number, y: number) =>
+ this.sendInputControl({ type: "MouseMove", data: { x, y } }),
+ click: (button: "left" | "right" | "middle") =>
+ this.sendInputControl({ type: "MouseClick", data: button }),
+ };
+
+ public settings = new SettingsManager();
+ public scheduler = new Scheduler();
+ public inbox = new InboxManager();
+
+ public async sendDesktopNotification(
+ options: NotificationOptions
+ ): Promise<boolean> {
+ const notificationApiUrl = "http://localhost:11435";
+ try {
+ await fetch(`${notificationApiUrl}/notify`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify(options),
+ });
+ return true;
+ } catch (error) {
+ console.error("failed to send notification:", error);
+ return false;
+ }
+ }
+
+ public async sendInputControl(action: InputAction): Promise<boolean> {
+ const apiUrl = process.env.SCREENPIPE_SERVER_URL || "http://localhost:3030";
+ try {
+ const response = await fetch(`${apiUrl}/experimental/input_control`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ action }),
+ });
+ if (!response.ok) {
+ throw new Error(`http error! status: ${response.status}`);
+ }
+ const data: InputControlResponse = await response.json();
+ return data.success;
+ } catch (error) {
+ console.error("failed to control input:", error);
+ return false;
+ }
+ }
+
+ public async queryScreenpipe(
+ params: ScreenpipeQueryParams
+ ): Promise<ScreenpipeResponse | null> {
+ const queryParams = new URLSearchParams();
+ Object.entries(params).forEach(([key, value]) => {
+ if (value !== undefined && value !== "") {
+ if (key === "speakerIds" && Array.isArray(value)) {
+ if (value.length > 0) {
+ queryParams.append(toSnakeCase(key), value.join(","));
+ }
+ } else {
+ const snakeKey = toSnakeCase(key);
+ queryParams.append(snakeKey, value!.toString());
+ }
+ }
+ });
+
+ const url = `http://localhost:3030/search?${queryParams}`;
+ try {
+ const response = await fetch(url);
+ if (!response.ok) {
+ const errorText = await response.text();
+ let errorJson;
+ try {
+ errorJson = JSON.parse(errorText);
+ console.error("screenpipe api error:", {
+ status: response.status,
+ error: errorJson,
+ });
+ } catch {
+ console.error("screenpipe api error:", {
+ status: response.status,
+ error: errorText,
+ });
+ }
+ throw new Error(`http error! status: ${response.status}`);
+ }
+ const data = await response.json();
+ return convertToCamelCase(data) as ScreenpipeResponse;
+ } catch (error) {
+ console.error("error querying screenpipe:", error);
+ return null;
+ }
+ }
+
+ public async loadPipeConfig(): Promise<PipeConfig> {
+ try {
+ const baseDir = process.env.SCREENPIPE_DIR || process.cwd();
+ const pipeId = process.env.PIPE_ID || path.basename(process.cwd());
+ const configPath = `${baseDir}/pipes/${pipeId}/pipe.json`;
+
+ const configContent = await fs.readFile(configPath, "utf8");
+ const parsedConfig: ParsedConfig = JSON.parse(configContent);
+ const config: PipeConfig = {};
+ parsedConfig.fields.forEach((field) => {
+ config[field.name] =
+ field.value !== undefined ? field.value : field.default;
+ });
+ return config;
+ } catch (error) {
+ console.error("error loading pipe.json:", error);
+ return {};
+ }
+ }
+}
+
+const pipe = new NodePipe();
+
+export { pipe, toCamelCase, toSnakeCase, convertToCamelCase };
+
+export * from "../../common/types";
\ No newline at end of file
diff --git a/screenpipe-js/tests/loadPipeConfig.test.ts b/screenpipe-js/node-sdk/tests/loadPipeConfig.test.ts
similarity index 88%
rename from screenpipe-js/tests/loadPipeConfig.test.ts
rename to screenpipe-js/node-sdk/tests/loadPipeConfig.test.ts
index 67b90574e..0e6303522 100644
--- a/screenpipe-js/tests/loadPipeConfig.test.ts
+++ b/screenpipe-js/node-sdk/tests/loadPipeConfig.test.ts
@@ -1,9 +1,10 @@
import { describe, expect, test, beforeEach } from "bun:test";
import { v4 as uuid } from "uuid";
-import { ParsedConfig, loadPipeConfig } from "../main";
+import { pipe } from "../src/index";
import { mkdir, writeFile } from "node:fs/promises";
import { join } from "node:path";
import { tmpdir } from "node:os";
+import type { ParsedConfig } from "../../common/types";
describe("loadPipeConfig", () => {
let pipeDir: string;
@@ -30,8 +31,7 @@ describe("loadPipeConfig", () => {
test("should return empty object if pipe.json is not found", async () => {
process.env.SCREENPIPE_DIR = uuid();
process.env.PIPE_ID = uuid();
-
- const loadedConfig = loadPipeConfig();
+ const loadedConfig = await pipe.loadPipeConfig();
expect(loadedConfig).toEqual({});
});
@@ -46,7 +46,7 @@ describe("loadPipeConfig", () => {
],
});
- const loadedConfig = loadPipeConfig();
+ const loadedConfig = await pipe.loadPipeConfig();
expect(loadedConfig).toEqual(config);
});
@@ -61,7 +61,7 @@ describe("loadPipeConfig", () => {
],
});
- const loadedConfig = loadPipeConfig();
+ const loadedConfig = await pipe.loadPipeConfig();
expect(loadedConfig).toEqual({ ...config, summaryFrequency: 5 });
});
});
diff --git a/screenpipe-js/tests/scheduler.test.ts b/screenpipe-js/node-sdk/tests/scheduler.test.ts
similarity index 98%
rename from screenpipe-js/tests/scheduler.test.ts
rename to screenpipe-js/node-sdk/tests/scheduler.test.ts
index 0f92a9cda..cf7e3a565 100644
--- a/screenpipe-js/tests/scheduler.test.ts
+++ b/screenpipe-js/node-sdk/tests/scheduler.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, test, mock, beforeEach, afterEach } from "bun:test";
-import { pipe } from "../main";
+import { pipe } from "../src/index";
import cron from "node-cron";
describe("Scheduler", () => {
diff --git a/screenpipe-js/node-sdk/tsconfig.json b/screenpipe-js/node-sdk/tsconfig.json
new file mode 100644
index 000000000..b1ff481ed
--- /dev/null
+++ b/screenpipe-js/node-sdk/tsconfig.json
@@ -0,0 +1,27 @@
+{
+ "compilerOptions": {
+ // Enable latest features
+ "lib": ["ESNext", "DOM"],
+ "target": "ESNext",
+ "module": "ESNext",
+ "moduleDetection": "force",
+ "jsx": "react-jsx",
+ "allowJs": true,
+
+ // Bundler mode
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
+ "verbatimModuleSyntax": true,
+ "noEmit": true,
+
+ // Best practices
+ "strict": true,
+ "skipLibCheck": true,
+ "noFallthroughCasesInSwitch": true,
+
+ // Some stricter flags (disabled by default)
+ "noUnusedLocals": false,
+ "noUnusedParameters": false,
+ "noPropertyAccessFromIndexSignature": false
+ }
+}
\ No newline at end of file
diff --git a/screenpipe-js/node-sdk/tsup.config.ts b/screenpipe-js/node-sdk/tsup.config.ts
new file mode 100644
index 000000000..fa071068d
--- /dev/null
+++ b/screenpipe-js/node-sdk/tsup.config.ts
@@ -0,0 +1,13 @@
+import { defineConfig } from 'tsup';
+
+export default defineConfig({
+ entry: ['src/main.ts'],
+ format: ['esm', 'cjs'],
+ dts: true,
+ clean: true,
+ treeshake: true,
+ splitting: false,
+ sourcemap: true,
+ minify: true,
+});
+
diff --git a/screenpipe-js/node.ts b/screenpipe-js/node.ts
deleted file mode 100644
index 2c05c7ac6..000000000
--- a/screenpipe-js/node.ts
+++ /dev/null
@@ -1,449 +0,0 @@
-// node.ts
-import fs from "fs/promises";
-import path from "path";
-import os from "os";
-import type { Settings, PipeConfig, ParsedConfig, InboxMessage } from "./types";
-import { AddressInfo, createServer } from "net";
-import type { BrowserPipe } from "./browser";
-
-// Environment detection
-const isNode =
- typeof process !== "undefined" &&
- process.versions != null &&
- process.versions.node != null;
-
-function assertNode(functionName: string) {
- if (!isNode) {
- throw new Error(`${functionName} is only available in Node.js environment`);
- }
-}
-
-// Helper functions to flatten/unflatten objects
-const flattenObject = (obj: any, prefix = ""): Record<string, any> => {
- return Object.keys(obj).reduce((acc: Record<string, any>, k: string) => {
- const pre = prefix.length ? prefix + "." : "";
- if (
- typeof obj[k] === "object" &&
- obj[k] !== null &&
- !Array.isArray(obj[k])
- ) {
- Object.assign(acc, flattenObject(obj[k], pre + k));
- } else {
- acc[pre + k] = obj[k];
- }
- return acc;
- }, {});
-};
-
-const unflattenObject = (obj: Record<string, any>): any => {
- const result: any = {};
- for (const key in obj) {
- const keys = key.split(".");
- let current = result;
- for (let i = 0; i < keys.length; i++) {
- const k = keys[i];
- if (i === keys.length - 1) {
- current[k] = obj[key];
- } else {
- current[k] = current[k] || {};
- current = current[k];
- }
- }
- }
- return result;
-};
-
-// Helper for dynamic imports
-async function requireNodeModule(moduleName: string) {
- if (!isNode) return null;
- try {
- return await import(moduleName);
- } catch (e) {
- console.error(`failed to import ${moduleName}:`, e);
- return null;
- }
-}
-
-const DEFAULT_SETTINGS: Settings = {
- openaiApiKey: "",
- deepgramApiKey: "",
- aiModel: "gpt-4",
- aiUrl: "https://api.openai.com/v1",
- customPrompt: `Rules:
-- You can analyze/view/show/access videos to the user by putting .mp4 files in a code block (we'll render it) like this: \`/users/video.mp4\`, use the exact, absolute, file path from file_path property
-- Do not try to embed video in links (e.g. [](.mp4) or https://.mp4) instead put the file_path in a code block using backticks
-- Do not put video in multiline code block it will not render the video (e.g. \`\`\`bash\n.mp4\`\`\` IS WRONG) instead using inline code block with single backtick
-- Always answer my question/intent, do not make up things`,
- port: 3030,
- dataDir: "default",
- disableAudio: false,
- ignoredWindows: [],
- includedWindows: [],
- aiProviderType: "openai",
- embeddedLLM: {
- enabled: false,
- model: "llama3.2:1b-instruct-q4_K_M",
- port: 11438,
- },
- enableFrameCache: true,
- enableUiMonitoring: false,
- aiMaxContextChars: 128000,
- user: {},
-};
-
-class SettingsManager {
- private settings: Settings;
- private storePath: string;
- private initialized: boolean = false;
-
- constructor() {
- assertNode("SettingsManager");
- this.settings = DEFAULT_SETTINGS;
- this.storePath = ""; // will be set in init()
- }
-
- private async getStorePath(): Promise<string> {
- const platform = process.platform;
- const home = os.homedir();
-
- // Get base screenpipe data directory path based on platform
- let baseDir: string;
- switch (platform) {
- case "darwin":
- baseDir = path.join(home, "Library", "Application Support", "screenpipe");
- break;
- case "linux":
- const xdgData = process.env.XDG_DATA_HOME || path.join(home, ".local", "share");
- baseDir = path.join(xdgData, "screenpipe");
- break;
- case "win32":
- baseDir = path.join(
- process.env.LOCALAPPDATA || path.join(home, "AppData", "Local"),
- "screenpipe"
- );
- break;
- default:
- throw new Error(`unsupported platform: ${platform}`);
- }
-
- // First check profiles.bin to get active profile
- const profilesPath = path.join(baseDir, "profiles.bin");
- let activeProfile = "default";
- try {
- const profilesData = await fs.readFile(profilesPath);
- const profiles = JSON.parse(profilesData.toString());
- if (profiles.activeProfile) {
- activeProfile = profiles.activeProfile;
- }
- } catch (error) {
- // Profiles file doesn't exist yet, use default
- }
-
- // Return store path for active profile
- return activeProfile === "default"
- ? path.join(baseDir, "store.bin")
- : path.join(baseDir, `store-${activeProfile}.bin`);
- }
-
- async init(): Promise<void> {
- if (this.initialized) return;
-
- if (!fs || !path) throw new Error("failed to load required modules");
-
- this.storePath = await this.getStorePath();
-
- try {
- await fs.mkdir(path.dirname(this.storePath), { recursive: true });
- const data = await fs.readFile(this.storePath);
- const rawSettings = JSON.parse(data.toString());
- this.settings = { ...DEFAULT_SETTINGS, ...unflattenObject(rawSettings) };
- this.initialized = true;
- } catch (error) {
- if ((error as { code?: string }).code === "ENOENT") {
- await this.save();
- this.initialized = true;
- } else {
- throw error;
- }
- }
- }
-
- async save(): Promise<void> {
- await fs.mkdir(path.dirname(this.storePath), { recursive: true });
- const flattenedSettings = flattenObject(this.settings);
- await fs.writeFile(
- this.storePath,
- JSON.stringify(flattenedSettings, null, 2)
- );
- }
-
- async get<K extends keyof Settings>(key: K): Promise<Settings[K]> {
- if (!this.initialized) await this.init();
- return this.settings[key];
- }
-
- async set<K extends keyof Settings>(
- key: K,
- value: Settings[K]
- ): Promise<void> {
- if (!this.initialized) await this.init();
- this.settings[key] = value;
- await this.save();
- }
-
- async getAll(): Promise<Settings> {
- await this.init();
- return { ...this.settings };
- }
-
- async update(newSettings: Partial<Settings>): Promise<void> {
- if (!this.initialized) await this.init();
- this.settings = { ...this.settings, ...newSettings };
- await this.save();
- }
-
- async reset(): Promise<void> {
- this.settings = { ...DEFAULT_SETTINGS };
- await this.save();
- }
-
- async resetKey<K extends keyof Settings>(key: K): Promise<void> {
- if (!this.initialized) await this.init();
- this.settings[key] = DEFAULT_SETTINGS[key];
- await this.save();
- }
-
- async getCustomSetting(namespace: string, key: string): Promise<any> {
- if (!this.initialized) await this.init();
- return this.settings.customSettings?.[namespace]?.[key];
- }
-
- async setCustomSetting(
- namespace: string,
- key: string,
- value: any
- ): Promise<void> {
- if (!this.initialized) await this.init();
- this.settings.customSettings = this.settings.customSettings || {};
- this.settings.customSettings[namespace] =
- this.settings.customSettings[namespace] || {};
- this.settings.customSettings[namespace][key] = value;
- await this.save();
- }
-
- async getNamespaceSettings(
- namespace: string
- ): Promise<Record<string, any> | undefined> {
- if (!this.initialized) await this.init();
- return this.settings.customSettings?.[namespace];
- }
-
- async updateNamespaceSettings(
- namespace: string,
- settings: Record<string, any>
- ): Promise<void> {
- if (!this.initialized) await this.init();
- this.settings.customSettings = this.settings.customSettings || {};
- this.settings.customSettings[namespace] = settings;
- await this.save();
- }
-}
-
-class Task {
- private _name: string;
- private _interval: string | number;
- private _time: string | null = null;
- private _handler: (() => Promise<void>) | null = null;
- private _cronTask: any | null = null;
-
- constructor(name: string) {
- assertNode("Task");
- this._name = name;
- this._interval = 0;
- }
-
- every(interval: string | number): Task {
- this._interval = interval;
- return this;
- }
-
- at(time: string): Task {
- this._time = time;
- return this;
- }
-
- do(handler: () => Promise<void>): Task {
- this._handler = handler;
- return this;
- }
-
- async schedule(): Promise<void> {
- if (!this._handler) {
- throw new Error(`No handler defined for task: ${this._name}`);
- }
-
- assertNode("Task.schedule");
- const cron = await requireNodeModule("node-cron");
- const cronExpression = this.toCronExpression();
-
- this._cronTask = cron.schedule(cronExpression, this._handler, {
- name: this._name,
- });
- }
-
- stop(): void {
- assertNode("Task.stop");
- return this._cronTask?.stop();
- }
-
- private toCronExpression(): string {
- if (typeof this._interval === "number") {
- const minutes = Math.floor(this._interval / 60000);
- return `*/${minutes} * * * *`;
- }
-
- const [value, unit] = this._interval.split(" ");
- switch (unit) {
- case "second":
- case "seconds":
- return `*/${value} * * * * *`;
- case "minute":
- case "minutes":
- return `*/${value} * * * *`;
- case "hour":
- case "hours":
- return `0 */${value} * * *`;
- case "day":
- case "days":
- return `0 0 */${value} * *`;
- default:
- throw new Error(`Unsupported interval unit: ${unit}`);
- }
- }
-}
-
-class Scheduler {
- private tasks: Task[] = [];
-
- constructor() {
- assertNode("Scheduler");
- }
-
- task(name: string): Task {
- const task = new Task(name);
- this.tasks.push(task);
- return task;
- }
-
- start() {
- this.tasks.forEach((task) => task.schedule());
- }
-
- async stop(): Promise<void> {
- assertNode("Scheduler.stop");
- if (isNode) {
- const cron = await requireNodeModule("node-cron");
- cron.getTasks().forEach((task: any) => task.stop());
- }
- this.tasks = [];
- }
-}
-
-class InboxManager {
- private actionServerPort?: number;
- private actionServerProcess?: any;
-
- async send(message: InboxMessage): Promise<boolean> {
- if (!this.actionServerPort) {
- this.actionServerPort = await getAvailablePort();
- if (isNode) {
- const { fork } = await requireNodeModule("child_process");
- this.actionServerProcess = fork("./inbox-server.js", [
- this.actionServerPort.toString(),
- ]);
- }
- }
-
- if (message.actions) {
- if (!isNode) {
- console.warn("inbox actions are currently not supported in browser");
- return false;
- }
- message.actions = message.actions.map((action) => {
- const actionId = crypto.randomUUID();
- return {
- label: action.label,
- action: actionId,
- port: this.actionServerPort,
- callback: action.callback,
- };
- });
- }
-
- try {
- const response = await fetch("http://localhost:11435/inbox", {
- method: "POST",
- headers: { "Content-Type": "application/json" },
- body: JSON.stringify({
- ...message,
- type: "inbox",
- actionServerPort: this.actionServerPort,
- }),
- });
-
- return response.ok;
- } catch (error) {
- console.error("failed to send inbox message:", error);
- return false;
- }
- }
-}
-
-async function getAvailablePort(): Promise<number> {
- return new Promise((resolve, reject) => {
- const server = createServer();
- server.unref();
- server.on("error", reject);
- server.listen(0, () => {
- const port = (server.address() as AddressInfo).port;
- server.close(() => resolve(port));
- });
- });
-}
-
-// Re-export browser functionality
-export * from "./browser";
-
-// Node-specific pipe implementation
-interface NodePipe extends BrowserPipe {
- settings: SettingsManager;
- scheduler: Scheduler;
- inbox: InboxManager;
- loadPipeConfig(): Promise<PipeConfig>;
-}
-
-export const pipe: NodePipe = {
- ...require("./browser").pipe,
- settings: new SettingsManager(),
- scheduler: new Scheduler(),
- inbox: new InboxManager(),
- async loadPipeConfig(): Promise<PipeConfig> {
- try {
- const baseDir = process.env.SCREENPIPE_DIR || process.cwd();
- const pipeId = process.env.PIPE_ID || path.basename(process.cwd());
- const configPath = `${baseDir}/pipes/${pipeId}/pipe.json`;
-
- const configContent = await fs.readFile(configPath, "utf8");
- const parsedConfig: ParsedConfig = JSON.parse(configContent);
- const config: PipeConfig = {};
- parsedConfig.fields.forEach((field) => {
- config[field.name] =
- field.value !== undefined ? field.value : field.default;
- });
- return config;
- } catch (error) {
- console.error("error loading pipe.json:", error);
- return {};
- }
- },
-};
diff --git a/screenpipe-js/package-lock.json b/screenpipe-js/package-lock.json
deleted file mode 100644
index 55e654650..000000000
--- a/screenpipe-js/package-lock.json
+++ /dev/null
@@ -1,1835 +0,0 @@
-{
- "name": "@screenpipe/js",
- "version": "0.1.10-beta.12",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "@screenpipe/js",
- "version": "0.1.10-beta.12",
- "dependencies": {
- "@scarf/scarf": "^1.4.0",
- "@types/express": "^5.0.0",
- "@types/node-cron": "^3.0.11",
- "cron-parser": "^4.9.0",
- "express": "^4.21.1",
- "node-cron": "^3.0.3"
- },
- "devDependencies": {
- "@types/node": "^22.10.2",
- "bun-types": "latest",
- "tsup": "^8.0.0"
- },
- "peerDependencies": {
- "typescript": "^5.0.0"
- }
- },
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.24.0",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@isaacs/cliui": {
- "version": "8.0.2",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "string-width": "^5.1.2",
- "string-width-cjs": "npm:string-width@^4.2.0",
- "strip-ansi": "^7.0.1",
- "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
- "wrap-ansi": "^8.1.0",
- "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@jridgewell/gen-mapping": {
- "version": "0.3.8",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/set-array": "^1.2.1",
- "@jridgewell/sourcemap-codec": "^1.4.10",
- "@jridgewell/trace-mapping": "^0.3.24"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/resolve-uri": {
- "version": "3.1.2",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/set-array": {
- "version": "1.2.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.5.0",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.25",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/resolve-uri": "^3.1.0",
- "@jridgewell/sourcemap-codec": "^1.4.14"
- }
- },
- "node_modules/@pkgjs/parseargs": {
- "version": "0.11.0",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.28.1",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@scarf/scarf": {
- "version": "1.4.0",
- "hasInstallScript": true,
- "license": "Apache-2.0"
- },
- "node_modules/@types/body-parser": {
- "version": "1.19.5",
- "license": "MIT",
- "dependencies": {
- "@types/connect": "*",
- "@types/node": "*"
- }
- },
- "node_modules/@types/connect": {
- "version": "3.4.38",
- "license": "MIT",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/estree": {
- "version": "1.0.6",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/express": {
- "version": "5.0.0",
- "license": "MIT",
- "dependencies": {
- "@types/body-parser": "*",
- "@types/express-serve-static-core": "^5.0.0",
- "@types/qs": "*",
- "@types/serve-static": "*"
- }
- },
- "node_modules/@types/express-serve-static-core": {
- "version": "5.0.1",
- "license": "MIT",
- "dependencies": {
- "@types/node": "*",
- "@types/qs": "*",
- "@types/range-parser": "*",
- "@types/send": "*"
- }
- },
- "node_modules/@types/http-errors": {
- "version": "2.0.4",
- "license": "MIT"
- },
- "node_modules/@types/mime": {
- "version": "1.3.5",
- "license": "MIT"
- },
- "node_modules/@types/node": {
- "version": "22.10.2",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz",
- "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==",
- "dependencies": {
- "undici-types": "~6.20.0"
- }
- },
- "node_modules/@types/node-cron": {
- "version": "3.0.11",
- "license": "MIT"
- },
- "node_modules/@types/qs": {
- "version": "6.9.17",
- "license": "MIT"
- },
- "node_modules/@types/range-parser": {
- "version": "1.2.7",
- "license": "MIT"
- },
- "node_modules/@types/send": {
- "version": "0.17.4",
- "license": "MIT",
- "dependencies": {
- "@types/mime": "^1",
- "@types/node": "*"
- }
- },
- "node_modules/@types/serve-static": {
- "version": "1.15.7",
- "license": "MIT",
- "dependencies": {
- "@types/http-errors": "*",
- "@types/node": "*",
- "@types/send": "*"
- }
- },
- "node_modules/@types/ws": {
- "version": "8.5.12",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/accepts": {
- "version": "1.3.8",
- "license": "MIT",
- "dependencies": {
- "mime-types": "~2.1.34",
- "negotiator": "0.6.3"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/ansi-regex": {
- "version": "6.1.0",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/ansi-styles": {
- "version": "6.2.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/any-promise": {
- "version": "1.3.0",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/array-flatten": {
- "version": "1.1.1",
- "license": "MIT"
- },
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/body-parser": {
- "version": "1.20.3",
- "license": "MIT",
- "dependencies": {
- "bytes": "3.1.2",
- "content-type": "~1.0.5",
- "debug": "2.6.9",
- "depd": "2.0.0",
- "destroy": "1.2.0",
- "http-errors": "2.0.0",
- "iconv-lite": "0.4.24",
- "on-finished": "2.4.1",
- "qs": "6.13.0",
- "raw-body": "2.5.2",
- "type-is": "~1.6.18",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8",
- "npm": "1.2.8000 || >= 1.4.16"
- }
- },
- "node_modules/body-parser/node_modules/debug": {
- "version": "2.6.9",
- "license": "MIT",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/body-parser/node_modules/debug/node_modules/ms": {
- "version": "2.0.0",
- "license": "MIT"
- },
- "node_modules/brace-expansion": {
- "version": "2.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "node_modules/bun-types": {
- "version": "1.1.38",
- "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.1.38.tgz",
- "integrity": "sha512-iglB2t9z1Hc6DIuwwscwWj/csx22QlCZ96QbcqQfiy1wmuZ38srQLI/fDVkFHAo2+KL7aJZGVWF+nAWrR6Njig==",
- "dev": true,
- "dependencies": {
- "@types/node": "~20.12.8",
- "@types/ws": "~8.5.10"
- }
- },
- "node_modules/bun-types/node_modules/@types/node": {
- "version": "20.12.14",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "undici-types": "~5.26.4"
- }
- },
- "node_modules/bun-types/node_modules/@types/node/node_modules/undici-types": {
- "version": "5.26.5",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/bundle-require": {
- "version": "5.0.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "load-tsconfig": "^0.2.3"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "peerDependencies": {
- "esbuild": ">=0.18"
- }
- },
- "node_modules/bytes": {
- "version": "3.1.2",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/cac": {
- "version": "6.7.14",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/call-bind": {
- "version": "1.0.7",
- "license": "MIT",
- "dependencies": {
- "es-define-property": "^1.0.0",
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2",
- "get-intrinsic": "^1.2.4",
- "set-function-length": "^1.2.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/chokidar": {
- "version": "4.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "readdirp": "^4.0.1"
- },
- "engines": {
- "node": ">= 14.16.0"
- },
- "funding": {
- "url": "https://paulmillr.com/funding/"
- }
- },
- "node_modules/color-convert": {
- "version": "2.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/color-name": {
- "version": "1.1.4",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/commander": {
- "version": "4.1.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/consola": {
- "version": "3.2.3",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^14.18.0 || >=16.10.0"
- }
- },
- "node_modules/content-disposition": {
- "version": "0.5.4",
- "license": "MIT",
- "dependencies": {
- "safe-buffer": "5.2.1"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/content-type": {
- "version": "1.0.5",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cookie": {
- "version": "0.7.1",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cookie-signature": {
- "version": "1.0.6",
- "license": "MIT"
- },
- "node_modules/cron-parser": {
- "version": "4.9.0",
- "license": "MIT",
- "dependencies": {
- "luxon": "^3.2.1"
- },
- "engines": {
- "node": ">=12.0.0"
- }
- },
- "node_modules/cross-spawn": {
- "version": "7.0.6",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/debug": {
- "version": "4.4.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ms": "^2.1.3"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/define-data-property": {
- "version": "1.1.4",
- "license": "MIT",
- "dependencies": {
- "es-define-property": "^1.0.0",
- "es-errors": "^1.3.0",
- "gopd": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/depd": {
- "version": "2.0.0",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/destroy": {
- "version": "1.2.0",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8",
- "npm": "1.2.8000 || >= 1.4.16"
- }
- },
- "node_modules/eastasianwidth": {
- "version": "0.2.0",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/ee-first": {
- "version": "1.1.1",
- "license": "MIT"
- },
- "node_modules/emoji-regex": {
- "version": "9.2.2",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/encodeurl": {
- "version": "2.0.0",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/es-define-property": {
- "version": "1.0.0",
- "license": "MIT",
- "dependencies": {
- "get-intrinsic": "^1.2.4"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-errors": {
- "version": "1.3.0",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/esbuild": {
- "version": "0.24.0",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=18"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.24.0",
- "@esbuild/android-arm": "0.24.0",
- "@esbuild/android-arm64": "0.24.0",
- "@esbuild/android-x64": "0.24.0",
- "@esbuild/darwin-arm64": "0.24.0",
- "@esbuild/darwin-x64": "0.24.0",
- "@esbuild/freebsd-arm64": "0.24.0",
- "@esbuild/freebsd-x64": "0.24.0",
- "@esbuild/linux-arm": "0.24.0",
- "@esbuild/linux-arm64": "0.24.0",
- "@esbuild/linux-ia32": "0.24.0",
- "@esbuild/linux-loong64": "0.24.0",
- "@esbuild/linux-mips64el": "0.24.0",
- "@esbuild/linux-ppc64": "0.24.0",
- "@esbuild/linux-riscv64": "0.24.0",
- "@esbuild/linux-s390x": "0.24.0",
- "@esbuild/linux-x64": "0.24.0",
- "@esbuild/netbsd-x64": "0.24.0",
- "@esbuild/openbsd-arm64": "0.24.0",
- "@esbuild/openbsd-x64": "0.24.0",
- "@esbuild/sunos-x64": "0.24.0",
- "@esbuild/win32-arm64": "0.24.0",
- "@esbuild/win32-ia32": "0.24.0",
- "@esbuild/win32-x64": "0.24.0"
- }
- },
- "node_modules/escape-html": {
- "version": "1.0.3",
- "license": "MIT"
- },
- "node_modules/etag": {
- "version": "1.8.1",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/express": {
- "version": "4.21.1",
- "license": "MIT",
- "dependencies": {
- "accepts": "~1.3.8",
- "array-flatten": "1.1.1",
- "body-parser": "1.20.3",
- "content-disposition": "0.5.4",
- "content-type": "~1.0.4",
- "cookie": "0.7.1",
- "cookie-signature": "1.0.6",
- "debug": "2.6.9",
- "depd": "2.0.0",
- "encodeurl": "~2.0.0",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "finalhandler": "1.3.1",
- "fresh": "0.5.2",
- "http-errors": "2.0.0",
- "merge-descriptors": "1.0.3",
- "methods": "~1.1.2",
- "on-finished": "2.4.1",
- "parseurl": "~1.3.3",
- "path-to-regexp": "0.1.10",
- "proxy-addr": "~2.0.7",
- "qs": "6.13.0",
- "range-parser": "~1.2.1",
- "safe-buffer": "5.2.1",
- "send": "0.19.0",
- "serve-static": "1.16.2",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "type-is": "~1.6.18",
- "utils-merge": "1.0.1",
- "vary": "~1.1.2"
- },
- "engines": {
- "node": ">= 0.10.0"
- }
- },
- "node_modules/express/node_modules/debug": {
- "version": "2.6.9",
- "license": "MIT",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/express/node_modules/debug/node_modules/ms": {
- "version": "2.0.0",
- "license": "MIT"
- },
- "node_modules/fdir": {
- "version": "6.4.2",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "picomatch": "^3 || ^4"
- },
- "peerDependenciesMeta": {
- "picomatch": {
- "optional": true
- }
- }
- },
- "node_modules/finalhandler": {
- "version": "1.3.1",
- "license": "MIT",
- "dependencies": {
- "debug": "2.6.9",
- "encodeurl": "~2.0.0",
- "escape-html": "~1.0.3",
- "on-finished": "2.4.1",
- "parseurl": "~1.3.3",
- "statuses": "2.0.1",
- "unpipe": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/finalhandler/node_modules/debug": {
- "version": "2.6.9",
- "license": "MIT",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/finalhandler/node_modules/debug/node_modules/ms": {
- "version": "2.0.0",
- "license": "MIT"
- },
- "node_modules/foreground-child": {
- "version": "3.3.0",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "cross-spawn": "^7.0.0",
- "signal-exit": "^4.0.1"
- },
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/forwarded": {
- "version": "0.2.0",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fresh": {
- "version": "0.5.2",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fsevents": {
- "version": "2.3.3",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/function-bind": {
- "version": "1.1.2",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/get-intrinsic": {
- "version": "1.2.4",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2",
- "has-proto": "^1.0.1",
- "has-symbols": "^1.0.3",
- "hasown": "^2.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/glob": {
- "version": "10.4.5",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "foreground-child": "^3.1.0",
- "jackspeak": "^3.1.2",
- "minimatch": "^9.0.4",
- "minipass": "^7.1.2",
- "package-json-from-dist": "^1.0.0",
- "path-scurry": "^1.11.1"
- },
- "bin": {
- "glob": "dist/esm/bin.mjs"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/gopd": {
- "version": "1.0.1",
- "license": "MIT",
- "dependencies": {
- "get-intrinsic": "^1.1.3"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-property-descriptors": {
- "version": "1.0.2",
- "license": "MIT",
- "dependencies": {
- "es-define-property": "^1.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-proto": {
- "version": "1.0.3",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-symbols": {
- "version": "1.0.3",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/hasown": {
- "version": "2.0.2",
- "license": "MIT",
- "dependencies": {
- "function-bind": "^1.1.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/http-errors": {
- "version": "2.0.0",
- "license": "MIT",
- "dependencies": {
- "depd": "2.0.0",
- "inherits": "2.0.4",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "toidentifier": "1.0.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/iconv-lite": {
- "version": "0.4.24",
- "license": "MIT",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "license": "ISC"
- },
- "node_modules/ipaddr.js": {
- "version": "1.9.1",
- "license": "MIT",
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/isexe": {
- "version": "2.0.0",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/jackspeak": {
- "version": "3.4.3",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "@isaacs/cliui": "^8.0.2"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- },
- "optionalDependencies": {
- "@pkgjs/parseargs": "^0.11.0"
- }
- },
- "node_modules/joycon": {
- "version": "3.1.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/lilconfig": {
- "version": "3.1.3",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/antonk52"
- }
- },
- "node_modules/lines-and-columns": {
- "version": "1.2.4",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/load-tsconfig": {
- "version": "0.2.5",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- }
- },
- "node_modules/lodash.sortby": {
- "version": "4.7.0",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/lru-cache": {
- "version": "10.4.3",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/luxon": {
- "version": "3.5.0",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/media-typer": {
- "version": "0.3.0",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/merge-descriptors": {
- "version": "1.0.3",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/methods": {
- "version": "1.1.2",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime": {
- "version": "1.6.0",
- "license": "MIT",
- "bin": {
- "mime": "cli.js"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/mime-db": {
- "version": "1.52.0",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime-types": {
- "version": "2.1.35",
- "license": "MIT",
- "dependencies": {
- "mime-db": "1.52.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/minimatch": {
- "version": "9.0.5",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/minipass": {
- "version": "7.1.2",
- "dev": true,
- "license": "ISC",
- "engines": {
- "node": ">=16 || 14 >=14.17"
- }
- },
- "node_modules/ms": {
- "version": "2.1.3",
- "license": "MIT"
- },
- "node_modules/mz": {
- "version": "2.7.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "any-promise": "^1.0.0",
- "object-assign": "^4.0.1",
- "thenify-all": "^1.0.0"
- }
- },
- "node_modules/negotiator": {
- "version": "0.6.3",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/node-cron": {
- "version": "3.0.3",
- "license": "ISC",
- "dependencies": {
- "uuid": "8.3.2"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/object-assign": {
- "version": "4.1.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/object-inspect": {
- "version": "1.13.3",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/on-finished": {
- "version": "2.4.1",
- "license": "MIT",
- "dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/package-json-from-dist": {
- "version": "1.0.1",
- "dev": true,
- "license": "BlueOak-1.0.0"
- },
- "node_modules/parseurl": {
- "version": "1.3.3",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/path-key": {
- "version": "3.1.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-scurry": {
- "version": "1.11.1",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "lru-cache": "^10.2.0",
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
- },
- "engines": {
- "node": ">=16 || 14 >=14.18"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/path-to-regexp": {
- "version": "0.1.10",
- "license": "MIT"
- },
- "node_modules/picocolors": {
- "version": "1.1.1",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/picomatch": {
- "version": "4.0.2",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/pirates": {
- "version": "4.0.6",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/postcss-load-config": {
- "version": "6.0.1",
- "dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "lilconfig": "^3.1.1"
- },
- "engines": {
- "node": ">= 18"
- },
- "peerDependencies": {
- "jiti": ">=1.21.0",
- "postcss": ">=8.0.9",
- "tsx": "^4.8.1",
- "yaml": "^2.4.2"
- },
- "peerDependenciesMeta": {
- "jiti": {
- "optional": true
- },
- "postcss": {
- "optional": true
- },
- "tsx": {
- "optional": true
- },
- "yaml": {
- "optional": true
- }
- }
- },
- "node_modules/proxy-addr": {
- "version": "2.0.7",
- "license": "MIT",
- "dependencies": {
- "forwarded": "0.2.0",
- "ipaddr.js": "1.9.1"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/punycode": {
- "version": "2.3.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/qs": {
- "version": "6.13.0",
- "license": "BSD-3-Clause",
- "dependencies": {
- "side-channel": "^1.0.6"
- },
- "engines": {
- "node": ">=0.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/range-parser": {
- "version": "1.2.1",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/raw-body": {
- "version": "2.5.2",
- "license": "MIT",
- "dependencies": {
- "bytes": "3.1.2",
- "http-errors": "2.0.0",
- "iconv-lite": "0.4.24",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/readdirp": {
- "version": "4.0.2",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 14.16.0"
- },
- "funding": {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- },
- "node_modules/resolve-from": {
- "version": "5.0.0",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/rollup": {
- "version": "4.28.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "1.0.6"
- },
- "bin": {
- "rollup": "dist/bin/rollup"
- },
- "engines": {
- "node": ">=18.0.0",
- "npm": ">=8.0.0"
- },
- "optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.28.1",
- "@rollup/rollup-android-arm64": "4.28.1",
- "@rollup/rollup-darwin-arm64": "4.28.1",
- "@rollup/rollup-darwin-x64": "4.28.1",
- "@rollup/rollup-freebsd-arm64": "4.28.1",
- "@rollup/rollup-freebsd-x64": "4.28.1",
- "@rollup/rollup-linux-arm-gnueabihf": "4.28.1",
- "@rollup/rollup-linux-arm-musleabihf": "4.28.1",
- "@rollup/rollup-linux-arm64-gnu": "4.28.1",
- "@rollup/rollup-linux-arm64-musl": "4.28.1",
- "@rollup/rollup-linux-loongarch64-gnu": "4.28.1",
- "@rollup/rollup-linux-powerpc64le-gnu": "4.28.1",
- "@rollup/rollup-linux-riscv64-gnu": "4.28.1",
- "@rollup/rollup-linux-s390x-gnu": "4.28.1",
- "@rollup/rollup-linux-x64-gnu": "4.28.1",
- "@rollup/rollup-linux-x64-musl": "4.28.1",
- "@rollup/rollup-win32-arm64-msvc": "4.28.1",
- "@rollup/rollup-win32-ia32-msvc": "4.28.1",
- "@rollup/rollup-win32-x64-msvc": "4.28.1",
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/safer-buffer": {
- "version": "2.1.2",
- "license": "MIT"
- },
- "node_modules/send": {
- "version": "0.19.0",
- "license": "MIT",
- "dependencies": {
- "debug": "2.6.9",
- "depd": "2.0.0",
- "destroy": "1.2.0",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "fresh": "0.5.2",
- "http-errors": "2.0.0",
- "mime": "1.6.0",
- "ms": "2.1.3",
- "on-finished": "2.4.1",
- "range-parser": "~1.2.1",
- "statuses": "2.0.1"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/send/node_modules/debug": {
- "version": "2.6.9",
- "license": "MIT",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/send/node_modules/debug/node_modules/ms": {
- "version": "2.0.0",
- "license": "MIT"
- },
- "node_modules/send/node_modules/encodeurl": {
- "version": "1.0.2",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/serve-static": {
- "version": "1.16.2",
- "license": "MIT",
- "dependencies": {
- "encodeurl": "~2.0.0",
- "escape-html": "~1.0.3",
- "parseurl": "~1.3.3",
- "send": "0.19.0"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/set-function-length": {
- "version": "1.2.2",
- "license": "MIT",
- "dependencies": {
- "define-data-property": "^1.1.4",
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2",
- "get-intrinsic": "^1.2.4",
- "gopd": "^1.0.1",
- "has-property-descriptors": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/setprototypeof": {
- "version": "1.2.0",
- "license": "ISC"
- },
- "node_modules/shebang-command": {
- "version": "2.0.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/shebang-regex": {
- "version": "3.0.0",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/side-channel": {
- "version": "1.0.6",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.7",
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.4",
- "object-inspect": "^1.13.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/signal-exit": {
- "version": "4.1.0",
- "dev": true,
- "license": "ISC",
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/source-map": {
- "version": "0.8.0-beta.0",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "whatwg-url": "^7.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/statuses": {
- "version": "2.0.1",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/string-width": {
- "version": "5.1.2",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/string-width-cjs": {
- "name": "string-width",
- "version": "4.2.3",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/string-width-cjs/node_modules/emoji-regex": {
- "version": "8.0.0",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/string-width-cjs/node_modules/strip-ansi": {
- "version": "6.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/string-width-cjs/node_modules/strip-ansi/node_modules/ansi-regex": {
- "version": "5.0.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-ansi": {
- "version": "7.1.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "node_modules/strip-ansi-cjs": {
- "name": "strip-ansi",
- "version": "6.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-ansi-cjs/node_modules/ansi-regex": {
- "version": "5.0.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/sucrase": {
- "version": "3.35.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/gen-mapping": "^0.3.2",
- "commander": "^4.0.0",
- "glob": "^10.3.10",
- "lines-and-columns": "^1.1.6",
- "mz": "^2.7.0",
- "pirates": "^4.0.1",
- "ts-interface-checker": "^0.1.9"
- },
- "bin": {
- "sucrase": "bin/sucrase",
- "sucrase-node": "bin/sucrase-node"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- }
- },
- "node_modules/thenify": {
- "version": "3.3.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "any-promise": "^1.0.0"
- }
- },
- "node_modules/thenify-all": {
- "version": "1.6.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "thenify": ">= 3.1.0 < 4"
- },
- "engines": {
- "node": ">=0.8"
- }
- },
- "node_modules/tinyexec": {
- "version": "0.3.1",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/tinyglobby": {
- "version": "0.2.10",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fdir": "^6.4.2",
- "picomatch": "^4.0.2"
- },
- "engines": {
- "node": ">=12.0.0"
- }
- },
- "node_modules/toidentifier": {
- "version": "1.0.1",
- "license": "MIT",
- "engines": {
- "node": ">=0.6"
- }
- },
- "node_modules/tr46": {
- "version": "1.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "punycode": "^2.1.0"
- }
- },
- "node_modules/tree-kill": {
- "version": "1.2.2",
- "dev": true,
- "license": "MIT",
- "bin": {
- "tree-kill": "cli.js"
- }
- },
- "node_modules/ts-interface-checker": {
- "version": "0.1.13",
- "dev": true,
- "license": "Apache-2.0"
- },
- "node_modules/tsup": {
- "version": "8.3.5",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "bundle-require": "^5.0.0",
- "cac": "^6.7.14",
- "chokidar": "^4.0.1",
- "consola": "^3.2.3",
- "debug": "^4.3.7",
- "esbuild": "^0.24.0",
- "joycon": "^3.1.1",
- "picocolors": "^1.1.1",
- "postcss-load-config": "^6.0.1",
- "resolve-from": "^5.0.0",
- "rollup": "^4.24.0",
- "source-map": "0.8.0-beta.0",
- "sucrase": "^3.35.0",
- "tinyexec": "^0.3.1",
- "tinyglobby": "^0.2.9",
- "tree-kill": "^1.2.2"
- },
- "bin": {
- "tsup": "dist/cli-default.js",
- "tsup-node": "dist/cli-node.js"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "@microsoft/api-extractor": "^7.36.0",
- "@swc/core": "^1",
- "postcss": "^8.4.12",
- "typescript": ">=4.5.0"
- },
- "peerDependenciesMeta": {
- "@microsoft/api-extractor": {
- "optional": true
- },
- "@swc/core": {
- "optional": true
- },
- "postcss": {
- "optional": true
- },
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/type-is": {
- "version": "1.6.18",
- "license": "MIT",
- "dependencies": {
- "media-typer": "0.3.0",
- "mime-types": "~2.1.24"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/typescript": {
- "version": "5.6.3",
- "license": "Apache-2.0",
- "peer": true,
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=14.17"
- }
- },
- "node_modules/undici-types": {
- "version": "6.20.0",
- "license": "MIT"
- },
- "node_modules/unpipe": {
- "version": "1.0.0",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/utils-merge": {
- "version": "1.0.1",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4.0"
- }
- },
- "node_modules/uuid": {
- "version": "8.3.2",
- "license": "MIT",
- "bin": {
- "uuid": "dist/bin/uuid"
- }
- },
- "node_modules/vary": {
- "version": "1.1.2",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/webidl-conversions": {
- "version": "4.0.2",
- "dev": true,
- "license": "BSD-2-Clause"
- },
- "node_modules/whatwg-url": {
- "version": "7.1.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "lodash.sortby": "^4.7.0",
- "tr46": "^1.0.1",
- "webidl-conversions": "^4.0.2"
- }
- },
- "node_modules/which": {
- "version": "2.0.2",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/wrap-ansi": {
- "version": "8.1.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^6.1.0",
- "string-width": "^5.0.1",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/wrap-ansi-cjs": {
- "name": "wrap-ansi",
- "version": "7.0.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {
- "version": "4.3.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/wrap-ansi-cjs/node_modules/string-width": {
- "version": "4.2.3",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/wrap-ansi-cjs/node_modules/string-width/node_modules/emoji-regex": {
- "version": "8.0.0",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {
- "version": "6.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/wrap-ansi-cjs/node_modules/strip-ansi/node_modules/ansi-regex": {
- "version": "5.0.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- }
- }
-}
diff --git a/screenpipe-js/package.json b/screenpipe-js/package.json
deleted file mode 100644
index 37aff44a8..000000000
--- a/screenpipe-js/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "name": "@screenpipe/js",
- "version": "0.1.11",
- "type": "module",
- "main": "./dist/main.cjs",
- "module": "./dist/main.js",
- "types": "./dist/main.d.ts",
- "files": [
- "dist"
- ],
- "exports": {
- ".": {
- "types": "./dist/main.d.ts",
- "browser": "./dist/browser.js",
- "node": "./dist/node.js",
- "import": "./dist/main.js",
- "require": "./dist/main.cjs",
- "default": "./dist/browser.js"
- },
- "./node": {
- "types": "./dist/node.d.ts",
- "import": "./dist/node.js",
- "require": "./dist/node.cjs"
- },
- "./browser": {
- "types": "./dist/browser.d.ts",
- "import": "./dist/browser.js",
- "require": "./dist/browser.cjs"
- }
- },
- "scripts": {
- "build": "tsup main.ts browser.ts node.ts next.ts types.ts --format esm,cjs --dts --clean",
- "test": "bun test",
- "prepublishOnly": "npm run build"
- },
- "devDependencies": {
- "@types/node": "^22.10.2",
- "bun-types": "latest",
- "tsup": "^8.0.0"
- },
- "dependencies": {
- "@scarf/scarf": "^1.4.0",
- "@types/express": "^5.0.0",
- "@types/node-cron": "^3.0.11",
- "express": "^4.21.1",
- "node-cron": "^3.0.3"
- },
- "peerDependencies": {
- "typescript": "^5.0.0"
- },
- "publishConfig": {
- "access": "public"
- },
- "typesVersions": {
- "*": {
- "node": ["./dist/node.d.ts"],
- "browser": ["./dist/browser.d.ts"]
- }
- }
-}
diff --git a/screenpipe-js/tsconfig.json b/screenpipe-js/tsconfig.json
deleted file mode 100644
index b4d03ed08..000000000
--- a/screenpipe-js/tsconfig.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2020",
- "module": "ESNext",
- "moduleResolution": "bundler",
- "types": [
- "bun-types",
- "node"
- ],
- "esModuleInterop": true,
- "skipLibCheck": true,
- "strict": true,
- "declaration": true,
- "declarationDir": "./dist",
- "outDir": "dist"
- },
- "include": [
- "*.ts",
- "index.d.ts"
- ],
- "exclude": [
- "node_modules",
- "dist",
- "create-pipe"
- ]
-}