{"_id":"@afauthhq/worker","_rev":"10-5d9cdf269cdc778abf60a1a4edb90128","name":"@afauthhq/worker","dist-tags":{"alpha":"0.1.0-alpha.0","latest":"0.5.3"},"versions":{"0.1.0-alpha.0":{"name":"@afauthhq/worker","version":"0.1.0-alpha.0","license":"MIT","_id":"@afauthhq/worker@0.1.0-alpha.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"493af9bef0b16e6c3ed30e25c37bdc6f2e6acf4e","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.1.0-alpha.0.tgz","fileCount":5,"integrity":"sha512-mY1MrsGBu0TCQh34dAkdYjLd1IvLw0yweOUZ5Pnxh0cEXO4zXpi+YHyEc9mTIufB+7xwfH9zChQq3Y3wyM8/SA==","signatures":[{"sig":"MEYCIQDhbpYBYaDsDw+h5qGQ+1GF2XWc5fd+D2fr26WIeKVPNwIhAOr7luITDNyYkLsIVMtihPPe3qIozmdOxm4GbtoPP4O0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18719},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-worker-0.1.0-alpha.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/23ef7779dfe856854d51d06082aef938/afauthhq-worker-0.1.0-alpha.0.tgz","_integrity":"sha512-mY1MrsGBu0TCQh34dAkdYjLd1IvLw0yweOUZ5Pnxh0cEXO4zXpi+YHyEc9mTIufB+7xwfH9zChQq3Y3wyM8/SA==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/worker"},"_npmVersion":"10.9.4","description":"AFAuth Cloudflare Workers bindings — createWorker, KvNonceStore","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@afauthhq/core":"0.1.0-alpha.0","@afauthhq/server":"0.1.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","miniflare":"^4.20260518.0","typescript":"^5.5.0","better-sqlite3":"^12.10.0","@types/better-sqlite3":"^7.6.13","@cloudflare/workers-types":"^4.20240614.0"},"_npmOperationalInternal":{"tmp":"tmp/worker_0.1.0-alpha.0_1779354503458_0.09050311777917708","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@afauthhq/worker","version":"0.1.0","license":"MIT","_id":"@afauthhq/worker@0.1.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"6ebc2e47746c2178ff825b5712f38dbc15720d31","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.1.0.tgz","fileCount":5,"integrity":"sha512-+GMK6zmdXCyuHB5PefSAGmEzBKVDEKPyN2WM03GIhYtskcliCPMQRpZt3zd0T7xzsTNyOeSxhaSzLw8OHs1iBQ==","signatures":[{"sig":"MEUCIFMP92Zy0c8Kb0f0pa611miJt8W5ZqOc/W5qQY7BXZVtAiEAyM2aTYLEVX20zLUMTcYBZHAMHixBBELqjzZr0lwZ4JQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27194},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-worker-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/436b00424d0ce2f2e6dfb616459de5a1/afauthhq-worker-0.1.0.tgz","_integrity":"sha512-+GMK6zmdXCyuHB5PefSAGmEzBKVDEKPyN2WM03GIhYtskcliCPMQRpZt3zd0T7xzsTNyOeSxhaSzLw8OHs1iBQ==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/worker"},"_npmVersion":"10.9.4","description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@afauthhq/core":"0.1.0","@afauthhq/server":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","miniflare":"^4.20260518.0","typescript":"^5.5.0","better-sqlite3":"^12.10.0","@types/better-sqlite3":"^7.6.13","@cloudflare/workers-types":"^4.20240614.0"},"_npmOperationalInternal":{"tmp":"tmp/worker_0.1.0_1779356018553_0.8090722201047047","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@afauthhq/worker","version":"0.1.1","license":"MIT","_id":"@afauthhq/worker@0.1.1","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"12fff6f1ba334527ddba7cb015228b0152e8ec97","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.1.1.tgz","fileCount":5,"integrity":"sha512-wOyBKSTnunQ/iEr8I05MYIIDTIRW3W6YGeCcPcT3aefUvVVRa6QQh+uoggdDOseyEic8a42bdOhb22S3Wbimqw==","signatures":[{"sig":"MEYCIQD/F2tex8oS1kCjxOFG7YunJ6fIfmH676PwEcdAVLUM6QIhALkRK43p7NyzVAS5/7xfUfEeWBIPdVqkyqzD2Z2bYUha","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27194},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-worker-0.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/a6dee2e300acffa6f346960674033ef1/afauthhq-worker-0.1.1.tgz","_integrity":"sha512-wOyBKSTnunQ/iEr8I05MYIIDTIRW3W6YGeCcPcT3aefUvVVRa6QQh+uoggdDOseyEic8a42bdOhb22S3Wbimqw==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/worker"},"_npmVersion":"10.9.4","description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@afauthhq/core":"0.1.0","@afauthhq/server":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","miniflare":"^4.20260518.0","typescript":"^5.5.0","better-sqlite3":"^12.10.0","@types/better-sqlite3":"^7.6.13","@cloudflare/workers-types":"^4.20240614.0"},"_npmOperationalInternal":{"tmp":"tmp/worker_0.1.1_1779530288666_0.8582814163373638","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@afauthhq/worker","version":"0.2.0","license":"MIT","_id":"@afauthhq/worker@0.2.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"846b196618ab86148d17b3fbdcef6b73e6fe2ab4","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.2.0.tgz","fileCount":5,"integrity":"sha512-mLuhGwyWrL+Fgqm6bGfpBwDSyYS7jvJ3b2GTqH/bxEyUev9cV3S8C4nZkgQF45hzZlkj4wbr/JDtQ7JaYhB2Tg==","signatures":[{"sig":"MEUCIQCUdQbBZ8KSHkZHBk8OpdANWQUANqR8EBtRGWYjRugRKAIgWSVCU8gGxOdQkJByr5mEKK5z8BFIVo3K6W3fF6ZeC+8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28641},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-worker-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/527dda31e9eca51803a25d44a91c3112/afauthhq-worker-0.2.0.tgz","_integrity":"sha512-mLuhGwyWrL+Fgqm6bGfpBwDSyYS7jvJ3b2GTqH/bxEyUev9cV3S8C4nZkgQF45hzZlkj4wbr/JDtQ7JaYhB2Tg==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/worker"},"_npmVersion":"10.9.4","description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@afauthhq/core":"0.1.0","@afauthhq/server":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","miniflare":"^4.20260518.0","typescript":"^5.5.0","better-sqlite3":"^12.10.0","@afauthhq/agent":"^0.2.0","@types/better-sqlite3":"^7.6.13","@cloudflare/workers-types":"^4.20240614.0"},"_npmOperationalInternal":{"tmp":"tmp/worker_0.2.0_1779952184818_0.5552021684853428","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@afauthhq/worker","version":"0.3.0","license":"MIT","_id":"@afauthhq/worker@0.3.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"0ca93f14387f3102bfcec3b71dfcbc0ac408a302","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.3.0.tgz","fileCount":5,"integrity":"sha512-Mu5vSWcX4vyZuB2pueXeQpKNzCT6nNiBdTrWiawgKiOpZTBMV5mmfTgsL081RWjwOQQdWI+14AkNwmFgf4ERIg==","signatures":[{"sig":"MEYCIQDtEOC2kKzQZQsocItL8Godi9LLqFZv5HNkBxV2Jcu53QIhAIenOGhp5LO+PWUVQ/uX7z+LcWJ7vmrp8vx9J9L3pMKK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29511},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-worker-0.3.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/593fc9960c31febf11771d9b669a643b/afauthhq-worker-0.3.0.tgz","_integrity":"sha512-Mu5vSWcX4vyZuB2pueXeQpKNzCT6nNiBdTrWiawgKiOpZTBMV5mmfTgsL081RWjwOQQdWI+14AkNwmFgf4ERIg==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/worker"},"_npmVersion":"10.9.4","description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@afauthhq/core":"0.1.0","@afauthhq/server":"0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","miniflare":"^4.20260518.0","typescript":"^5.5.0","better-sqlite3":"^12.10.0","@afauthhq/agent":"^0.2.0","@types/better-sqlite3":"^7.6.13","@cloudflare/workers-types":"^4.20240614.0"},"_npmOperationalInternal":{"tmp":"tmp/worker_0.3.0_1780045118336_0.40617242960296895","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@afauthhq/worker","version":"0.4.0","license":"MIT","_id":"@afauthhq/worker@0.4.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"a6e06b6945d17c1862524c8dba4714cbbe105fd7","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.4.0.tgz","fileCount":5,"integrity":"sha512-QYHDETOv9zbITSxbYfCNf5mliWzhlbSfneMVC91O053DdK4of63yZbQyjCgbGTRtDyKH2F+KgGKy1lYgkEfqSg==","signatures":[{"sig":"MEUCIFg+qsUH8xYqNv8hAjdAfmbSL2f9U8uEKgpOntiolOZWAiEAyIKq1VoeAqYmyDjZ3gujLiYx3qaAzzpdGo6AyF4tSJw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33287},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-worker-0.4.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/tmp/claude-501/f01e8d69c41ea150d070d68a5c607b09/afauthhq-worker-0.4.0.tgz","_integrity":"sha512-QYHDETOv9zbITSxbYfCNf5mliWzhlbSfneMVC91O053DdK4of63yZbQyjCgbGTRtDyKH2F+KgGKy1lYgkEfqSg==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/worker"},"_npmVersion":"10.9.4","description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@afauthhq/core":"0.2.0","@afauthhq/server":"0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","miniflare":"^4.20260518.0","typescript":"^5.5.0","better-sqlite3":"^12.10.0","@afauthhq/agent":"^0.3.0","@types/better-sqlite3":"^7.6.13","@cloudflare/workers-types":"^4.20240614.0"},"_npmOperationalInternal":{"tmp":"tmp/worker_0.4.0_1780414469717_0.20012954014543838","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@afauthhq/worker","version":"0.5.0","license":"MIT","_id":"@afauthhq/worker@0.5.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"a17e878a08ca8bd20f4c870387a9319775cf7456","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.5.0.tgz","fileCount":5,"integrity":"sha512-tHK7p/gtylM/5NLuXTiN6MjZCja9X1KQvzHeTANwz6dvnQQ4TZVyQvtkrs+sSmvqoXzeiyumq3BHPP9FH08QeQ==","signatures":[{"sig":"MEUCIQD15oi25OIS99bJfIJxQMt0xKUycXYTmHJxYzVqSUiDxQIgIJsRbkFYPkAv5dU/CcTtc75np+fdWOlhFDJqaGs/qnQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37042},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-worker-0.5.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/tmp/claude-501/3a296d9034d94b962cf262fd640ba63a/afauthhq-worker-0.5.0.tgz","_integrity":"sha512-tHK7p/gtylM/5NLuXTiN6MjZCja9X1KQvzHeTANwz6dvnQQ4TZVyQvtkrs+sSmvqoXzeiyumq3BHPP9FH08QeQ==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/worker"},"_npmVersion":"10.9.4","description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@afauthhq/core":"0.2.0","@afauthhq/server":"0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","miniflare":"^4.20260518.0","typescript":"^5.5.0","better-sqlite3":"^12.10.0","@afauthhq/agent":"^0.4.0","@types/better-sqlite3":"^7.6.13","@cloudflare/workers-types":"^4.20240614.0"},"_npmOperationalInternal":{"tmp":"tmp/worker_0.5.0_1780469347391_0.3793515876348539","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@afauthhq/worker","version":"0.5.1","license":"MIT","_id":"@afauthhq/worker@0.5.1","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"6e54a092109ce7b5b63090cd6bc00d9d76c78139","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.5.1.tgz","fileCount":5,"integrity":"sha512-ccyb1gHomuqfhimzCn5fITIspFDBrKX62TdQ5VKHWD/jveSvuOszDPfKFBw+hsxfLf7RagnkbLwMheIL7IHCtQ==","signatures":[{"sig":"MEYCIQD8hkt58aso0APpfZx8m6fNDuUZbl1hvPpenyyalPInPAIhAPJUAnBx3Np8OCO5eVUAkBVT3Kqqb9wHnpfB+iYHV9Lm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37042},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-worker-0.5.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/tmp/claude-501/e67981fed99388b9d9576574f7e9cfc9/afauthhq-worker-0.5.1.tgz","_integrity":"sha512-ccyb1gHomuqfhimzCn5fITIspFDBrKX62TdQ5VKHWD/jveSvuOszDPfKFBw+hsxfLf7RagnkbLwMheIL7IHCtQ==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/worker"},"_npmVersion":"10.9.4","description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@afauthhq/core":"0.2.0","@afauthhq/server":"0.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","miniflare":"^4.20260518.0","typescript":"^5.5.0","better-sqlite3":"^12.10.0","@afauthhq/agent":"^0.5.0","@types/better-sqlite3":"^7.6.13","@cloudflare/workers-types":"^4.20240614.0"},"_npmOperationalInternal":{"tmp":"tmp/worker_0.5.1_1780545085847_0.616634098783378","host":"s3://npm-registry-packages-npm-production"}},"0.5.2":{"name":"@afauthhq/worker","version":"0.5.2","license":"MIT","_id":"@afauthhq/worker@0.5.2","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"0bebfd58f31ef7db08fff501f335ec7b7c992ccb","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.5.2.tgz","fileCount":5,"integrity":"sha512-mFHJsnW2XIlNRshQF3Qk44a3I6P8NiCaCUC7rMa3pfO/MzR+E1WzglphnPvZctNnT60XbLiI7MdrgPWBeRmMcw==","signatures":[{"sig":"MEYCIQCqAP8XfjWgYgq50sj8SUWkjTdSxZIZhB9jVhWcuRHYtQIhAPXaP2/GHSgUi8OLA62CLKYyRlKYFvNqSETAu00PFpd5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37651},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-worker-0.5.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/e4693c611c47ec2a8b45fefdeea012e4/afauthhq-worker-0.5.2.tgz","_integrity":"sha512-mFHJsnW2XIlNRshQF3Qk44a3I6P8NiCaCUC7rMa3pfO/MzR+E1WzglphnPvZctNnT60XbLiI7MdrgPWBeRmMcw==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/worker"},"_npmVersion":"10.9.4","description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@afauthhq/core":"0.2.0","@afauthhq/server":"0.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","miniflare":"^4.20260518.0","typescript":"^5.5.0","better-sqlite3":"^12.10.0","@afauthhq/agent":"^0.6.0","@types/better-sqlite3":"^7.6.13","@cloudflare/workers-types":"^4.20240614.0"},"_npmOperationalInternal":{"tmp":"tmp/worker_0.5.2_1780750390997_0.9673613817552491","host":"s3://npm-registry-packages-npm-production"}},"0.5.3":{"name":"@afauthhq/worker","version":"0.5.3","description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","license":"MIT","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"dependencies":{"@afauthhq/core":"0.3.0","@afauthhq/server":"0.7.1"},"devDependencies":{"@cloudflare/workers-types":"^4.20240614.0","@types/better-sqlite3":"^7.6.13","better-sqlite3":"^12.10.0","miniflare":"^4.20260518.0","tsup":"^8.0.0","typescript":"^5.5.0","vitest":"^2.0.0","@afauthhq/agent":"^0.6.1"},"repository":{"type":"git","url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","directory":"packages/worker"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.ts --format esm --dts --clean","test":"vitest run --passWithNoTests","coverage":"vitest run --coverage --passWithNoTests","lint":"echo TODO: configure lint","typecheck":"tsc --noEmit"},"_id":"@afauthhq/worker@0.5.3","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","_integrity":"sha512-sM4L7UzZ5zY0xdj9RU0X4bedAcuv7sk9EppUP1U5S9r5JQE0J+A0OO+54Q5NrMf8INIKbPC9HU1yCivEDtlFgg==","_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/669a095442ee740b734478862b885ccd/afauthhq-worker-0.5.3.tgz","_from":"file:afauthhq-worker-0.5.3.tgz","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-sM4L7UzZ5zY0xdj9RU0X4bedAcuv7sk9EppUP1U5S9r5JQE0J+A0OO+54Q5NrMf8INIKbPC9HU1yCivEDtlFgg==","shasum":"f88505f62341f9955b899838bffd04034be2c5e3","tarball":"https://registry.npmjs.org/@afauthhq/worker/-/worker-0.5.3.tgz","fileCount":5,"unpackedSize":37651,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEiNqHp0e1jZILLohOd1CRJ5XEMJfqBgAR3n1txFznalAiAWdQAvJ6EYmWfsp+fTtSwzNxcsET+lN7kzUmacTMZQrw=="}]},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"directories":{},"maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/worker_0.5.3_1780972421803_0.8155626717887867"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-21T09:08:23.350Z","modified":"2026-06-09T02:33:42.080Z","0.1.0-alpha.0":"2026-05-21T09:08:23.596Z","0.1.0":"2026-05-21T09:33:38.695Z","0.1.1":"2026-05-23T09:58:08.830Z","0.2.0":"2026-05-28T07:09:44.938Z","0.3.0":"2026-05-29T08:58:38.480Z","0.4.0":"2026-06-02T15:34:29.901Z","0.5.0":"2026-06-03T06:49:07.553Z","0.5.1":"2026-06-04T03:51:25.976Z","0.5.2":"2026-06-06T12:53:11.127Z","0.5.3":"2026-06-09T02:33:41.953Z"},"bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"license":"MIT","homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","repository":{"type":"git","url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","directory":"packages/worker"},"description":"AFAuth Cloudflare Workers bindings — createWorker, DurableObjectNonceStore, KvNonceStore, D1AccountStore","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"readme":"# `@afauthhq/worker`\n\nCloudflare Workers bindings for the AFAuth Protocol. Wraps\n`@afauthhq/server` in a Worker-native router and provides storage\nimplementations backed by Durable Objects, KV, and D1.\n\n## Quickstart\n\n```typescript\nimport {\n  AFAuthNonceDO,\n  createNonceDurableObject,\n  createWorker,\n  DurableObjectNonceStore,\n  KvRevocationList,\n} from \"@afauthhq/worker\";\nimport {\n  consoleEmailHandler,\n  MemoryAccountStore,\n  type DiscoveryDocument,\n} from \"@afauthhq/server\";\n\n// Re-export the nonce DO base class under whatever class_name your\n// wrangler.toml binding declares (default: `AFAuthNonceDO`).\nexport class AFAuthNonceDO extends createNonceDurableObject() {}\n\ninterface Env {\n  AFAUTH_NONCE_DO: DurableObjectNamespace;\n  AFAUTH_REVOCATIONS: KVNamespace;\n}\n\nconst discovery: DiscoveryDocument = { /* ... */ };\nconst accounts = new MemoryAccountStore(); // replace with durable impl\n\nexport default {\n  fetch(req, env: Env, ctx) {\n    const handler = createWorker({\n      nonceStore: new DurableObjectNonceStore(env.AFAUTH_NONCE_DO),\n      revocationList: new KvRevocationList(env.AFAUTH_REVOCATIONS),\n      serviceDid: discovery.service_did,\n      accounts,\n      recipients: { email: consoleEmailHandler },\n      discovery,\n      baseUrl: \"https://api.example.com\",\n      extractOwnerSession: async (req) => /* your session extraction */ null,\n    });\n    return handler.fetch!(req, env, ctx);\n  },\n};\n```\n\n`wrangler.toml` binding for the DO:\n\n```toml\n[[durable_objects.bindings]]\nname       = \"AFAUTH_NONCE_DO\"\nclass_name = \"AFAuthNonceDO\"\n\n[[migrations]]\ntag         = \"v1\"\nnew_classes = [\"AFAuthNonceDO\"]\n```\n\n## Spam-resistant defaults\n\n`createWorker` mirrors `new Server({...})` rather than the higher-level\n[`defineService`](../server/README.md#quickstart) factory — the Worker\nneeds explicit options for its DO bindings, KV namespaces, and\n`extractOwnerSession`. To get the same spam-resistance, pass\n`trustAttestor()` and declare `attested_only` on the discovery doc:\n\n```typescript\nimport { trustAttestor } from \"@afauthhq/server\";\n\nconst discovery: DiscoveryDocument = {\n  /* ... */\n  billing: {\n    unclaimed_mode: \"attested_only\",\n    accepted_attestors: [\"afauth-trust\"],\n  },\n};\n\ncreateWorker({\n  /* ... */\n  attestor: trustAttestor(),\n  discovery,\n  // §10.4.4 \"same human, same bucket\". Because `createWorker` mirrors\n  // `new Server` (not `defineService`), per-principal uniqueness is NOT\n  // defaulted — pass it explicitly. `D1SubHUniquenessStore` gives an\n  // atomic, durable claim via its UNIQUE index:\n  subHUniqueness: new D1SubHUniquenessStore(env.AFAUTH_DB),\n});\n```\n\nAgents that haven't run `afauth trust link` will be rejected with\n`401 attestation_required`; the [`afauth signup`](https://github.com/AFAuthHQ/cli#usage)\nCLI guides them through the link flow on that error. A second agent for a\nhuman who already has an account here is rejected with\n`409 principal_already_registered`. To free a human's slot when their\nunclaimed account expires, pass the same store to `sweepExpiredAccounts`\n(`subHUniqueness`).\n\n## Nonce store: pick DO, not KV\n\n§5.6 requires the seen-nonce set be **shared and atomic** across\nverifier instances. Cloudflare KV is shared but offers no atomic\ncheck-and-set: a `get`-then-`put` window admits cross-isolate\nreplay during the freshness window.\n\n| Store | Atomic? | Shared? | When to use |\n|---|---|---|---|\n| `DurableObjectNonceStore` | **yes** | yes | **recommended for production** |\n| `KvNonceStore` | no | yes | dev only, or single-region low-value deployments where the trade-off is documented |\n| `MemoryNonceStore` (from `@afauthhq/server`) | yes | no | tests only |\n\n`DurableObjectNonceStore` partitions by `keyid` so unrelated agents\nfan out across distinct actor instances; only requests from the same\nagent share an actor and serialize against each other.\n\n## Exports\n\n- **`createWorker(opts)`** — returns an `ExportedHandler` routing the\n  five AFAuth endpoints to `@afauthhq/server` handlers. Routing is\n  done with a small in-house router (ADR-0002).\n- **`createNonceDurableObject()`** — factory that returns a\n  Durable-Object base class implementing the §5.6 atomic\n  check-and-set protocol. Subclass it in your Worker module and\n  register the subclass in `wrangler.toml`.\n- **`DurableObjectNonceStore`** — `NonceStore` that delegates to the\n  DO above. Spec-compliant atomic insert; recommended for production.\n- **`KvNonceStore`** — `NonceStore` backed by Cloudflare KV. Has a\n  known eventual-consistency replay window; see the JSDoc on the\n  class. Suitable for dev/low-value deployments only.\n- **`KvRevocationList`** — `RevocationList` backed by Cloudflare KV\n  (§8.3). Durable; no TTL.\n- **`KvAttestedFreshnessStore`** — `AttestedFreshnessStore` backed by\n  Cloudflare KV (§10.7). Stores each account's `attestedUntil`; the KV\n  entry's TTL is set to the remaining window, so lapsed sessions\n  self-evict. Pass to `Server` via `attestedSession: { store }`.\n- **`KvRateLimiter`** — `RateLimiter` backed by Cloudflare KV\n  (§11.3). Fixed-window counter per key; eventually-consistent\n  reads mean racing isolates may over-count (fail-safe per §11.3),\n  never under-count.\n- **`D1AccountStore`** — `AccountStore` backed by Cloudflare D1\n  (§6 + §7.3). Every ADR-0004 named atomic op uses `D1.batch()`\n  for transactional grouping. The schema lives at\n  [`migrations/0001_init.sql`](migrations/0001_init.sql); apply\n  via `wrangler d1 migrations apply <db-name>` before first use.\n  Schema is portable to standard Postgres/MySQL with minor\n  syntactic changes.\n- **`D1SubHUniquenessStore`** — `SubHUniquenessStore` backed by\n  Cloudflare D1 (§10.4.4), in the same database as `D1AccountStore`.\n  Enforces \"at most one account per human\": `claim()` is atomic via the\n  composite PRIMARY KEY `(iss, sub_h)` (`INSERT … ON CONFLICT DO\n  NOTHING`), which a `KvNonceStore`-style get-then-put could not give —\n  so there is no KV variant. Schema lives at\n  [`migrations/0002_subh_uniqueness.sql`](migrations/0002_subh_uniqueness.sql);\n  apply after `0001`. Pass via `subHUniqueness` (and to\n  `sweepExpiredAccounts` to release slots on expiry).\n- **`WorkerOptions`** — extends `ServerOptions` with the required\n  `extractOwnerSession` callback for the claim-completion route.\n\n## See also\n\n- [`AFAuthHQ/spec`](https://github.com/AFAuthHQ/spec) — protocol spec.\n- [`@afauthhq/server`](../server/) — the handlers `createWorker`\n  dispatches to.\n- [`examples/worker/`](../../examples/worker/) — runnable reference\n  Worker that prefers DO when its binding is configured and falls\n  back to KV (with a warning) otherwise.\n","readmeFilename":"README.md"}