{"_id":"@anura-gate/watcher-linkedin","_rev":"2-eb38bfcad6c4efb3afc48cb07ede0ef8","name":"@anura-gate/watcher-linkedin","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@anura-gate/watcher-linkedin","version":"0.1.0","keywords":["gate","watcher","linkedin","monitoring","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-linkedin@0.1.0","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-linkedin":"cli.js"},"dist":{"shasum":"b866bb0fdfb1dfc47d444c4d2a06c80096849672","tarball":"https://registry.npmjs.org/@anura-gate/watcher-linkedin/-/watcher-linkedin-0.1.0.tgz","fileCount":7,"integrity":"sha512-+dtEuN2BIr95sOM4DSPFQ92wXebI2lTF0fJq14jHJFOiBpDeQZ+nnOSP9Wjk+7x9ALpFvbVrLzCMVhx3tzzjVw==","signatures":[{"sig":"MEYCIQDeo7oHyJynPIgKNVrRxKYBTTfLwtFlVSj3acGWTXO9KQIhALDKYh+GxdWEpDPpl2sh1Un25fVKvrHZpto5AfAmHUhK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56065},"main":"index.js","engines":{"node":">=18"},"gitHead":"a6d964a102c8ef179d53eb0e1ea2296435319a4b","scripts":{"dev":"node cli.js","start":"node cli.js"},"_npmUser":{"name":"anuragate","email":"ahmadajmal1514@gmail.com"},"_npmVersion":"10.9.2","description":"GATE Watcher — Self-hosted daemon for LinkedIn monitoring. Session never leaves your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"dotenv":"^17.3.1","qrcode":"^1.5.4","puppeteer":"^24.2.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-linkedin_0.1.0_1771499625915_0.16808653519716987","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@anura-gate/watcher-linkedin","version":"0.2.0","description":"GATE Watcher — Self-hosted daemon for LinkedIn monitoring. Session never leaves your machine.","main":"index.js","bin":{"gate-watcher-linkedin":"cli.js"},"scripts":{"start":"node cli.js","dev":"node cli.js"},"keywords":["gate","watcher","linkedin","monitoring","self-hosted"],"license":"MIT","homepage":"https://anuragate.com","repository":{"type":"git","url":"git+https://github.com/ahmad-ajmal/AnuraGate_Sample.git"},"dependencies":{"dotenv":"^17.3.1","puppeteer":"^24.2.1","qrcode":"^1.5.4"},"engines":{"node":">=18"},"_id":"@anura-gate/watcher-linkedin@0.2.0","gitHead":"0ebb362ebdf75c602ccbaa15cb7db91b80f2901d","bugs":{"url":"https://github.com/ahmad-ajmal/AnuraGate_Sample/issues"},"_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-IZ5S14EHwMrhZn1iHTtQv86Tb9gGcJaPFkjljbwnOhyVJQsht9y55DnRIYengb7hHSbJ59Dz4PuYsDVAZiuOyw==","shasum":"bed9deff28f2e9e1bab8d17eb2981bcffba960ef","tarball":"https://registry.npmjs.org/@anura-gate/watcher-linkedin/-/watcher-linkedin-0.2.0.tgz","fileCount":8,"unpackedSize":60667,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC+Qx5OBnyCVtVUyP/Vuj7LkFJfCZ+aXmZxrlYYjuKpoQIhAMbANMY0ga6P8t/w7kZdg0U3py3gmR8J44VQHJ+rw+kC"}]},"_npmUser":{"name":"anuragate","email":"ahmadajmal1514@gmail.com"},"directories":{},"maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/watcher-linkedin_0.2.0_1772353021837_0.5604468769672581"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-19T11:13:45.814Z","modified":"2026-03-01T08:17:02.226Z","0.1.0":"2026-02-19T11:13:46.127Z","0.2.0":"2026-03-01T08:17:02.052Z"},"license":"MIT","keywords":["gate","watcher","linkedin","monitoring","self-hosted"],"description":"GATE Watcher — Self-hosted daemon for LinkedIn monitoring. Session never leaves your machine.","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"readme":"# GATE Watcher — LinkedIn\n\nSelf-hosted daemon that monitors your LinkedIn messages via an automated browser session and pushes events to GATE cloud for security processing. **Your LinkedIn session never leaves your machine.**\n\n## How it works\n\n```\nYour Machine (Watcher)              GATE Cloud\n┌─────────────────────┐        ┌──────────────────┐\n│ LinkedIn browser     │───────>│ Security pipeline │\n│ session (stays HERE) │<───────│ (redact, policy,  │\n│                      │ poll   │  audit, forward)  │\n└─────────────────────┘        └──────────────────┘\n```\n\n## Quick Start (CLI)\n\n```bash\ncd gate-watcher-linkedin\nnpm install\n\n# Create .env (or pass env vars directly)\ncp .env.example .env\n# Fill in GATE_KEY, GATE_INTEGRATION_ID\n\nnpm start\n```\n\nA browser window will open on first launch — log in to LinkedIn manually. The session is saved locally for future headless runs.\n\n## Embed in Your App (SDK)\n\n```bash\nnpm install @anura-gate/watcher-linkedin\n```\n\n```js\nconst { GateLinkedInWatcher } = require(\"@anura-gate/watcher-linkedin\");\n\nconst watcher = new GateLinkedInWatcher({\n  gateKey: \"gk-xxx\",\n  integrationId: \"int_xxx\",\n});\n\nwatcher.on(\"login_required\", () => {\n  console.log(\"Please log in to LinkedIn in the browser window...\");\n});\n\nwatcher.on(\"ready\", () => {\n  console.log(\"LinkedIn connected!\");\n});\n\n// Every new message after GATE security processing\nwatcher.on(\"message\", (msg, result) => {\n  console.log(`From: ${msg.senderName}, Text: ${msg.text}`);\n  console.log(`Security actions: ${result.securityActions}`);\n  console.log(`Blocked: ${result.blocked}`);\n});\n\nwatcher.on(\"action_result\", ({ action, success, error }) => {\n  console.log(`${action}: ${success ? \"done\" : error}`);\n});\n\nawait watcher.start();\n\n// Later...\nawait watcher.stop();\n```\n\n## SDK Events\n\n| Event | Args | Description |\n|---|---|---|\n| `login_required` | — | Browser opened for manual LinkedIn login |\n| `ready` | — | LinkedIn session active, polling started |\n| `message` | `(msg, result)` | New message processed by GATE |\n| `message_sent` | `(msg)` | Message sent via action |\n| `action` | `(action)` | Outbound action received from GATE queue |\n| `action_result` | `({ actionId, action, success, result, error })` | Outbound action completed |\n| `gate_error` | `({ path, status, error })` | GATE API call failed |\n| `limit_reached` | `(type)` | Plan limit hit |\n| `stopped` | — | Watcher fully shut down |\n\n## SDK Options\n\n| Option | Required | Default | Description |\n|---|---|---|---|\n| `gateKey` | Yes | — | Virtual key (`gk-xxx`) |\n| `integrationId` | Yes | — | Integration ID (`int_xxx`) |\n| `gateUrl` | No | `\"https://anuragate.com\"` | GATE cloud URL |\n| `sessionDir` | No | `\"./.linkedin_session\"` | Path to store browser session |\n| `headless` | No | auto | Run browser headless (auto after first login) |\n| `pollInterval` | No | `10000` | ms between message polls |\n| `heartbeatInterval` | No | `30000` | ms between heartbeats |\n| `puppeteer` | No | — | Extra Puppeteer launch options |\n| `sessionId` | No | — | Session ID for multi-tenant use |\n| `sessionLabel` | No | — | Human-readable session label |\n| `sessionMetadata` | No | `{}` | Arbitrary metadata for the session |\n\n## Setup\n\n1. Go to **GATE Dashboard → Integrations → Add Integration**\n2. Select **LinkedIn**, copy the **Integration ID**\n3. Copy your **Virtual Key** from the **Keys** page\n4. Set the env vars and run — a browser window will open on first launch for you to log in\n\n## Environment Variables\n\n| Variable | Required | Description |\n|---|---|---|\n| `GATE_KEY` | Yes | Your GATE virtual key |\n| `GATE_INTEGRATION_ID` | Yes | Integration ID from the dashboard |\n| `LINKEDIN_HEADLESS` | No | Force headless mode (`true`/`false`) |\n| `LINKEDIN_POLL_INTERVAL` | No | Poll interval in ms |\n| `LINKEDIN_SESSION_DIR` | No | Custom path to store browser session |\n| `GATE_URL` | No | Custom GATE cloud URL |\n| `WEB_PORT` | No | Port for the dev dashboard (CLI only) |\n\n## Security model\n\n- LinkedIn session cookies stored in `sessionDir` on YOUR machine\n- GATE cloud never sees or stores your LinkedIn credentials\n- All message content passes through GATE's security pipeline\n- Billing, limits, and security enforced server-side\n","readmeFilename":"README.md","homepage":"https://anuragate.com","repository":{"type":"git","url":"git+https://github.com/ahmad-ajmal/AnuraGate_Sample.git"},"bugs":{"url":"https://github.com/ahmad-ajmal/AnuraGate_Sample/issues"}}