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

feat: add leads finder pipe

Louis Beaumont7dd1e0563267
diff --git a/content/docs/pages/docs/plugins.mdx b/content/docs/pages/docs/plugins.mdx
index 7a07e782e..3cba96b97 100644
--- a/content/docs/pages/docs/plugins.mdx
+++ b/content/docs/pages/docs/plugins.mdx
@@ -77,7 +77,7 @@ we use `pipe.json` to let others pass configuration options to your pipe through
we parse your `pipe.json` file to render in the UI the input fields for your pipe so you need to follow the format.
-here's my `pipe.json` for the pipe-post-questions-on-reddit:
+here's a snippet of a `pipe.json` for the pipe-post-questions-on-reddit:
```json
{
@@ -95,106 +95,26 @@ here's my `pipe.json` for the pipe-post-questions-on-reddit:
"type": "string",
"value": "hourly:1"
},
- {
- "default": "11:00",
- "description": "Time to send daily summary email (used only if summaryFrequency is 'daily')",
- "name": "emailTime",
- "type": "time"
- },
- {
- "default": "",
- "description": "Email address to send the daily summary to",
- "name": "emailAddress",
- "type": "string",
- "value": "[email protected]"
- },
- {
- "default": "",
- "description": "App specific password for your gmail account, https://support.google.com/accounts/answer/185833?hl=en",
- "name": "emailPassword",
- "type": "string",
- "value": "abcd"
- },
- {
- "default": "https://api.openai.com/v1/chat/completions",
- "description": "openai-compatible API URL",
- "name": "gptApiUrl",
- "type": "string"
- },
- {
- "default": "gpt-4o",
- "description": "AI Model name",
- "name": "gptModel",
- "type": "string"
- },
- {
- "default": "",
- "description": "Your OpenAI API key",
- "name": "openaiApiKey",
- "type": "string",
- "value": "sk-proj-1234567890"
- },
- {
- "default": 100,
- "description": "Number of records to retrieve from screenpipe per page for structured extraction, keep in mind LLMs have a context window limit. Increase this value if using audio.",
- "name": "pageSize",
- "type": "number"
- },
- {
- "default": "",
- "description": "additional prompt for the AI assistant that will be used to extract information from the screen data every specified amount of minutes",
- "name": "dailylogPrompt",
- "type": "string",
- "value": "make sure to extract tags, topics, and short summary of what i do at that time"
- },
- {
- "default": "",
- "description": "additional prompt for the AI assistant that will be used to generate a list of questions to post on reddit based on the logs previously extracted",
- "name": "customPrompt",
- "type": "string",
- "value": "make sure to generate posts of reasonable length, optimised for attention, providing value, triggering conversations"
- },
- {
- "default": "",
- "description": "Specific window name to filter the screen data, for example 'gmail', 'john', 'slack', 'myCodeFile.tsx', etc. this will filter out audio",
- "name": "windowName",
- "type": "window"
- },
- {
- "default": "all",
- "description": "Type of content to analyze: 'ocr', 'audio', or 'all'. OCR usually contains more content, so it's recommended to choose either OCR or audio rather than 'all' for better performance.",
- "name": "contentType",
- "type": "contentType"
- }
- ],
+ ]
}
```
### running pipes
-for quick dev, run your pipe locally using deno:
+you can run your pipe manually with deno, for example:
```bash
-cd path/to/your/pipe
-deno run --allow-read --allow-write --allow-net --allow-env pipe.ts
-```
-
-**environment variables**: ensure the following environment variables are set for your pipe:
-
-- `SCREENPIPE_DIR`: the directory where screenpipe is installed.
-- `PIPE_ID`: the unique identifier for your pipe.
-- `PIPE_FILE`: the main file of your pipe (e.g., `pipe.ts`).
-- `PIPE_DIR`: the directory of your pipe.
+# these are mandatory env variables
+export SCREENPIPE_DIR="$HOME/.screenpipe"
+export PIPE_ID="pipe-find-leads-with-exa-ai"
+export PIPE_FILE="pipe.ts"
+export PIPE_DIR="$SCREENPIPE_DIR/pipes/pipe-find-leads-with-exa-ai"
-**example**:
+deno run --allow-read --allow-write --allow-env --allow-net --allow-run --allow-sys examples/typescript/pipe-find-leads-with-exa-ai/pipe.ts
+```
-````bash
-export SCREENPIPE_DIR="/path/to/screenpipe"
-export PIPE_ID="my-pipe"
-export PIPE_FILE="pipe.ts"
-export PIPE_DIR="/path/to/screenpipe/pipes/my-pipe"
-````
+make sure to configure your pipe.json first
once the pipe is ready, follow these steps to make it work with `screenpipe`:
diff --git a/examples/typescript/pipe-find-leads-with-exa-ai/README.md b/examples/typescript/pipe-find-leads-with-exa-ai/README.md
new file mode 100644
index 000000000..8e0133432
--- /dev/null
+++ b/examples/typescript/pipe-find-leads-with-exa-ai/README.md
@@ -0,0 +1,64 @@
+
+### find leads with exa ai pipe
+
+this pipe automates the process of finding potential leads based on an evolving ideal customer profile (icp). it uses screenpipe data, exa ai for company search, and openai for analysis and formatting.
+
+#### features
+
+- continuously updates the ideal customer profile (icp) based on user activity
+- searches for potential leads using exa ai
+- formats lead information using ai
+- sends email notifications with potential leads
+- integrates with screenpipe for data collection and notifications
+
+#### requirements
+
+- screenpipe installed and configured
+- deno runtime
+- exa ai api key
+- openai api key
+- gmail account for sending notifications
+
+#### configuration
+
+configure through screenpipe app UI or by editing the `pipe.json` file
+
+#### development usage
+
+1. set up the required environment variables:
+
+```bash
+export SCREENPIPE_DIR="$HOME/.screenpipe"
+export PIPE_ID="pipe-find-leads-with-exa-ai"
+export PIPE_FILE="pipe.ts"
+export PIPE_DIR="$SCREENPIPE_DIR/pipes/pipe-find-leads-with-exa-ai"
+```
+
+2. run the pipe:
+
+```bash
+deno run --allow-read --allow-write --allow-env --allow-net --allow-run --allow-sys $PIPE_DIR/$PIPE_FILE
+```
+
+#### how it works
+
+1. loads the pipe configuration and initializes necessary services
+2. periodically queries screenpipe for recent user activity
+3. updates the ideal customer profile (icp) based on the collected data
+4. searches for potential leads using exa ai based on the updated icp
+5. formats lead information using ai for better readability
+6. sends email notifications with potential leads and updates the icp
+7. sends desktop notifications and updates the screenpipe inbox
+
+#### customization
+
+- adjust the `interval` in the config to change how often the pipe runs
+- modify the `customPrompt` to fine-tune the icp update process
+- update the `aiModel` and `aiApiUrl` to use different ai models or providers
+
+#### notes
+
+- ensure your gmail account is configured to allow less secure apps or use an app-specific password
+- keep your api keys and email credentials secure
+- the pipe creates and maintains an `icp.json` file to store the evolving ideal customer profile
+
diff --git a/examples/typescript/pipe-find-leads-with-exa-ai/deno.json b/examples/typescript/pipe-find-leads-with-exa-ai/deno.json
new file mode 100644
index 000000000..a59b9e101
--- /dev/null
+++ b/examples/typescript/pipe-find-leads-with-exa-ai/deno.json
@@ -0,0 +1,11 @@
+{
+ "imports": {
+ "fs": "node:fs",
+ "nodemailer": "npm:nodemailer",
+ "screenpipe": "https://raw.githubusercontent.com/mediar-ai/screenpipe/main/screenpipe-js/main.ts",
+ "exa-js": "npm:exa-js",
+ "openai-ai-provider": "npm:@ai-sdk/openai",
+ "zod": "npm:zod",
+ "ai": "npm:ai"
+ }
+}
\ No newline at end of file
diff --git a/examples/typescript/pipe-find-leads-with-exa-ai/deno.lock b/examples/typescript/pipe-find-leads-with-exa-ai/deno.lock
new file mode 100644
index 000000000..54eb815eb
--- /dev/null
+++ b/examples/typescript/pipe-find-leads-with-exa-ai/deno.lock
@@ -0,0 +1,485 @@
+{
+ "version": "4",
+ "specifiers": {
+ "npm:@ai-sdk/openai@*": "[email protected]",
+ "npm:@types/node@*": "22.5.4",
+ "npm:ai@*": "[email protected]",
+ "npm:exa-js@*": "1.1.3",
+ "npm:nodemailer@*": "6.9.15",
+ "npm:zod@*": "3.23.8"
+ },
+ "npm": {
+ "integrity": "sha512-V4XeDnlNl5/AY3GB3ozJUjqnBLU5pK3DacKTbCNH3zH8/MggJoH6B8wRGdLUPVFMcsMz60mtvh4DC9JsIVFrKw==",
+ "dependencies": [
+ "@ai-sdk/provider",
+ "@ai-sdk/provider-utils",
+ "zod"
+ ]
+ },
+ "integrity": "sha512-ngg/RGpnA00eNOWEtXHenpX1MsM2QshQh4QJFjUfwcqHpM5kTfG7je7Rc3HcEDP+OkRVv2GF+X4fC1Vfcnl8Ow==",
+ "dependencies": [
+ "@ai-sdk/provider",
+ "eventsource-parser",
+ "secure-json-parse",
+ "zod"
+ ]
+ },
+ "@ai-sdk/[email protected]": {
+ "integrity": "sha512-XMsNGJdGO+L0cxhhegtqZ8+T6nn4EoShS819OvCgI2kLbYTIvk0GWFGD0AXJmxkxs3DrpsJxKAFukFR7bvTkgQ==",
+ "dependencies": [
+ "json-schema"
+ ]
+ },
+ "integrity": "sha512-1asDpxgmeHWL0/EZPCLENxfOHT+0jce0z/zasRhascodm2S6f6/KZn5doLG9jdmarcb+GjMjFmmwyOVXz3W1xg==",
+ "dependencies": [
+ "@ai-sdk/provider-utils",
+ "@ai-sdk/ui-utils",
+ "swr",
+ "zod"
+ ]
+ },
+ "integrity": "sha512-KnfWTt640cS1hM2fFIba8KHSPLpOIWXtEm28pNCHTvqasVKlh2y/zMQANTwE18pF2nuXL9P9F5/dKWaPsaEzQw==",
+ "dependencies": [
+ "@ai-sdk/provider-utils",
+ "@ai-sdk/ui-utils"
+ ]
+ },
+ "integrity": "sha512-aIZJaIds+KpCt19yUDCRDWebzF/17GCY7gN9KkcA2QM6IKRO5UmMcqEYja0ZmwFQPm1kBZkF2njhr8VXis2mAw==",
+ "dependencies": [
+ "@ai-sdk/provider-utils",
+ "@ai-sdk/ui-utils",
+ "sswr"
+ ]
+ },
+ "integrity": "sha512-ZG/wneyJG+6w5Nm/hy1AKMuRgjPQToAxBsTk61c9sVPUTaxo+NNjM2MhXQMtmsja2N5evs8NmHie+ExEgpL3cA==",
+ "dependencies": [
+ "@ai-sdk/provider",
+ "@ai-sdk/provider-utils",
+ "json-schema",
+ "secure-json-parse",
+ "zod",
+ "zod-to-json-schema"
+ ]
+ },
+ "integrity": "sha512-Ltu6gbuii8Qlp3gg7zdwdnHdS4M8nqKDij2VVO1223VOtIFwORFJzKqpfx44U11FW8z2TPVBYN+FjkyVIcN2hg==",
+ "dependencies": [
+ "@ai-sdk/provider-utils",
+ "@ai-sdk/ui-utils",
+ "swrv"
+ ]
+ },
+ "@ampproject/[email protected]": {
+ "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
+ "dependencies": [
+ "@jridgewell/gen-mapping",
+ "@jridgewell/trace-mapping"
+ ]
+ },
+ "@babel/[email protected]": {
+ "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g=="
+ },
+ "@babel/[email protected]": {
+ "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg=="
+ },
+ "@babel/[email protected]": {
+ "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==",
+ "dependencies": [
+ "@babel/types"
+ ]
+ },
+ "@babel/[email protected]": {
+ "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==",
+ "dependencies": [
+ "@babel/helper-string-parser",
+ "@babel/helper-validator-identifier",
+ "to-fast-properties"
+ ]
+ },
+ "@jridgewell/[email protected]": {
+ "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
+ "dependencies": [
+ "@jridgewell/set-array",
+ "@jridgewell/sourcemap-codec",
+ "@jridgewell/trace-mapping"
+ ]
+ },
+ "@jridgewell/[email protected]": {
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="
+ },
+ "@jridgewell/[email protected]": {
+ "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="
+ },
+ "@jridgewell/[email protected]": {
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="
+ },
+ "@jridgewell/[email protected]": {
+ "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
+ "dependencies": [
+ "@jridgewell/resolve-uri",
+ "@jridgewell/sourcemap-codec"
+ ]
+ },
+ "@opentelemetry/[email protected]": {
+ "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="
+ },
+ "@types/[email protected]": {
+ "integrity": "sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg=="
+ },
+ "@types/[email protected]": {
+ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="
+ },
+ "@types/[email protected]": {
+ "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==",
+ "dependencies": [
+ "undici-types"
+ ]
+ },
+ "@vue/[email protected]": {
+ "integrity": "sha512-PwAdxs7/9Hc3ieBO12tXzmTD+Ln4qhT/56S+8DvrrZ4kLDn4Z/AMUr8tXJD0axiJBS0RKIoNaR0yMuQB9v9Udg==",
+ "dependencies": [
+ "@babel/parser",
+ "@vue/shared",
+ "entities",
+ "source-map-js"
+ ]
+ },
+ "@vue/[email protected]": {
+ "integrity": "sha512-pyGf8zdbDDRkBrEzf8p7BQlMKNNF5Fk/Cf/fQ6PiUz9at4OaUfyXW0dGJTo2Vl1f5U9jSLCNf0EZJEogLXoeew==",
+ "dependencies": [
+ "@vue/compiler-core",
+ "@vue/shared"
+ ]
+ },
+ "@vue/[email protected]": {
+ "integrity": "sha512-gsbBtT4N9ANXXepprle+X9YLg2htQk1sqH/qGJ/EApl+dgpUBdTv3yP7YlR535uHZY3n6XaR0/bKo0BgwwDniw==",
+ "dependencies": [
+ "@babel/parser",
+ "@vue/compiler-core",
+ "@vue/compiler-dom",
+ "@vue/compiler-ssr",
+ "@vue/shared",
+ "magic-string",
+ "postcss",
+ "source-map-js"
+ ]
+ },
+ "@vue/[email protected]": {
+ "integrity": "sha512-P4+GPjOuC2aFTk1Z4WANvEhyOykcvEd5bIj2KVNGKGfM745LaXGr++5njpdBTzVz5pZifdlR1kpYSJJpIlSePA==",
+ "dependencies": [
+ "@vue/compiler-dom",
+ "@vue/shared"
+ ]
+ },
+ "@vue/[email protected]": {
+ "integrity": "sha512-Nqo5VZEn8MJWlCce8XoyVqHZbd5P2NH+yuAaFzuNSR96I+y1cnuUiq7xfSG+kyvLSiWmaHTKP1r3OZY4mMD50w==",
+ "dependencies": [
+ "@vue/shared"
+ ]
+ },
+ "@vue/[email protected]": {
+ "integrity": "sha512-7PsxFGqwfDhfhh0OcDWBG1DaIQIVOLgkwA5q6MtkPiDFjp5gohVnJEahSktwSFLq7R5PtxDKy6WKURVN1UDbzA==",
+ "dependencies": [
+ "@vue/reactivity",
+ "@vue/shared"
+ ]
+ },
+ "@vue/[email protected]": {
+ "integrity": "sha512-GNghjecT6IrGf0UhuYmpgaOlN7kxzQBhxWEn08c/SQDxv1yy4IXI1bn81JgEpQ4IXjRxWtPyI8x0/7TF5rPfYQ==",
+ "dependencies": [
+ "@vue/reactivity",
+ "@vue/runtime-core",
+ "@vue/shared",
+ "csstype"
+ ]
+ },
+ "integrity": "sha512-cVOwYBxR7Wb1B1FoxYvtjJD8X/9E5nlH4VSkJy2uMA1MzYNdzAAB//l8nrmN9py/4aP+3NjWukf9PZ3TeWULaA==",
+ "dependencies": [
+ "@vue/compiler-ssr",
+ "@vue/shared",
+ "vue"
+ ]
+ },
+ "@vue/[email protected]": {
+ "integrity": "sha512-W8GgysJVnFo81FthhzurdRAWP/byq3q2qIw70e0JWblzVhjgOMiC2GyovXrZTFQJnFVryYaKGP3Tc9vYzYm6PQ=="
+ },
+ "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg=="
+ },
+ "integrity": "sha512-wmVzpIHNGjCEjIJ/3945a/DIkz+gwObjC767ZRgO8AmtIZMO5KqvqNr7n2KF+gQrCPCMC8fM1ICQFXSvBZnBlA==",
+ "dependencies": [
+ "@ai-sdk/provider",
+ "@ai-sdk/provider-utils",
+ "@ai-sdk/react",
+ "@ai-sdk/solid",
+ "@ai-sdk/svelte",
+ "@ai-sdk/ui-utils",
+ "@ai-sdk/vue",
+ "@opentelemetry/api",
+ "eventsource-parser",
+ "json-schema",
+ "jsondiffpatch",
+ "secure-json-parse",
+ "zod",
+ "zod-to-json-schema"
+ ]
+ },
+ "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="
+ },
+ "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="
+ },
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w=="
+ },
+ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
+ },
+ "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
+ "dependencies": [
+ "@jridgewell/sourcemap-codec",
+ "@types/estree",
+ "acorn",
+ "periscopic"
+ ]
+ },
+ "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==",
+ "dependencies": [
+ "node-fetch"
+ ]
+ },
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
+ "dependencies": [
+ "mdn-data",
+ "source-map-js"
+ ]
+ },
+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
+ },
+ "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw=="
+ },
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="
+ },
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
+ },
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
+ "dependencies": [
+ "@types/estree"
+ ]
+ },
+ "integrity": "sha512-v0eOBUbiaFojBu2s2NPBfYUoRR9GjcDNvCXVaqEf5vVfpIAh9f8RCo4vXTP8c63QRKCFwoLpMpTdPwwhEKVgzA=="
+ },
+ "integrity": "sha512-Ss+tQraOHToj73PI8GR2prsaeyvGhvAHcMiG9ryhFw/YwrctkWugACy/qkbd1YPPzcT7zSX2kmUsezOQuXwXbQ==",
+ "dependencies": [
+ "cross-fetch"
+ ]
+ },
+ "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
+ "dependencies": [
+ "@types/estree"
+ ]
+ },
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+ },
+ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA=="
+ },
+ "integrity": "sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==",
+ "dependencies": [
+ "@types/diff-match-patch",
+ "chalk",
+ "diff-match-patch"
+ ]
+ },
+ "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA=="
+ },
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "dependencies": [
+ "js-tokens"
+ ]
+ },
+ "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==",
+ "dependencies": [
+ "@jridgewell/sourcemap-codec"
+ ]
+ },
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA=="
+ },
+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA=="
+ },
+ "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g=="
+ },
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "dependencies": [
+ "whatwg-url"
+ ]
+ },
+ "integrity": "sha512-AHf04ySLC6CIfuRtRiEYtGEXgRfa6INgWGluDhnxTZhHSKvrBu7lc1VVchQ0d8nPc4cFaZoPq8vkyNoZr0TpGQ=="
+ },
+ "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
+ "dependencies": [
+ "@types/estree",
+ "is-reference"
+ ]
+ },
+ "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw=="
+ },
+ "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==",
+ "dependencies": [
+ "picocolors",
+ "source-map-js"
+ ]
+ },
+ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
+ "dependencies": [
+ "loose-envify"
+ ]
+ },
+ "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw=="
+ },
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="
+ },
+ "integrity": "sha512-Cqc355SYlTAaUt8iDPaC/4DPPXK925PePLMxyBKuWd5kKc5mwsG3nT9+Mq2tyguL5s7b4Jg+IRMpTRsNTAfpSQ==",
+ "dependencies": [
+ "svelte",
+ "swrev"
+ ]
+ },
+ "integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==",
+ "dependencies": [
+ "@ampproject/remapping",
+ "@jridgewell/sourcemap-codec",
+ "@jridgewell/trace-mapping",
+ "@types/estree",
+ "acorn",
+ "aria-query",
+ "axobject-query",
+ "code-red",
+ "css-tree",
+ "is-reference",
+ "locate-character",
+ "magic-string",
+ "periscopic"
+ ]
+ },
+ "integrity": "sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==",
+ "dependencies": [
+ "client-only",
+ "react",
+ "use-sync-external-store"
+ ]
+ },
+ "integrity": "sha512-LqVcOHSB4cPGgitD1riJ1Hh4vdmITOp+BkmfmXRh4hSF/t7EnS4iD+SOTmq7w5pPm/SiPeto4ADbKS6dHUDWFA=="
+ },
+ "integrity": "sha512-zjEkcP8Ywmj+xOJW3lIT65ciY/4AL4e/Or7Gj0MzU3zBJNMdJiT8geVZhINavnlHRMMCcJLHhraLTAiDOTmQ9g==",
+ "dependencies": [
+ "vue"
+ ]
+ },
+ "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog=="
+ },
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
+ },
+ "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="
+ },
+ "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==",
+ "dependencies": [
+ "react"
+ ]
+ },
+ "integrity": "sha512-/8Wurrd9J3lb72FTQS7gRMNQD4nztTtKPmuDuPuhqXmmpD6+skVjAeahNpVzsuky6Sy9gy7wn8UadqPtt9SQIg==",
+ "dependencies": [
+ "@vue/compiler-dom",
+ "@vue/compiler-sfc",
+ "@vue/runtime-dom",
+ "@vue/server-renderer",
+ "@vue/shared"
+ ]
+ },
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
+ },
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "dependencies": [
+ "tr46",
+ "webidl-conversions"
+ ]
+ },
+ "integrity": "sha512-uSt90Gzc/tUfyNqxnjlfBs8W6WSGpNBv0rVsNxP/BVSMHMKGdthPYff4xtCHYloJGM0CFxFsb3NbC0eqPhfImw==",
+ "dependencies": [
+ "zod"
+ ]
+ },
+ "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g=="
+ }
+ },
+ "remote": {
+ "https://raw.githubusercontent.com/mediar-ai/screenpipe/main/screenpipe-js/main.ts": "6b675a0378d55cfb48677148b497033a790b243067e15e2121ce4385a25d02a7"
+ },
+ "workspace": {
+ "dependencies": [
+ "npm:@ai-sdk/openai@*",
+ "npm:ai@*",
+ "npm:exa-js@*",
+ "npm:nodemailer@*",
+ "npm:zod@*"
+ ]
+ }
+}
diff --git a/examples/typescript/pipe-find-leads-with-exa-ai/pipe.json b/examples/typescript/pipe-find-leads-with-exa-ai/pipe.json
new file mode 100644
index 000000000..6c53e989a
--- /dev/null
+++ b/examples/typescript/pipe-find-leads-with-exa-ai/pipe.json
@@ -0,0 +1,94 @@
+{
+ "fields": [
+ {
+ "name": "exaApiKey",
+ "type": "string",
+ "default": "",
+ "description": "your exa ai api key"
+ },
+ {
+ "name": "interval",
+ "type": "number",
+ "default": 60,
+ "description": "Interval in seconds to read your screen data and extract structured logs (will be used to summarize and send an email). Increase this value if using audio."
+ },
+ {
+ "name": "summaryFrequency",
+ "type": "string",
+ "default": "daily",
+ "description": "Frequency of summary emails: 'daily' for once a day at emailTime, or 'hourly:X' for every X hours (e.g., 'hourly:4' for every 4 hours)"
+ },
+ {
+ "name": "emailTime",
+ "type": "time",
+ "default": "11:00",
+ "description": "Time to send daily summary email (used only if summaryFrequency is 'daily')"
+ },
+ {
+ "name": "emailAddress",
+ "type": "string",
+ "default": "",
+ "description": "Email address to send the daily summary to"
+ },
+ {
+ "name": "emailPassword",
+ "type": "string",
+ "default": "",
+ "description": "App specific password for your gmail account, https://support.google.com/accounts/answer/185833?hl=en"
+ },
+ {
+ "name": "aiUrl",
+ "type": "string",
+ "default": "https://api.openai.com/v1/chat/completions",
+ "description": "openai-compatible API URL"
+ },
+ {
+ "name": "aiModel",
+ "type": "string",
+ "default": "gpt-4o",
+ "description": "AI Model name"
+ },
+ {
+ "name": "aiApiKey",
+ "type": "string",
+ "default": "",
+ "description": "Your OpenAI API key"
+ },
+ {
+ "name": "pageSize",
+ "type": "number",
+ "default": 100,
+ "description": "Number of records to retrieve from screenpipe per page for structured extraction, keep in mind LLMs have a context window limit. Increase this value if using audio."
+ },
+ {
+ "name": "dailylogPrompt",
+ "type": "string",
+ "default": "",
+ "description": "additional prompt for the AI assistant that will be used to extract information from the screen data every specified amount of minutes"
+ },
+ {
+ "name": "customPrompt",
+ "type": "string",
+ "default": "my product is screenpipe, it records screens & mics 24/7 and connect it to AI, saves hours of work when dealing with CRMs, finding leads, etc.",
+ "description": "additional prompt for the AI assistant that will be used to generate a list of questions to post on reddit based on the logs previously extracted"
+ },
+ {
+ "name": "windowName",
+ "type": "window",
+ "default": "",
+ "description": "Specific window name to filter the screen data, for example 'gmail', 'john', 'slack', 'myCodeFile.tsx', etc. this will filter out audio"
+ },
+ {
+ "name": "appName",
+ "type": "app",
+ "default": "",
+ "description": "Specific app name to filter the screen data, for example 'gmail', 'slack', 'notion', 'google docs', etc. this will filter out audio"
+ },
+ {
+ "name": "contentType",
+ "type": "contentType",
+ "default": "all",
+ "description": "Type of content to analyze: 'ocr', 'audio', or 'all'. OCR usually contains more content, so it's recommended to choose either OCR or audio rather than 'all' for better performance."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/examples/typescript/pipe-find-leads-with-exa-ai/pipe.ts b/examples/typescript/pipe-find-leads-with-exa-ai/pipe.ts
new file mode 100644
index 000000000..ea8d4d594
--- /dev/null
+++ b/examples/typescript/pipe-find-leads-with-exa-ai/pipe.ts
@@ -0,0 +1,316 @@
+import * as fs from "fs";
+import nodemailer from "nodemailer";
+import { ContentItem, pipe } from "screenpipe";
+import process from "node:process";
+import Exa from "exa-js";
+import { generateObject, generateText } from "ai";
+import { createOpenAI } from "openai-ai-provider";
+import { z } from "zod";
+import * as path from "node:path";
+
+const icpSchema = z.object({
+ idealCustomerProfile: z.object({
+ industry: z.string().optional(),
+ companySize: z.string().optional(),
+ jobTitles: z.array(z.string()).optional(),
+ painPoints: z.array(z.string()).optional(),
+ interests: z.array(z.string()).optional(),
+ technologies: z.array(z.string()).optional(),
+ demographics: z
+ .object({
+ location: z.string().optional(),
+ age: z.string().optional(),
+ gender: z.string().optional(),
+ })
+ .optional(),
+ }),
+});
+
+async function dailyLeadsPipeline(): Promise<void> {
+ console.log("starting daily leads pipeline");
+
+ const config = pipe.loadPipeConfig();
+ console.log("loaded config:", JSON.stringify(config, null, 2));
+
+ const interval = config.interval * 1000;
+ const emailAddress = config.emailAddress;
+ const emailPassword = config.emailPassword;
+ const customPrompt = config.customPrompt;
+ const gptModel = config.aiModel;
+ const gptApiUrl = config.aiApiUrl;
+ const openaiApiKey = config.aiApiKey;
+ const windowName = config.windowName || "";
+ const appName = config.appName || "";
+ const pageSize = config.pageSize;
+ const exaApiKey = config.exaApiKey;
+
+ const exa = new Exa(exaApiKey);
+
+ const icpFilePath = path.join(process.env.PIPE_DIR!, "icp.json");
+
+ while (true) {
+ try {
+ const now = new Date();
+ const oneMinuteAgo = new Date(now.getTime() - interval);
+
+ const screenData = await pipe.queryScreenpipe({
+ startTime: oneMinuteAgo.toISOString(),
+ endTime: now.toISOString(),
+ windowName: windowName,
+ appName: appName,
+ limit: pageSize,
+ contentType: "all",
+ });
+
+ if (screenData && screenData.data && screenData.data.length > 0) {
+ const currentICP = loadICP(icpFilePath);
+ const updatedICP = await updateICP(
+ screenData.data,
+ currentICP,
+ customPrompt,
+ gptModel,
+ gptApiUrl,
+ openaiApiKey
+ );
+ saveICP(icpFilePath, updatedICP);
+ console.log("updated icp:", updatedICP);
+
+ const potentialLeads = await findPotentialLeadsWithExa(
+ exa,
+ updatedICP,
+ gptModel,
+ gptApiUrl,
+ openaiApiKey
+ );
+ console.log("potential leads:", potentialLeads);
+
+ if (potentialLeads.length > 0) {
+ const emailContent = generateLeadEmailContent(
+ potentialLeads,
+ updatedICP
+ );
+
+ await sendEmail(
+ emailAddress,
+ emailPassword,
+ "potential leads found",
+ emailContent
+ );
+ await pipe.inbox.send({
+ title: "potential leads",
+ body: emailContent,
+ });
+ await pipe.sendDesktopNotification({
+ title: "potential leads",
+ body: "just sent you some potential leads",
+ });
+ }
+ }
+ } catch (error) {
+ console.warn("error in daily leads pipeline:", error);
+ }
+ console.log("sleeping for", interval, "ms");
+ await new Promise((resolve) => setTimeout(resolve, interval));
+ }
+}
+
+function loadICP(
+ filePath: string
+): z.infer<typeof icpSchema>["idealCustomerProfile"] {
+ try {
+ if (!fs.existsSync(filePath)) {
+ console.log("icp file not found, creating new one");
+ const emptyICP = {};
+ saveICP(filePath, emptyICP);
+ return emptyICP;
+ }
+ const data = fs.readFileSync(filePath, "utf8");
+ return JSON.parse(data);
+ } catch (error) {
+ console.warn("failed to load icp, returning empty object:", error);
+ return {};
+ }
+}
+
+function saveICP(
+ filePath: string,
+ icp: z.infer<typeof icpSchema>["idealCustomerProfile"]
+): void {
+ fs.writeFileSync(filePath, JSON.stringify(icp, null, 2));
+}
+
+async function updateICP(
+ screenData: ContentItem[],
+ currentICP: z.infer<typeof icpSchema>["idealCustomerProfile"],
+ customPrompt: string,
+ gptModel: string,
+ gptApiUrl: string,
+ openaiApiKey: string
+): Promise<z.infer<typeof icpSchema>["idealCustomerProfile"]> {
+ const prompt = `${customPrompt}
+
+ based on the following screen and audio data, analyze the user's activity and update the existing ideal customer profile (icp):
+
+ current icp:
+ ${JSON.stringify(currentICP, null, 2)}
+
+ new screen data:
+ ${JSON.stringify(screenData)}
+
+ rules:
+ - focus on updating the icp based on the user's recent interests, browsing habits, and content they engage with
+ - consider new industry trends, technologies used, and pain points discussed
+ - maintain consistency with the existing icp, only update or add information when there's strong evidence
+ - do not remove existing information unless directly contradicted by new data
+ `;
+
+ const provider = createOpenAI({
+ apiKey: openaiApiKey,
+ baseURL: gptApiUrl,
+ });
+
+ const response = await generateObject({
+ model: provider(gptModel),
+ messages: [{ role: "user", content: prompt }],
+ schema: icpSchema,
+ });
+
+ console.log("ai response for icp update:", response.object);
+
+ return response.object.idealCustomerProfile;
+}
+
+async function findPotentialLeadsWithExa(
+ exa: Exa,
+ icp: z.infer<typeof icpSchema>["idealCustomerProfile"],
+ gptModel: string,
+ gptApiUrl: string,
+ openaiApiKey: string
+): Promise<string[]> {
+ const query = `companies in ${icp.industry || "any industry"}
+ with ${icp.companySize || "any company size"}
+ using ${icp.technologies?.join(", ") || "any technologies"}
+ ${
+ icp.demographics?.location
+ ? `in ${icp.demographics.location}`
+ : ""
+ }`;
+
+ const results = await exa.searchAndContents(query, {
+ type: "neural",
+ useAutoprompt: true,
+ numResults: 10,
+ text: true,
+ category: "company",
+ });
+
+ const formattedResults = await formatLeadsWithAI(
+ results.results,
+ icp,
+ gptModel,
+ gptApiUrl,
+ openaiApiKey
+ );
+ return formattedResults;
+}
+
+async function formatLeadsWithAI(
+ leads: any[],
+ icp: z.infer<typeof icpSchema>["idealCustomerProfile"],
+ gptModel: string,
+ gptApiUrl: string,
+ openaiApiKey: string
+): Promise<string[]> {
+ const provider = createOpenAI({
+ apiKey: openaiApiKey,
+ baseURL: gptApiUrl,
+ });
+
+ const formattedLeads = [];
+
+ for (const lead of leads) {
+ const prompt = `
+ Format the following company information in markdown and identify potential pain points based on the given ICP:
+
+ Company: ${lead.title}
+ URL: ${lead.url}
+ Summary: ${lead.text}
+
+ ICP:
+ ${JSON.stringify(icp, null, 2)}
+
+ Rules:
+ - Use markdown formatting
+ - Highlight the company name as a header
+ - Include the URL
+ - Provide a brief summary
+ - Identify 2-3 potential pain points based on the ICP and company information
+ - Keep the total output under 200 words
+ `;
+
+ const response = await generateText({
+ model: provider(gptModel),
+ messages: [{ role: "user", content: prompt }],
+ });
+
+ formattedLeads.push(response.text);
+ }
+
+ return formattedLeads;
+}
+
+function generateLeadEmailContent(
+ potentialLeads: string[],
+ icp: z.infer<typeof icpSchema>["idealCustomerProfile"]
+): string {
+ let content = "# ideal customer profile:\n\n";
+ content += "```json\n" + JSON.stringify(icp, null, 2) + "\n```\n\n";
+ content += "# potential leads found:\n\n";
+
+ for (const lead of potentialLeads) {
+ content += lead + "\n\n";
+ }
+
+ return content;
+}
+
+async function sendEmail(
+ to: string,
+ password: string,
+ subject: string,
+ body: string
+): Promise<void> {
+ const transporter = nodemailer.createTransport({
+ host: "smtp.gmail.com",
+ port: 587,
+ secure: false,
+ auth: {
+ user: to,
+ pass: password,
+ },
+ });
+
+ const info = await transporter.sendMail({
+ from: to,
+ to: to,
+ subject: subject,
+ text: body,
+ });
+
+ if (!info) {
+ throw new Error("failed to send email");
+ }
+ console.log(`email sent to ${to} with subject: ${subject}`);
+}
+
+dailyLeadsPipeline();
+
+/*
+export SCREENPIPE_DIR="$HOME/.screenpipe"
+export PIPE_ID="pipe-find-leads-with-exa-ai"
+export PIPE_FILE="pipe.ts"
+export PIPE_DIR="$SCREENPIPE_DIR/pipes/pipe-find-leads-with-exa-ai"
+
+deno run --allow-read --allow-write --allow-env --allow-net --allow-run --allow-sys examples/typescript/pipe-find-leads-with-exa-ai/pipe.ts
+
+*/
diff --git a/screenpipe-app-tauri/components/pipe-config-form.tsx b/screenpipe-app-tauri/components/pipe-config-form.tsx
index b2a396c7d..6a55d1120 100644
--- a/screenpipe-app-tauri/components/pipe-config-form.tsx
+++ b/screenpipe-app-tauri/components/pipe-config-form.tsx
@@ -220,6 +220,37 @@ export const PipeConfigForm: React.FC<PipeConfigFormProps> = ({
</TooltipProvider>
</div>
);
+ case "app":
+ return (
+ <div className="flex items-center space-x-2 w-full">
+ <SqlAutocompleteInput
+ className="w-full"
+ id={field.name}
+ placeholder={`Enter ${field.name}`}
+ value={value}
+ onChange={(newValue) => handleInputChange(field.name, newValue)}
+ type="app"
+ icon={<Layout className="h-4 w-4" />}
+ />
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ size="icon"
+ variant="ghost"
+ onClick={resetToDefault}
+ className="h-8 w-8"
+ >
+ <RefreshCw className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>
+ <p>Reset to default</p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </div>
+ );
case "contentType":
return (
<div className="space-y-2">
diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsx
index 9b3b9543c..47d5441c5 100644
--- a/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/screenpipe-app-tauri/components/pipe-store.tsx
@@ -432,7 +432,7 @@ const PipeDialog: React.FC = () => {
{selectedPipe.enabled && (
<>
- <Collapsible
+ {/* <Collapsible
open={isLogOpen}
onOpenChange={setIsLogOpen}
className="w-full mt-4"
@@ -447,7 +447,7 @@ const PipeDialog: React.FC = () => {
<LogViewer className="mt-2" />
</CollapsibleContent>
</Collapsible>
- <Separator className="my-4" />
+ <Separator className="my-4" /> */}
<PipeConfigForm
pipe={selectedPipe}
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 24d1abd60..13be4a0cf 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.4.2"
+version = "0.4.3"
description = ""
authors = ["you"]
license = ""
diff --git a/screenpipe-js/deno.lock b/screenpipe-js/deno.lock
new file mode 100644
index 000000000..4af223d6b
--- /dev/null
+++ b/screenpipe-js/deno.lock
@@ -0,0 +1,383 @@
+{
+ "version": "4",
+ "specifiers": {
+ "npm:@types/node@*": "22.5.4",
+ "npm:[email protected]": "4.18.2",
+ "npm:[email protected]": "5.1.1",
+ "npm:[email protected]": "7.1.0"
+ },
+ "npm": {
+ "@types/[email protected]": {
+ "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==",
+ "dependencies": [
+ "undici-types"
+ ]
+ },
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dependencies": [
+ "mime-types",
+ "negotiator"
+ ]
+ },
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
+ },
+ "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
+ "dependencies": [
+ "bytes",
+ "content-type",
+ "debug",
+ "depd",
+ "destroy",
+ "http-errors",
+ "iconv-lite",
+ "on-finished",
+ "qs",
+ "raw-body",
+ "type-is",
+ "unpipe"
+ ]
+ },
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
+ },
+ "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
+ "dependencies": [
+ "es-define-property",
+ "es-errors",
+ "function-bind",
+ "get-intrinsic",
+ "set-function-length"
+ ]
+ },
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dependencies": [
+ "safe-buffer"
+ ]
+ },
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="
+ },
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
+ },
+ "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw=="
+ },
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dependencies": [
+ ]
+ },
+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
+ "dependencies": [
+ "es-define-property",
+ "es-errors",
+ "gopd"
+ ]
+ },
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
+ },
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
+ },
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
+ },
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="
+ },
+ "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
+ "dependencies": [
+ "get-intrinsic"
+ ]
+ },
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="
+ },
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
+ },
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
+ },
+ "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
+ "dependencies": [
+ "accepts",
+ "array-flatten",
+ "body-parser",
+ "content-disposition",
+ "content-type",
+ "cookie",
+ "cookie-signature",
+ "debug",
+ "depd",
+ "encodeurl",
+ "escape-html",
+ "etag",
+ "finalhandler",
+ "fresh",
+ "http-errors",
+ "merge-descriptors",
+ "methods",
+ "on-finished",
+ "parseurl",
+ "path-to-regexp",
+ "proxy-addr",
+ "qs",
+ "range-parser",
+ "safe-buffer",
+ "send",
+ "serve-static",
+ "setprototypeof",
+ "statuses",
+ "type-is",
+ "utils-merge",
+ "vary"
+ ]
+ },
+ "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "dependencies": [
+ "debug",
+ "encodeurl",
+ "escape-html",
+ "on-finished",
+ "parseurl",
+ "statuses",
+ "unpipe"
+ ]
+ },
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
+ },
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="
+ },
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
+ },
+ "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
+ "dependencies": [
+ "es-errors",
+ "function-bind",
+ "has-proto",
+ "has-symbols",
+ "hasown"
+ ]
+ },
+ "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ=="
+ },
+ "integrity": "sha512-QB9NKEeDg3xxVwCCwJQ9+xycaz6pBB6iQ76wiWMl1927n0Kir6alPiP+yuiICLLU4jpMe08dXfpebuQppFA2zw=="
+ },
+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+ "dependencies": [
+ "get-intrinsic"
+ ]
+ },
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
+ "dependencies": [
+ "es-define-property"
+ ]
+ },
+ "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q=="
+ },
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
+ },
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "dependencies": [
+ "function-bind"
+ ]
+ },
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "dependencies": [
+ "depd",
+ "inherits",
+ "setprototypeof",
+ "statuses",
+ "toidentifier"
+ ]
+ },
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dependencies": [
+ "safer-buffer"
+ ]
+ },
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
+ },
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ=="
+ },
+ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
+ },
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w=="
+ },
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
+ },
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dependencies": [
+ "mime-db"
+ ]
+ },
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
+ },
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
+ },
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
+ },
+ "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g=="
+ },
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "dependencies": [
+ "ee-first"
+ ]
+ },
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
+ },
+ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
+ },
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "dependencies": [
+ "forwarded",
+ "ipaddr.js"
+ ]
+ },
+ "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+ "dependencies": [
+ "side-channel"
+ ]
+ },
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
+ },
+ "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "dependencies": [
+ "bytes",
+ "http-errors",
+ "iconv-lite",
+ "unpipe"
+ ]
+ },
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
+ },
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
+ "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "dependencies": [
+ "debug",
+ "depd",
+ "destroy",
+ "encodeurl",
+ "escape-html",
+ "etag",
+ "fresh",
+ "http-errors",
+ "mime",
+ "on-finished",
+ "range-parser",
+ "statuses"
+ ]
+ },
+ "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "dependencies": [
+ "encodeurl",
+ "escape-html",
+ "parseurl",
+ "send"
+ ]
+ },
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
+ "dependencies": [
+ "define-data-property",
+ "es-errors",
+ "function-bind",
+ "get-intrinsic",
+ "gopd",
+ "has-property-descriptors"
+ ]
+ },
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
+ },
+ "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
+ "dependencies": [
+ "call-bind",
+ "es-errors",
+ "get-intrinsic",
+ "object-inspect"
+ ]
+ },
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="
+ },
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
+ },
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dependencies": [
+ "media-typer",
+ "mime-types"
+ ]
+ },
+ "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="
+ },
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="
+ },
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA=="
+ },
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
+ }
+ }
+}
diff --git a/screenpipe-js/main.ts b/screenpipe-js/main.ts
index 83ce67488..383bdecb3 100644
--- a/screenpipe-js/main.ts
+++ b/screenpipe-js/main.ts
@@ -110,7 +110,7 @@ export interface ParsedConfig<T = unknown> {
name: string;
value?: T;
default?: T;
- }[]
+ }[];
}
/**
diff --git a/screenpipe-server/src/pipe_manager.rs b/screenpipe-server/src/pipe_manager.rs
index a70083dd3..09db0ea0f 100644
--- a/screenpipe-server/src/pipe_manager.rs
+++ b/screenpipe-server/src/pipe_manager.rs
@@ -121,15 +121,21 @@ impl PipeManager {
config,
}
}
+
pub async fn list_pipes(&self) -> Vec<PipeInfo> {
let pipe_dir = self.screenpipe_dir.join("pipes");
let mut pipe_infos = Vec::new();
if let Ok(mut entries) = tokio::fs::read_dir(pipe_dir).await {
while let Ok(Some(entry)) = entries.next_entry().await {
- let pipe_id = entry.file_name().to_string_lossy().into_owned();
- let config_path = entry.path().join("pipe.json");
- pipe_infos.push(Self::load_pipe_info(pipe_id, config_path));
+ let file_name = entry.file_name();
+ let pipe_id = file_name.to_string_lossy();
+
+ // ignore hidden directories
+ if !pipe_id.starts_with('.') {
+ let config_path = entry.path().join("pipe.json");
+ pipe_infos.push(Self::load_pipe_info(pipe_id.into_owned(), config_path));
+ }
}
}