{"_id":"@ar-agents/whatsapp","_rev":"10-be5d33c0e70464e0963d44ce3bc90c4a","name":"@ar-agents/whatsapp","dist-tags":{"latest":"0.6.1"},"versions":{"0.1.0":{"name":"@ar-agents/whatsapp","version":"0.1.0","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/whatsapp@0.1.0","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"dist":{"shasum":"a2f458b4fc58a96b5d80d6fd740c73b341707749","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.1.0.tgz","fileCount":12,"integrity":"sha512-x9W7T1DBp7fyrD+TUTl0ZeaKGlsBekCB6v1TflavpJnaNeP1zgHpDmWULxOj0wdLt0RutLWKwgCZ3lvuGGnZXw==","signatures":[{"sig":"MEYCIQC8unZHOw8Uv7v9CoXpWIhdophutb+M3K+vFeDGcWCeJAIhAInZCIbNbF96cvgmzFG7J+PTmELXcU/+JAN6oupmKzTF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":248778},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"81b194e814a4afc58305d93ba6c8f6894c0343c1","scripts":{"lint":"echo 'no lint configured yet'","size":"size-limit","test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/whatsapp"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"_npmVersion":"10.9.2","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.175","msw":"^2.7.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/whatsapp_0.1.0_1778000820795_0.36304828667360334","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ar-agents/whatsapp","version":"0.2.0","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/whatsapp@0.2.0","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"dist":{"shasum":"a75ac16a259c7bc1f7f241987630e569093a48b1","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.2.0.tgz","fileCount":12,"integrity":"sha512-4W+RprivMk/JDfUMwxZOvTT7L45Yz4DxnhXoK9G2oHnDhbpCN0kuKLV8AFkezS+/ZLeUUXaTIBK4bz/9Y7ZM8g==","signatures":[{"sig":"MEQCIFlcry5fzELjAz05qT91PHULLRnnU161k+UjxA5OpUYLAiAPnExyhg2efK5SXdVolat9OJkk9sp+mZ7HFzgmqQRnww==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314279},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"da4b6941736beb2974eb4250de8dede7589cb037","scripts":{"lint":"echo 'no lint configured yet'","size":"size-limit","test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/whatsapp"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"_npmVersion":"10.9.2","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.175","msw":"^2.7.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/whatsapp_0.2.0_1778093261205_0.7919571552795961","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ar-agents/whatsapp","version":"0.3.0","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/whatsapp@0.3.0","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"dist":{"shasum":"46dbae1e7b0ce708138f2f5371fbab4952119209","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.3.0.tgz","fileCount":12,"integrity":"sha512-sVJpToMueeuZ0MNQNsVBQPr+dTjOrJ4OYlvHii7mXdxdp4F/z3W1aTGGhWgLZwp7jVHHWk1FRV9cYOWaO9fjzQ==","signatures":[{"sig":"MEQCIHSZqhuUwvwQCb4IZCOYsmAQZIUq0gihbSqUuiM0p5L5AiBIsZrlWfcK6CsJoBwTVfOOFiMgK6jmyVHdGvSt4LIgVQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":323691},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"gitHead":"8f4301af034942dd46ea09191d62136526d0202d","scripts":{"lint":"echo 'no lint configured yet'","size":"size-limit","test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/whatsapp"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"_npmVersion":"10.9.2","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.175","msw":"^2.7.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/whatsapp_0.3.0_1778098126974_0.4447508594753222","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@ar-agents/whatsapp","version":"0.3.1","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/whatsapp@0.3.1","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"dist":{"shasum":"30c195116fb92e3fa9efba29ed0929b94b88e4ce","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.3.1.tgz","fileCount":12,"integrity":"sha512-7RjImCJydNZJme7qv722/1xn1DjTCVKYCwJpkWEcl26zedjcQVLbtRZbNOaEklw6uti/Ucs+qGiYt+lCddAKfQ==","signatures":[{"sig":"MEQCIDP4DYRDIn46oAh46SKDNKlSZyN1+4zzME1exrTy7YpbAiBUciWQx/vJZpAlP2QU2zbL6hMQg+fgiROiiDAWjrl9HA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2fwhatsapp@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":323281},"main":"./dist/index.cjs","type":"module","_from":"file:ar-agents-whatsapp-0.3.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"scripts":{"lint":"echo 'no lint configured yet'","size":"size-limit","test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"_resolved":"/tmp/229c7f861403cc9423b13c81f5b603f1/ar-agents-whatsapp-0.3.1.tgz","_integrity":"sha512-7RjImCJydNZJme7qv722/1xn1DjTCVKYCwJpkWEcl26zedjcQVLbtRZbNOaEklw6uti/Ucs+qGiYt+lCddAKfQ==","repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/whatsapp"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"_npmVersion":"10.8.2","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.175","msw":"^2.7.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/whatsapp_0.3.1_1778174209975_0.9573411872643258","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@ar-agents/whatsapp","version":"0.4.0","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/whatsapp@0.4.0","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"bin":{"whatsapp":"bin/whatsapp.js"},"dist":{"shasum":"799989aaf04e8e8913948ce69ba6331e042c8b7d","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.4.0.tgz","fileCount":25,"integrity":"sha512-feEhWemKf+PW7nBKLLfVlbEYWRV6AZypBdNIsAy+fqDrQkmMwnJIcdHZzENpVNci+lM49Sf6mc9x96XlDHeGPQ==","signatures":[{"sig":"MEUCID+CFRAsD7vu7sCFwX9zJsStQkbwuCE/wFUN+DC2zcSbAiEA1ajH0s3B8KC7XbLlUodRl1WY+K+Mf3d/ofC2sGHPnwg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2fwhatsapp@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":439263},"main":"./dist/index.cjs","type":"module","_from":"file:ar-agents-whatsapp-0.4.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./testing":{"import":{"types":"./dist/testing.d.ts","default":"./dist/testing.js"},"require":{"types":"./dist/testing.d.cts","default":"./dist/testing.cjs"}}},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"scripts":{"lint":"echo 'no lint configured yet'","size":"size-limit","test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"_resolved":"/tmp/a2cdbe90968c2a259df2ef1ff95e23d9/ar-agents-whatsapp-0.4.0.tgz","_integrity":"sha512-feEhWemKf+PW7nBKLLfVlbEYWRV6AZypBdNIsAy+fqDrQkmMwnJIcdHZzENpVNci+lM49Sf6mc9x96XlDHeGPQ==","repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/whatsapp"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"_npmVersion":"10.8.2","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","provenance":true},"typesVersions":{"*":{"testing":["./dist/testing.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.175","msw":"^2.7.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/whatsapp_0.4.0_1778262271593_0.04584964005201542","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@ar-agents/whatsapp","version":"0.5.0","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/whatsapp@0.5.0","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"bin":{"whatsapp":"bin/whatsapp.js"},"dist":{"shasum":"11497023ae99921da2dbf25a4dfae4e3a4357f3b","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.5.0.tgz","fileCount":25,"integrity":"sha512-uqJnnMiOCwA2UkFPzbmNuqrs8EHL2yB28uIuvsH1ZyAIde3gcm6nKVY/IcFNbNnDLjBVJDA8269KctzRlMdAmA==","signatures":[{"sig":"MEUCIQCNfG1ALoTV3Fss92a4CH0SAYt/Miw8wi3HldTCBDjG/wIgPhkw70xl+3lBCq2Q4HgDcplIlo2FkN219eR4qgmXJ4Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2fwhatsapp@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":443112},"main":"./dist/index.cjs","type":"module","_from":"file:ar-agents-whatsapp-0.5.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./testing":{"import":{"types":"./dist/testing.d.ts","default":"./dist/testing.js"},"require":{"types":"./dist/testing.d.cts","default":"./dist/testing.cjs"}},"./tools.manifest.json":"./tools.manifest.json"},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"scripts":{"lint":"echo 'no lint configured yet'","size":"size-limit","test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"_resolved":"/tmp/b1c1b6df86cfdb60b3ebdefd4f7ba9ea/ar-agents-whatsapp-0.5.0.tgz","_integrity":"sha512-uqJnnMiOCwA2UkFPzbmNuqrs8EHL2yB28uIuvsH1ZyAIde3gcm6nKVY/IcFNbNnDLjBVJDA8269KctzRlMdAmA==","repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/whatsapp"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"_npmVersion":"10.8.2","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@ar-agents/core":"^0.1.0"},"publishConfig":{"access":"public","provenance":true},"typesVersions":{"*":{"testing":["./dist/testing.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.175","msw":"^2.7.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/whatsapp_0.5.0_1779728040768_0.5440626137537299","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@ar-agents/whatsapp","version":"0.5.1","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/whatsapp@0.5.1","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"bin":{"whatsapp":"bin/whatsapp.js"},"dist":{"shasum":"07a86910b74c0beeea669b4b441e2003b82b479a","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.5.1.tgz","fileCount":25,"integrity":"sha512-9PIHstqW8TECwkDVr8iuJIYnduhuH+nXeQF/hm69aWkg8M9qqaPdjF4CLli/MqT1hA9FWoeVcZOj7XE4/X/P1g==","signatures":[{"sig":"MEQCIA2m+wxBR9oWVo3SK7Lz/PrJZJajXSQ5muAQToG1giuFAiBzZXEgWMof7yj4m8y4a0OlJLlfOUP6wG4N1GkPQcapwg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2fwhatsapp@0.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":444751},"main":"./dist/index.cjs","type":"module","_from":"file:ar-agents-whatsapp-0.5.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./testing":{"import":{"types":"./dist/testing.d.ts","default":"./dist/testing.js"},"require":{"types":"./dist/testing.d.cts","default":"./dist/testing.cjs"}},"./tools.manifest.json":"./tools.manifest.json"},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"scripts":{"lint":"echo 'no lint configured yet'","size":"size-limit","test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"_resolved":"/tmp/dab21564711514cf053f5169f5e10ccc/ar-agents-whatsapp-0.5.1.tgz","_integrity":"sha512-9PIHstqW8TECwkDVr8iuJIYnduhuH+nXeQF/hm69aWkg8M9qqaPdjF4CLli/MqT1hA9FWoeVcZOj7XE4/X/P1g==","repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/whatsapp"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"_npmVersion":"10.8.2","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@ar-agents/core":"^0.1.0"},"publishConfig":{"access":"public","provenance":true},"typesVersions":{"*":{"testing":["./dist/testing.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.175","msw":"^2.7.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/whatsapp_0.5.1_1781280176365_0.9686935579438061","host":"s3://npm-registry-packages-npm-production"}},"0.5.2":{"name":"@ar-agents/whatsapp","version":"0.5.2","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/whatsapp@0.5.2","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"bin":{"whatsapp":"bin/whatsapp.js"},"dist":{"shasum":"a8d7db297b348079b7906ffc99a679c0ad235160","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.5.2.tgz","fileCount":25,"integrity":"sha512-YP8dbCI79n7DaluhCOVP/e3rKcxdHz4FvqDahOKI1023heUOqi0OFAi5bsXGjEmqvyt7B5F05q+ABV8fpkNbZg==","signatures":[{"sig":"MEQCIElzlYEeUCMB0aLzt8zPiAVZ5by/JJvgqW9cZsGui02bAiAS1tYDVCXi9B6znscbGDRtnTBPdwaXEpcxQICn8Ne7Pw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2fwhatsapp@0.5.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":437583},"main":"./dist/index.cjs","type":"module","_from":"file:ar-agents-whatsapp-0.5.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./testing":{"import":{"types":"./dist/testing.d.ts","default":"./dist/testing.js"},"require":{"types":"./dist/testing.d.cts","default":"./dist/testing.cjs"}},"./tools.manifest.json":"./tools.manifest.json"},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"scripts":{"lint":"echo 'no lint configured yet'","size":"size-limit","test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"_resolved":"/tmp/8219a8f211e6dcf1bf7761e32dde043a/ar-agents-whatsapp-0.5.2.tgz","_integrity":"sha512-YP8dbCI79n7DaluhCOVP/e3rKcxdHz4FvqDahOKI1023heUOqi0OFAi5bsXGjEmqvyt7B5F05q+ABV8fpkNbZg==","repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/whatsapp"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"_npmVersion":"10.9.8","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","directories":{},"_nodeVersion":"22.23.0","dependencies":{"@ar-agents/core":"^0.3.0"},"publishConfig":{"access":"public","provenance":true},"typesVersions":{"*":{"testing":["./dist/testing.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"ai":"^7.0.0","msw":"^2.7.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/whatsapp_0.5.2_1782899919201_0.06501861786511687","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@ar-agents/whatsapp","version":"0.6.0","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"author":{"name":"Nazareno Clemente","email":"naza@naza.ar"},"license":"MIT","_id":"@ar-agents/whatsapp@0.6.0","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"bin":{"whatsapp":"bin/whatsapp.js"},"dist":{"shasum":"10f981f5861c56400e87b995746788e6ba45dc85","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.6.0.tgz","fileCount":25,"integrity":"sha512-+dunUJF2ccaThdnnZY3pW+SswJG3q6mb6ngeieRqFzskr6Q9VeePqnY0fCx6VAhxI8kNBMrU7lodXwdUnSq5Wg==","signatures":[{"sig":"MEYCIQCWEgGye+ja4vDkXEEhu9+BwJnAYPk4Am3HwOAr64d0UwIhALEe5K0vSB6nGt4JMj2zWByjHDb73878p/WBRV/Qt99i","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2fwhatsapp@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":443920},"main":"./dist/index.cjs","type":"module","_from":"file:ar-agents-whatsapp-0.6.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./testing":{"import":{"types":"./dist/testing.d.ts","default":"./dist/testing.js"},"require":{"types":"./dist/testing.d.cts","default":"./dist/testing.cjs"}},"./tools.manifest.json":"./tools.manifest.json"},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"scripts":{"lint":"echo 'no lint configured yet'","size":"size-limit","test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"_resolved":"/tmp/8ba4d28c54f721222df73e1ba2d4f29b/ar-agents-whatsapp-0.6.0.tgz","_integrity":"sha512-+dunUJF2ccaThdnnZY3pW+SswJG3q6mb6ngeieRqFzskr6Q9VeePqnY0fCx6VAhxI8kNBMrU7lodXwdUnSq5Wg==","repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/whatsapp"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"_npmVersion":"10.9.8","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@ar-agents/core":"^0.3.1"},"publishConfig":{"access":"public","provenance":true},"typesVersions":{"*":{"testing":["./dist/testing.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"ai":"^7.0.0","msw":"^2.7.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/whatsapp_0.6.0_1783069171911_0.9352671036059277","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@ar-agents/whatsapp","version":"0.6.1","description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"license":"MIT","author":{"name":"Nazareno Clemente","email":"naza@naza.ar"},"funding":{"type":"github","url":"https://github.com/sponsors/naza00000"},"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","repository":{"type":"git","url":"git+https://github.com/ar-agents/ar-agents.git","directory":"packages/whatsapp"},"bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./testing":{"import":{"types":"./dist/testing.d.ts","default":"./dist/testing.js"},"require":{"types":"./dist/testing.d.cts","default":"./dist/testing.cjs"}},"./tools.manifest.json":"./tools.manifest.json"},"size-limit":[{"name":"ESM","path":"dist/index.js","limit":"15 KB","ignore":["node:crypto","crypto"]},{"name":"CJS","path":"dist/index.cjs","limit":"15 KB","ignore":["node:crypto","crypto"]}],"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"devDependencies":{"@types/node":"^20.19.39","ai":"^7.0.0","msw":"^2.7.0","tsup":"^8.3.5","typescript":"^5.9.3","vitest":"^2.1.8","zod":"^4.4.3"},"publishConfig":{"access":"public","provenance":true},"engines":{"node":">=20.0.0"},"bin":{"whatsapp":"bin/whatsapp.js"},"typesVersions":{"*":{"testing":["./dist/testing.d.ts"]}},"dependencies":{"@ar-agents/core":"^0.4.0"},"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","typecheck":"tsc --noEmit","lint":"echo 'no lint configured yet'","validate":"publint && attw --pack .","size":"size-limit","clean":"rm -rf dist"},"_id":"@ar-agents/whatsapp@0.6.1","_integrity":"sha512-FBlS9KHsMYYCByW1vX7Z/keYOOrLaymx/U691AB/U+81rREnB8hJzEKn/NXRLdejaDx1hQLQKvLHB22DXS6qKg==","_resolved":"/tmp/366ec43d8cf0e64bf10ebd6aba96d41f/ar-agents-whatsapp-0.6.1.tgz","_from":"file:ar-agents-whatsapp-0.6.1.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-FBlS9KHsMYYCByW1vX7Z/keYOOrLaymx/U691AB/U+81rREnB8hJzEKn/NXRLdejaDx1hQLQKvLHB22DXS6qKg==","shasum":"c56e8e5c0d70650ac10cc29dfb59322d97525404","tarball":"https://registry.npmjs.org/@ar-agents/whatsapp/-/whatsapp-0.6.1.tgz","fileCount":25,"unpackedSize":444102,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2fwhatsapp@0.6.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCyncIP89znSyhZwQAxakO1+XIBUWkCrQVVTuR5j9kv2gIhAKC7a+6TxREiFAl1pPCHd5M36eEUtJUpQYP202gFAWEa"}]},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"directories":{},"maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/whatsapp_0.6.1_1783077272414_0.4349280847274217"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-05T17:07:00.656Z","modified":"2026-07-03T11:14:32.890Z","0.1.0":"2026-05-05T17:07:00.937Z","0.2.0":"2026-05-06T18:47:41.358Z","0.3.0":"2026-05-06T20:08:47.130Z","0.3.1":"2026-05-07T17:16:50.180Z","0.4.0":"2026-05-08T17:44:31.735Z","0.5.0":"2026-05-25T16:54:00.927Z","0.5.1":"2026-06-12T16:02:56.509Z","0.5.2":"2026-07-01T09:58:39.336Z","0.6.0":"2026-07-03T08:59:32.058Z","0.6.1":"2026-07-03T11:14:32.579Z"},"bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"author":{"name":"Nazareno Clemente","email":"naza@naza.ar"},"license":"MIT","homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/whatsapp","keywords":["whatsapp","whatsapp-business","waba","meta","ai-sdk","vercel-ai","agent","agentic","messaging","argentina"],"repository":{"type":"git","url":"git+https://github.com/ar-agents/ar-agents.git","directory":"packages/whatsapp"},"description":"WhatsApp Business Cloud API as drop-in tools for the Vercel AI SDK. Send text/template/media messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"readme":"# @ar-agents/whatsapp\n\n> WhatsApp Business Cloud API as drop-in tools for the [Vercel AI SDK](https://sdk.vercel.ai). Send text/template/media/interactive messages, parse incoming webhooks, mark as read. AR-friendly defaults but works for any WABA.\n\n[![npm version](https://img.shields.io/npm/v/@ar-agents/whatsapp.svg)](https://www.npmjs.com/package/@ar-agents/whatsapp)\n[![npm downloads](https://img.shields.io/npm/dm/@ar-agents/whatsapp.svg)](https://www.npmjs.com/package/@ar-agents/whatsapp)\n[![license](https://img.shields.io/npm/l/@ar-agents/whatsapp.svg)](./LICENSE)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/@ar-agents/whatsapp.svg)](https://bundlephobia.com/package/@ar-agents/whatsapp)\n[![npm provenance](https://img.shields.io/badge/npm%20provenance-SLSA%20v1-7C3AED?logo=npm)](https://docs.npmjs.com/generating-provenance-statements)\n\n> **Reading this as an agent?** Skip to [AGENTS.md](./AGENTS.md): tool selection rules, error patterns, latency table, composition with the rest of the @ar-agents stack.\n\n## At a glance\n\n| What | Value |\n| --- | --- |\n| Tools shipped | 6: `send_whatsapp_text` / `_template` / `_media` / `_buttons` / `_list` + `mark_whatsapp_read` |\n| Webhook helpers | `parseWebhookEvent` / `parseWebhookEvents` (batch) / `verifyWebhookSignature` (HMAC-SHA256 timing-safe) / `verifyWebhookSubscription` (GET handshake) |\n| Anti-hijacking (v0.2) | `whatsappTools(client, { scopedTo: senderPhone })`: removes `to` from tool schemas so the LLM cannot message a different number even via prompt injection. **Recommended for webhook handlers.** |\n| AR phone normalizer | `normalizeArPhone` handles `+54 9 11 ...`, `011 ...`, legacy `15` prefix, etc. Adds the mandatory WhatsApp `9` for AR mobile. |\n| Test coverage | 57 unit tests including 9 dedicated `scopedTo` agent-hijacking tests |\n| Bundle | 5.5 KB ESM brotli'd |\n| Runtime | Node 20+ (uses `node:crypto` for HMAC). Edge Runtime via Web Crypto in v0.3 (planned). |\n| External deps | Meta WhatsApp Business Cloud API access token + phone number ID (Meta Business Suite → WhatsApp → API Setup) |\n\n## Why this lib\n\nYou want your Vercel AI SDK agent to chat over WhatsApp Business. Without this, you'd:\n\n- Read Meta's Cloud API docs (200+ pages)\n- Implement 6 different message-type payload shapes (text, template, media, buttons, list, location)\n- Handle the 24-hour customer service window quirk\n- Build webhook signature verification\n- Normalize Argentine phone numbers (the WhatsApp `9` mandatory mobile prefix)\n- Wrap it all as schema-validated `tool()` calls\n\nThis package does all that. Wire it in and the LLM can send/receive WhatsApp messages.\n\n## Install\n\n```bash\npnpm add @ar-agents/whatsapp ai zod\n```\n\n## Quick start\n\n```ts\nimport { Experimental_Agent as Agent, stepCountIs } from \"ai\";\nimport { whatsappTools, WhatsAppClient } from \"@ar-agents/whatsapp\";\n\nconst wa = new WhatsAppClient({\n  accessToken: process.env.WA_ACCESS_TOKEN!,\n  phoneNumberId: process.env.WA_PHONE_NUMBER_ID!,\n});\n\nconst agent = new Agent({\n  model: \"anthropic/claude-sonnet-4-6\",\n  instructions: \"Sos un asistente de billing por WhatsApp. ...\",\n  tools: whatsappTools(wa),\n  stopWhen: stepCountIs(8),\n});\n\nawait agent.generate({\n  prompt: \"Mandale a 5491112345678 un mensaje confirmando su orden #123.\",\n});\n```\n\n## Webhook handling\n\n```ts\nimport {\n  parseWebhookEvent,\n  verifyWebhookSignature,\n  verifyWebhookSubscription,\n} from \"@ar-agents/whatsapp\";\n\n// GET /api/whatsapp/webhook: Meta's subscription handshake\nexport async function GET(req: Request) {\n  const params = Object.fromEntries(new URL(req.url).searchParams);\n  const challenge = verifyWebhookSubscription(\n    params,\n    process.env.WA_WEBHOOK_VERIFY_TOKEN!,\n  );\n  return challenge ? new Response(challenge) : new Response(\"Forbidden\", { status: 403 });\n}\n\n// POST /api/whatsapp/webhook: inbound messages + status updates\nexport async function POST(req: Request) {\n  const raw = await req.text(); // RAW body: required for signature verification\n  try {\n    verifyWebhookSignature(\n      raw,\n      req.headers.get(\"x-hub-signature-256\") ?? \"\",\n      process.env.META_APP_SECRET!,\n    );\n  } catch {\n    return new Response(\"Unauthorized\", { status: 401 });\n  }\n  const event = parseWebhookEvent(JSON.parse(raw));\n  if (event.kind === \"message\" && event.message.type === \"text\") {\n    // Hand off to your agent...\n  }\n  return new Response(\"OK\");\n}\n```\n\n## Tools provided\n\n| Tool | Purpose |\n|---|---|\n| `send_whatsapp_text` | Free-form text inside 24h window |\n| `send_whatsapp_template` | Approved template (any time) |\n| `send_whatsapp_media` | Image/audio/video/document/sticker |\n| `send_whatsapp_buttons` | 1-3 reply buttons |\n| `send_whatsapp_list` | 4-10 option list picker |\n| `mark_whatsapp_read` | Blue double-check |\n\nSee [AGENTS.md](./AGENTS.md) for when to use each.\n\n## Phone normalization\n\nArgentine numbers come in 10+ formats. The lib accepts any and produces the WhatsApp E.164 form:\n\n```ts\nimport { normalizeArPhone } from \"@ar-agents/whatsapp\";\n\nnormalizeArPhone(\"+54 9 11 1234-5678\"); // \"5491112345678\"\nnormalizeArPhone(\"011 1234-5678\");       // \"5491112345678\"\nnormalizeArPhone(\"11-1234-5678\");        // \"5491112345678\"\n```\n\n**The WhatsApp `9`** after the country code is mandatory for AR mobile: without it, Meta says \"recipient not on WhatsApp\" even when they are. The lib handles this for you.\n\n## Setup checklist\n\n1. Create a Meta Business app at [developers.facebook.com](https://developers.facebook.com)\n2. Add the WhatsApp product → get a test phone number (or claim your own once Meta verifies your business)\n3. Copy `Phone Number ID` and the temporary `Access Token` (24h): for production, generate a system-user token with `whatsapp_business_messaging` permissions\n4. Set webhook URL → `https://yourapp.com/api/whatsapp/webhook` and `Verify Token` of your choosing\n5. Subscribe to the `messages` field\n6. Set env vars:\n   - `WA_ACCESS_TOKEN`\n   - `WA_PHONE_NUMBER_ID`\n   - `WA_WEBHOOK_VERIFY_TOKEN`\n   - `META_APP_SECRET` (Meta dashboard → App Settings → Basic → App Secret)\n\n## Error handling\n\n```ts\nimport {\n  WhatsAppApiError,\n  WhatsAppRecipientNotOnPlatformError,\n  WhatsAppOutsideWindowError,\n} from \"@ar-agents/whatsapp\";\n\ntry {\n  await wa.sendText({ to: \"...\", text: \"...\" });\n} catch (err) {\n  if (err instanceof WhatsAppRecipientNotOnPlatformError) {\n    // Meta code 131009: phone not registered\n  } else if (err instanceof WhatsAppOutsideWindowError) {\n    // Meta code 131026: switch to a template\n  } else if (err instanceof WhatsAppApiError) {\n    // Generic: check err.code\n  }\n}\n```\n\n## Scoped mode (v0.2.0+): anti-hijacking for webhook handlers\n\nWhen you build the tool set inside a webhook handler, pass `scopedTo: senderPhone` to bind every outbound `send_*` tool to the inbound sender:\n\n```ts\nimport { whatsappTools, parseWebhookEvent, verifyWebhookSignature } from \"@ar-agents/whatsapp\";\n\nexport async function POST(req: Request) {\n  const raw = await req.text();\n  verifyWebhookSignature(raw, req.headers.get(\"x-hub-signature-256\") ?? \"\", appSecret);\n  const event = parseWebhookEvent(JSON.parse(raw));\n  if (event.kind !== \"message\") return new Response(\"OK\");\n\n  // The `to` parameter is REMOVED from the tool schemas. The LLM cannot\n  // specify a different recipient: even if a crafted user message says\n  // \"send a payment link to 5491111111111\".\n  const tools = whatsappTools(client, { scopedTo: event.from });\n\n  const agent = new Agent({ model, instructions, tools });\n  await agent.generate({ prompt: event.message.text });\n  return new Response(\"OK\");\n}\n```\n\nWithout `scopedTo`, an inbound message could persuade your agent to spam other recipients (LLM agent hijacking via prompt injection). With it, the binding is enforced at schema-time: the LLM doesn't even see a `to` field.\n\nBackward-compatible: omit `options` for the previous behavior, useful for batch / proactive flows where the agent picks `to` per call.\n\n## Composition with the rest of @ar-agents\n\nThe same `WhatsAppClient` works as:\n\n| Used by | How |\n|---|---|\n| `whatsappTools(client, { scopedTo })` | Agent's outbound surface |\n| `WhatsAppOtpAdapter` from `@ar-agents/identity-attest` | Send OTPs for trust-level verification |\n| Direct `client.sendTemplate(...)` etc. | Manual sends from cron jobs, billing webhooks, etc. |\n\nSee [whatsapp-hello demo](https://github.com/ar-agents/ar-agents/tree/main/apps/whatsapp-hello) for an end-to-end example combining `@ar-agents/whatsapp` + `mercadopago` + `identity` + `identity-attest` in one billing assistant.\n\n## License\n\nMIT: © Nazareno Clemente\n\n## Stability\n\nThis package is **pre-1.0**. Per [npm convention](https://docs.npmjs.com/about-semantic-versioning), **0.x minor versions may include breaking changes**. We document every breaking change in `CHANGELOG.md` under the corresponding minor bump and flag it explicitly. To avoid surprises:\n\n```bash\n# Pin to exact version (recommended for production):\npnpm add @ar-agents/<package>@<exact-version>\n```\n\nWe commit to **no breaking changes within a patch version**, and we publish `1.0.0` once the public API has stabilized across at least two consecutive minor releases.\n","readmeFilename":"README.md"}