{"_id":"@anura-gate/watcher-telegram","_rev":"11-4b106a1403718bcd64f5e80eb7050c5f","name":"@anura-gate/watcher-telegram","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@anura-gate/watcher-telegram","version":"0.1.0","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.1.0","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"7364d86e1e3f82137a7bfac16175a55c334fdd3e","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.1.0.tgz","fileCount":7,"integrity":"sha512-F+ZVp7jQ89GI7BD7JZ3P+rMFH+YfWUMEs6K4/TwlWzdk3rvgYQmu3D7gPDJ6L0OZU0rUI79P5RhzFEea92bzYg==","signatures":[{"sig":"MEQCIC+SjBfggpVEPOihQa3Jm8enSZn0sj7mmJKZO57sdh1TAiALuqEM6g+BD19t4KtN+AQk63BQ9pQf65f/zytm1S7ceA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45135},"main":"index.js","engines":{"node":">=18"},"gitHead":"ffac63428a9618e9117ee230b9667ddaaee6309b","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.1.0_1771499615654_0.15208312961679593","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@anura-gate/watcher-telegram","version":"0.2.0","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.2.0","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"8fbcb6335fc448f1cdf822810373f51a3873dbec","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.2.0.tgz","fileCount":7,"integrity":"sha512-crzcnp/zdfZ9ee2+Us27pXRYRgLDdubPHMNi6Rc5vdrL3LlC1Ph9HEnpO4Alu6Qb1Srem1X7UL5TrcO4aHugmw==","signatures":[{"sig":"MEQCIAXu640cZgPuevdCB405zrAaeIevKLwfDiOH+3QoZ2RYAiAlZ4Ypqu4ZLuww8hYv7avs+rUMPmvdnNXWfZWQI9TJ7g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75852},"main":"index.js","engines":{"node":">=18"},"gitHead":"2b8559f6273d9d00a55a237735a0464ce41032a2","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.2.0_1771573643807_0.0896165959707953","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@anura-gate/watcher-telegram","version":"0.2.1","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.2.1","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"5c0fd1a28f9b046404c64bb9d79ef0567e45a10c","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.2.1.tgz","fileCount":7,"integrity":"sha512-zTFbEQINv3JsuyDTMynH1VLEpIfJXT9MyHATJuZktDsaS/HOczIJQ95K9CzlVVf10YBd01vrlkLwiWbAoTGkeQ==","signatures":[{"sig":"MEQCIHeNdZtap0B0BB4WKOLxyUasM6au09WKaz9cX0x5jbLLAiAgLcPLwRsRWT5cDZBb/Sd2bMuABnyzpCYQCPCXswD37g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75968},"main":"index.js","engines":{"node":">=18"},"gitHead":"c654e0ee165f6d1a466e876d9f7bdcd94f0d7a14","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.2.1_1771582552520_0.7921264045789027","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@anura-gate/watcher-telegram","version":"0.2.2","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.2.2","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"29e8f0ae06716d71b3b0e85bbda48d71d6db8fe2","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.2.2.tgz","fileCount":7,"integrity":"sha512-n2thNhiNaAvtNWWbtArlw+eWyhdSENKiGWqbjyk+depCfQaOQQHHcSyf+uMb/GXxXOq86+3hgMqdQX2cPJZKng==","signatures":[{"sig":"MEUCIQCp4hiWky803V8AXhpKdMlhK9miKaFUKlrwLBNf0x0ZnwIgBSQQYzLNHyIOjj60P5dvzU6Z87OjZBHhQxeJ6VEh/H4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84640},"main":"index.js","engines":{"node":">=18"},"gitHead":"c654e0ee165f6d1a466e876d9f7bdcd94f0d7a14","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.2.2_1771585084585_0.629188094894914","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@anura-gate/watcher-telegram","version":"0.2.3","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.2.3","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"bed5acfe991b1d464fce357cbe5e6d21e1aed6cc","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.2.3.tgz","fileCount":7,"integrity":"sha512-N/UfhY3WyhYui4QFjmlRIyLkNKf9OV8oqv9jVe2O26axc1YlmRLRQI+UN1w93/ZzHBSCLCeMieb7QW8AJa/nYw==","signatures":[{"sig":"MEYCIQCkNCV7+95NKcRyn4kvmHiPlqhWSt6wRQTcRc2Jhc3NHQIhAJ922hP4iKcsokqWdJhutkRkvoICp1pWV/rexcHCqs8G","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90905},"main":"index.js","engines":{"node":">=18"},"gitHead":"afd911c5d3bf2e2e674b9e30d3e1dc9787456504","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.2.3_1771600378779_0.07299420927297917","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@anura-gate/watcher-telegram","version":"0.2.4","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.2.4","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"2ac549f6b71960a89c5652445f74eecf57d0903c","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.2.4.tgz","fileCount":7,"integrity":"sha512-ToKmmn1FCPXJ3xjeiA47UShx6xB3BLUtUplK8Asorc2nwICjRqS/hEM/dKRg6hki2RT/V0DCtyCF7Y2ZNGxxzQ==","signatures":[{"sig":"MEUCIQDC+JHXqwkPzecPVAy9bBusGLUydWS0wzACHpLgl7zujAIgX6WhREiV35UFaIfK05P1tAMejpJwzVFhtFWsAHtB2ns=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90917},"main":"index.js","engines":{"node":">=18"},"gitHead":"a297199c24f3a3395629ff5312d1800a0c3b7c50","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.2.4_1771601250567_0.1755315923184415","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@anura-gate/watcher-telegram","version":"0.2.5","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.2.5","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"83556c31bc9bdd810522cec5133c12045be249ff","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.2.5.tgz","fileCount":7,"integrity":"sha512-m98REKKyW3gF9ary+Cw9Z7SODz1h5UqQUNiKO96/e2xfy9+uq2GR7/tJNFAC5L/AEyWIVHhSf3llxmuSV/hTYw==","signatures":[{"sig":"MEYCIQDOV+fBPKcxF7QPDNnxZErQpLy29OAEXOCDj2vW9a+YCgIhAOk7RVp25zc8SgjsjX8sa880yDGFSpclAIUIgDAOuwee","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":91256},"main":"index.js","engines":{"node":">=18"},"gitHead":"1aaf6081c08b475ede6d106e3dcfe55e0ee28dd0","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.2.5_1771940170854_0.49949627414552955","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@anura-gate/watcher-telegram","version":"0.3.0","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.3.0","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"96659ad48e8aba12de6ceed5d35ace77e6306541","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.3.0.tgz","fileCount":8,"integrity":"sha512-DddVicMzcMQ0swg/kRf3NrIAcbTnuq0v9ORxIuoGZ0hFvSGGEKKmUBj9RuIxoBFsJZQBxIEh8V6p8KESpqPAaA==","signatures":[{"sig":"MEUCIQCqWh9KDCQ8zEIANHyCE6namxvgRi+I5RInOoqr5CrnfgIgHM42ifR/OBRMz4KLZUZFBj0mFgplwZGSdScVpOIQjps=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":105161},"main":"index.js","engines":{"node":">=18"},"gitHead":"1502cf4027528d26be0741c1f64b26e0195e671f","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.3.0_1772202674090_0.5432095007928102","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@anura-gate/watcher-telegram","version":"0.4.0","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.4.0","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"09f48508dbca653da1e24c16062c791ca383f932","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.4.0.tgz","fileCount":8,"integrity":"sha512-wFP2nnJ+HBdEU4fgCszwhf89/G2l1dFBvHz0SMf35uEl95yvVu9bHNppqHk3R24kBL6+VWRF52m1c4eNb3fZoQ==","signatures":[{"sig":"MEQCIB0yI8Mb76B7CqflLzvNjAoXZPe0nOkBBEAiDvCA2CwxAiA0a+eU5USY3wADFsNmW8E4j7NbecTtkNOEs1xS9TVZuA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107408},"main":"index.js","engines":{"node":">=18"},"gitHead":"9de498efc9037d0f60a6b830ab7df915d5e8dbfc","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.4.0_1772343252153_0.29728209140130657","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@anura-gate/watcher-telegram","version":"0.4.1","keywords":["gate","watcher","telegram","messaging","self-hosted"],"license":"MIT","_id":"@anura-gate/watcher-telegram@0.4.1","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"bin":{"gate-watcher-telegram":"cli.js"},"dist":{"shasum":"d8486b40283e2e701f9de88bb0dcfab5565dda29","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.4.1.tgz","fileCount":8,"integrity":"sha512-7i4/DQPFTWFTp2lBGu3sFMkHGcWZ6uAPuDS/eOoJeL/pAe1mK+3ZileRKeYkJPzDX0WtL8cJtcBp+lCbqqE2TA==","signatures":[{"sig":"MEUCIQC3TSdjqcrE3IhS/hqLxFX+1WC/OWOy2LJM4H6N6GSrFAIgduZZSnodbXWDEk7IeSN9xAcnUCJO/1Es/+MRJx46DoQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107973},"main":"index.js","engines":{"node":">=18"},"gitHead":"5c5f0faef20ef41bf9d7a7bd4cdb1b5247782879","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 Telegram integration. Credentials never leave your machine.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"input":"^1.0.1","dotenv":"^17.3.1","qrcode":"^1.5.4","telegram":"^2.26.16","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/watcher-telegram_0.4.1_1772345843287_0.0346208799491996","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@anura-gate/watcher-telegram","version":"0.5.0","description":"GATE Watcher — Self-hosted daemon for Telegram integration. Credentials never leave your machine.","main":"index.js","bin":{"gate-watcher-telegram":"cli.js"},"scripts":{"start":"node cli.js","dev":"node cli.js"},"keywords":["gate","watcher","telegram","messaging","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","qrcode":"^1.5.4","qrcode-terminal":"^0.12.0","telegram":"^2.26.16","input":"^1.0.1"},"engines":{"node":">=18"},"_id":"@anura-gate/watcher-telegram@0.5.0","gitHead":"0ebb362ebdf75c602ccbaa15cb7db91b80f2901d","bugs":{"url":"https://github.com/ahmad-ajmal/AnuraGate_Sample/issues"},"_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-WlYpnB1yKG+Cg7eQzA5PJf4zuIONonwBzgYj0JUezh1fDYiKJbReqhO4PfWyNl4K1Zycx71SQmCDc4G9AOewxg==","shasum":"2ce4a1654f72a13975c9ef64eb3dc23aa2bd4fca","tarball":"https://registry.npmjs.org/@anura-gate/watcher-telegram/-/watcher-telegram-0.5.0.tgz","fileCount":8,"unpackedSize":108115,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIElyqOHssToz03D1j/h6q4yfWgUqf3Z/rp9qtWBi2Bp4AiBa/rqB5WOk8HXkyhYxjcxuCM4cw6biNzVBFTMcnI7DKw=="}]},"_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-telegram_0.5.0_1772353014861_0.932633717911554"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-19T11:13:35.134Z","modified":"2026-03-01T08:16:55.168Z","0.1.0":"2026-02-19T11:13:35.813Z","0.2.0":"2026-02-20T07:47:23.951Z","0.2.1":"2026-02-20T10:15:52.678Z","0.2.2":"2026-02-20T10:58:04.755Z","0.2.3":"2026-02-20T15:12:58.923Z","0.2.4":"2026-02-20T15:27:30.724Z","0.2.5":"2026-02-24T13:36:10.996Z","0.3.0":"2026-02-27T14:31:14.250Z","0.4.0":"2026-03-01T05:34:12.298Z","0.4.1":"2026-03-01T06:17:23.445Z","0.5.0":"2026-03-01T08:16:55.022Z"},"license":"MIT","keywords":["gate","watcher","telegram","messaging","self-hosted"],"description":"GATE Watcher — Self-hosted daemon for Telegram integration. Credentials never leave your machine.","maintainers":[{"name":"anuragate","email":"ahmadajmal1514@gmail.com"}],"readme":"# GATE Watcher — Telegram\n\nSelf-hosted daemon that connects to Telegram (personal account) and pushes all message events to GATE cloud for security processing. **Your Telegram session tokens never leave your machine.**\n\n## How it works\n\n```\nYour Machine (Watcher)              GATE Cloud\n┌─────────────────────┐        ┌──────────────────┐\n│ Telegram session     │───────>│ Security pipeline │\n│ (tokens stay HERE)   │<───────│ (redact, policy,  │\n│                      │ poll   │  audit, forward)  │\n└─────────────────────┘        └──────────────────┘\n```\n\n## Quick Start (CLI)\n\nThe fastest way — runs standalone with QR in your terminal.\n\n```bash\ncd gate-watcher-telegram\nnpm install\n\n# Create .env (or pass env vars directly)\ncp .env.example .env\n# Fill in GATE_KEY, GATE_INTEGRATION_ID, TELEGRAM_API_ID, TELEGRAM_API_HASH\n\nnpm start\n```\n\nOpen Telegram on your phone → Settings → Devices → Link Desktop Device → Scan the QR code. Done.\n\n## Embed in Your App (SDK)\n\nFor production use — import the class, handle the QR however you want.\n\n```bash\nnpm install @anura-gate/watcher-telegram\n```\n\n### Single-session mode\n\nOne Telegram account per watcher instance.\n\n```js\nconst { GateTelegramWatcher } = require(\"@anura-gate/watcher-telegram\");\n\nconst watcher = new GateTelegramWatcher({\n  gateUrl: \"https://your-gate.vercel.app\",\n  gateKey: \"gk-xxx\",\n  integrationId: \"int_xxx\",\n  apiId: \"12345\",\n  apiHash: \"abc123\",\n  sessionId: \"user_123\",\n});\n\n// Render QR however you want — web page, API response, etc.\nwatcher.on(\"qr\", (loginUrl) => {\n  // loginUrl is a tg://login?token=... URL\n  // Generate a QR code from this URL for the user to scan\n  io.emit(\"telegram-qr\", loginUrl);\n});\n\nwatcher.on(\"ready\", () => {\n  console.log(\"Telegram connected!\");\n});\n\n// Every incoming message after GATE security processing\nwatcher.on(\"message\", (msg, result) => {\n  console.log(`From: ${msg.senderId}, Text: ${msg.text}`);\n  console.log(`Security actions: ${result.securityActions}`);\n  console.log(`Blocked: ${result.blocked}`);\n});\n\n// Outgoing messages (sent from phone/desktop)\nwatcher.on(\"message_sent\", (msg, result) => {\n  console.log(`Sent: ${msg.text}`);\n  console.log(`Security actions: ${result.securityActions}`);\n});\n\n// Outbound actions executed by the watcher\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### Pool mode (multi-session)\n\nManage multiple Telegram accounts from a single watcher instance. Enabled by omitting `sessionId`.\n\n```js\nconst { GateTelegramWatcher } = require(\"@anura-gate/watcher-telegram\");\n\nconst watcher = new GateTelegramWatcher({\n  gateKey: \"gk-xxx\",\n  integrationId: \"int_xxx\",\n  apiId: \"12345\",\n  apiHash: \"abc123\",\n  // No sessionId → pool mode\n});\n\n// Attach to your HTTP server with WebSocket support\nwatcher.attach(server, \"/ws/telegram\", {\n  resolveUser: (req) => req.session?.userId,\n});\n\nwatcher.on(\"pool:qr\", (userId, loginUrl) => {\n  // Send QR to the specific user's frontend\n});\n\nwatcher.on(\"pool:ready\", (userId) => {\n  console.log(`User ${userId} connected to Telegram`);\n});\n\nwatcher.on(\"pool:message\", (userId, msg, result) => {\n  console.log(`[${userId}] From: ${msg.senderId}, Text: ${msg.text}`);\n});\n\nwatcher.on(\"pool:message_sent\", (userId, msg, result) => {\n  console.log(`[${userId}] Sent: ${msg.text}`);\n});\n\nawait watcher.start(); // Auto-restores previously connected sessions\n\n// Send a message on behalf of a user\nawait watcher.sendMessage(\"user_123\", \"chatId\", \"Hello!\");\n\n// Get a user's recent chats\nconst dialogs = await watcher.getDialogs(\"user_123\", 50);\n\n// Disconnect a specific user\nawait watcher.disconnect(\"user_123\");\n```\n\n## SDK Events\n\n### Single-session mode\n\n| Event | Args | Description |\n|---|---|---|\n| `qr` | `(loginUrl)` | QR login URL — generate a QR code from this |\n| `authenticated` | — | Telegram session authenticated (saved locally) |\n| `ready` | — | Client ready, heartbeat + polling started |\n| `message` | `(msg, result)` | Incoming message processed by GATE |\n| `message_sent` | `(msg, result)` | Outgoing message (sent from phone/desktop) processed by GATE |\n| `catchup` | `(chatSummaries, result)` | Initial unread messages bundled and sent to GATE |\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 (e.g. `\"watcher_agents\"`) |\n| `auth_failure` | `(errorMessage)` | Authentication failed |\n| `disconnected` | `(reason)` | Telegram disconnected |\n| `stopped` | — | Watcher fully shut down |\n\n### Pool mode\n\nAll pool events include `userId` as the first argument.\n\n| Event | Args | Description |\n|---|---|---|\n| `pool:qr` | `(userId, loginUrl)` | QR login URL for a specific user |\n| `pool:authenticated` | `(userId)` | User's session authenticated |\n| `pool:ready` | `(userId)` | User's session ready |\n| `pool:message` | `(userId, msg, result)` | Incoming message for a user |\n| `pool:message_sent` | `(userId, msg, result)` | Outgoing message for a user |\n| `pool:catchup` | `(userId, chatSummaries, result)` | Initial unread messages for a user |\n| `pool:action` | `(userId, action)` | Outbound action for a user |\n| `pool:action_result` | `(userId, { actionId, action, success, result, error })` | Action completed for a user |\n| `pool:error` | `(userId, error)` | Session error |\n| `pool:disconnected` | `(userId, reason)` | User's session disconnected |\n\n### Event result shapes\n\n```js\n// result from \"message\" / \"pool:message\"\n{\n  ok: true,               // GATE API call succeeded\n  status: 200,            // HTTP status\n  securityActions: [],    // Security actions applied (e.g. [\"redact\", \"flag\"])\n  blocked: false,         // Whether message was blocked by policy\n  rateLimited: false,     // Whether daily limit was hit (status 429)\n}\n\n// result from \"message_sent\" / \"pool:message_sent\"\n{\n  ok: true,\n  securityActions: [],\n}\n```\n\n## SDK Options\n\n| Option | Required | Default | Description |\n|---|---|---|---|\n| `gateUrl` | No | `\"https://anuragate.com\"` | GATE cloud URL |\n| `gateKey` | Yes | — | Virtual key (`gk-xxx`) |\n| `integrationId` | Yes | — | Integration ID (`int_xxx`) |\n| `apiId` | Yes | — | Telegram API ID from [my.telegram.org](https://my.telegram.org) |\n| `apiHash` | Yes | — | Telegram API hash from [my.telegram.org](https://my.telegram.org) |\n| `sessionId` | No | — | Session ID — if omitted, pool mode is enabled |\n| `sessionLabel` | No | — | Human-readable session label |\n| `sessionMetadata` | No | `{}` | Arbitrary metadata for the session |\n| `sessionDir` | No | `./.telegram_session` | Path to store session files |\n| `heartbeatInterval` | No | `30000` | ms between heartbeats |\n| `pollInterval` | No | `3000` | ms between outbound action polls |\n| `maxSessions` | No | `50` | Max concurrent sessions (pool mode) |\n| `shouldRestore` | No | — | `(sessionInfo) => boolean` filter for session restore |\n\n## Public Methods\n\n### General\n\n| Method | Returns | Description |\n|---|---|---|\n| `start()` | `Promise<void>` | Start the watcher (restores sessions in pool mode) |\n| `stop()` | `Promise<void>` | Stop the watcher and disconnect all clients |\n| `getTelegramClient()` | `TelegramClient \\| null` | Access the underlying GramJS client (single-session only) |\n| `getStatus()` | `string` | Connection status: `\"disconnected\"` \\| `\"connecting\"` \\| `\"qr\"` \\| `\"connected\"` |\n| `getQR()` | `string \\| null` | Current QR login URL |\n\n### Pool mode\n\n| Method | Returns | Description |\n|---|---|---|\n| `attach(server, wsPath?, opts?)` | `PanelServer` | Attach WebSocket handler to HTTP server |\n| `startPanel(port?)` | `PanelServer` | Start standalone dev dashboard |\n| `disconnect(userId)` | `Promise<void>` | Disconnect and remove a user's session |\n| `getSessionStatus(userId)` | `object \\| null` | `{ userId, status, ready, qrData, error }` |\n| `getSessionQR(userId)` | `string \\| null` | QR login URL for a specific user |\n| `getSessions()` | `Array` | All active sessions `[{ userId, status, ready }]` |\n| `sendMessage(userId, chatId, text)` | `Promise<object>` | Send a message via a user's session |\n| `getDialogs(userId, limit?)` | `Promise<Array>` | Get recent chats for a user |\n| `getContacts(userId, query?)` | `Promise<Array>` | Get contacts, optionally filtered |\n| `markChatRead(userId, chatId)` | `Promise<void>` | Mark a chat as read |\n\n### Advanced: Access GramJS directly\n\n```js\nconst client = watcher.getTelegramClient();\nconst dialogs = await client.getDialogs({ limit: 10 });\n```\n\n## Setup\n\n1. Go to [my.telegram.org](https://my.telegram.org) and create an application to get your **API ID** and **API Hash**\n2. Go to **GATE Dashboard -> Integrations -> Add Integration**\n3. Select **Telegram**, copy the **Integration ID**\n4. Copy your **Virtual Key** from the **Keys** page\n5. Set the env vars and run\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| `TELEGRAM_API_ID` | Yes | API ID from my.telegram.org |\n| `TELEGRAM_API_HASH` | Yes | API hash from my.telegram.org |\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- Telegram session tokens stored in `.telegram_session/` on YOUR machine\n- GATE cloud never sees or stores your Telegram credentials\n- All message content passes through GATE's security pipeline\n- Both incoming and outgoing messages are reported to GATE\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"}}