{"_id":"@clossys/bouncer","_rev":"8-c64297c71329f0cfe77bd6a0703b8c84","name":"@clossys/bouncer","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.1":{"name":"@clossys/bouncer","version":"0.1.1","keywords":["authorization","identity","entitlement","delegation","reconciliation","gate","typescript"],"author":{"name":"Calvin Hung"},"license":"MIT","_id":"@clossys/bouncer@0.1.1","maintainers":[{"name":"thecalvinhung","email":"hello@clossys.com"}],"homepage":"https://github.com/clossys/foundry/tree/main/packages/bouncer#readme","bugs":{"url":"https://github.com/clossys/foundry/issues"},"bin":{"bouncer-check":"dist/cli.js"},"dist":{"shasum":"9b55cccfceb9975a12809fd1a998c508fe1d6858","tarball":"https://registry.npmjs.org/@clossys/bouncer/-/bouncer-0.1.1.tgz","fileCount":174,"integrity":"sha512-byzh2hhFVIWUpfa1oVnYDtZbo+yMyPivfjh5RN37fUQ9g1JLlKP7c/fmoZjtG4dvkgL6Vi+wIp2GB3qgjx8SVg==","signatures":[{"sig":"MEYCIQDJS/E+dTSoNIVaJJqDid6S3uEJiFZ4Khr/DSSM/NCiRQIhAJUKVzT0To5bmxAY7FDBKcfq+U5GK+PAgBy6CU7GSzXM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":551527},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./agent":{"types":"./dist/agent/index.d.ts","import":"./dist/agent/index.js"},"./providers/clerk":{"types":"./dist/providers/clerk/index.d.ts","import":"./dist/providers/clerk/index.js"},"./providers/clerk/web":{"types":"./dist/providers/clerk/web/index.d.ts","import":"./dist/providers/clerk/web/index.js"},"./providers/clerk/web/proxy":{"types":"./dist/providers/clerk/web/proxy-entry.d.ts","import":"./dist/providers/clerk/web/proxy-entry.js"},"./providers/clerk/web/client":{"types":"./dist/providers/clerk/web/client-index.d.ts","import":"./dist/providers/clerk/web/client-index.js"},"./providers/clerk/web/server":{"types":"./dist/providers/clerk/web/server.d.ts","import":"./dist/providers/clerk/web/server.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"node ../../scripts/check-name-collision.mjs . && npm run build"},"_npmUser":{"name":"thecalvinhung","email":"hello@clossys.com"},"repository":{"url":"git+https://github.com/clossys/foundry.git","type":"git","directory":"packages/bouncer"},"_npmVersion":"11.17.0","description":"The bouncer role: is this actor who they claim, and is what they are doing still inside what they were granted? Dependency-free machinery for a consumer's own authority records: a closed consumer-declared role hierarchy, a fail-closed session predicate, e","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.1","svix":"^1.96.0","react":"19.2.8","vitest":"^4.1.9","react-dom":"19.2.8","typescript":"~6.0.0","@types/node":"^22.10.0","@types/react":"^19.2.0","@clerk/nextjs":"7.7.5","@types/react-dom":"^19.2.0"},"peerDependencies":{"next":">=16 <17","svix":"^1.96.0","react":">=19 <20","react-dom":">=19 <20","@clerk/nextjs":">=7 <8"},"peerDependenciesMeta":{"next":{"optional":true},"svix":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true},"@clerk/nextjs":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/bouncer_0.1.1_1788197384599_0.6294797372512722","host":"s3://npm-registry-packages-npm-production"},"foundryReleaseVerification":{"next":{"proxySubpaths":["./providers/clerk/web/proxy"],"clientSubpaths":["./providers/clerk/web","./providers/clerk/web/client"],"serverSubpaths":["./providers/clerk/web/server"]}}},"0.1.2":{"name":"@clossys/bouncer","version":"0.1.2","keywords":["authorization","identity","entitlement","delegation","reconciliation","gate","typescript"],"author":{"name":"Calvin Hung"},"license":"MIT","_id":"@clossys/bouncer@0.1.2","maintainers":[{"name":"thecalvinhung","email":"hello@clossys.com"}],"homepage":"https://github.com/clossys/foundry/tree/main/packages/bouncer#readme","bugs":{"url":"https://github.com/clossys/foundry/issues"},"bin":{"bouncer-check":"dist/cli.js"},"dist":{"shasum":"d2c285c84bd5b3479e7aaa3636fcab712c7cdfd5","tarball":"https://registry.npmjs.org/@clossys/bouncer/-/bouncer-0.1.2.tgz","fileCount":174,"integrity":"sha512-KRu9PMuXg1GBMcrD2ndkVyAn6RjKubdA4tEz7ArZCoxKx3h9pfNQh4/o0X+9N3+KZrPfi36foILEznSE6qMrxg==","signatures":[{"sig":"MEYCIQDusPD2E42EFY+8UIi+9CCSHjDctXdvwRf6g1lF/Lgr6wIhAOB6djVe14ngW20Rur7oIRERGCxqobrkfhge5PepFbES","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@clossys%2fbouncer@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":551774},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./agent":{"types":"./dist/agent/index.d.ts","import":"./dist/agent/index.js"},"./providers/clerk":{"types":"./dist/providers/clerk/index.d.ts","import":"./dist/providers/clerk/index.js"},"./providers/clerk/web":{"types":"./dist/providers/clerk/web/index.d.ts","import":"./dist/providers/clerk/web/index.js"},"./providers/clerk/web/proxy":{"types":"./dist/providers/clerk/web/proxy-entry.d.ts","import":"./dist/providers/clerk/web/proxy-entry.js"},"./providers/clerk/web/client":{"types":"./dist/providers/clerk/web/client-index.d.ts","import":"./dist/providers/clerk/web/client-index.js"},"./providers/clerk/web/server":{"types":"./dist/providers/clerk/web/server.d.ts","import":"./dist/providers/clerk/web/server.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"node ../../scripts/check-name-collision.mjs . && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:25c9f070-e25c-4bed-9428-526936e29493"}},"repository":{"url":"git+https://github.com/clossys/foundry.git","type":"git","directory":"packages/bouncer"},"_npmVersion":"11.17.0","description":"The bouncer role: is this actor who they claim, and is what they are doing still inside what they were granted? Dependency-free machinery for a consumer's own authority records: a closed consumer-declared role hierarchy, a fail-closed session predicate, e","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.1","svix":"^1.96.0","react":"19.2.8","vitest":"^4.1.9","react-dom":"19.2.8","typescript":"~6.0.0","@types/node":"^22.10.0","@types/react":"^19.2.0","@clerk/nextjs":"7.7.5","@types/react-dom":"^19.2.0"},"peerDependencies":{"next":">=16 <17","svix":"^1.96.0","react":">=19 <20","react-dom":">=19 <20","@clerk/nextjs":">=7 <8"},"peerDependenciesMeta":{"next":{"optional":true},"svix":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true},"@clerk/nextjs":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/bouncer_0.1.2_1788269362771_0.03934256663193492","host":"s3://npm-registry-packages-npm-production"},"foundryReleaseVerification":{"next":{"proxySubpaths":["./providers/clerk/web/proxy"],"clientSubpaths":["./providers/clerk/web","./providers/clerk/web/client"],"serverSubpaths":["./providers/clerk/web/server"]}}},"0.1.3":{"name":"@clossys/bouncer","version":"0.1.3","keywords":["authorization","identity","entitlement","delegation","reconciliation","gate","typescript"],"author":{"name":"Clossys"},"license":"MIT","_id":"@clossys/bouncer@0.1.3","maintainers":[{"name":"thecalvinhung","email":"hello@clossys.com"}],"homepage":"https://github.com/clossys/foundry/tree/main/packages/bouncer#readme","bugs":{"url":"https://github.com/clossys/foundry/issues"},"bin":{"bouncer-check":"dist/cli.js"},"dist":{"shasum":"989c1bfcff4c2afcbec9a8acee4eaf4eef3ed99f","tarball":"https://registry.npmjs.org/@clossys/bouncer/-/bouncer-0.1.3.tgz","fileCount":174,"integrity":"sha512-7e9fXJjdOidz0us8KBQxuP4zW3RqL8cQhulOYLXHXSha3D5GGknEPdfQE61X1CwUJkfbG1jdlZ351A/7q3z3uQ==","signatures":[{"sig":"MEYCIQC1WOBsqCw/SLUfAtp69aDfBfNZTUJcGENZ5gDjhmwhZgIhAMh2zzdpscTgGwx2T8FBHPUN2+NOVucFPhfsO0SIjYc+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@clossys%2fbouncer@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":552211},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./agent":{"types":"./dist/agent/index.d.ts","import":"./dist/agent/index.js"},"./providers/clerk":{"types":"./dist/providers/clerk/index.d.ts","import":"./dist/providers/clerk/index.js"},"./providers/clerk/web":{"types":"./dist/providers/clerk/web/index.d.ts","import":"./dist/providers/clerk/web/index.js"},"./providers/clerk/web/proxy":{"types":"./dist/providers/clerk/web/proxy-entry.d.ts","import":"./dist/providers/clerk/web/proxy-entry.js"},"./providers/clerk/web/client":{"types":"./dist/providers/clerk/web/client-index.d.ts","import":"./dist/providers/clerk/web/client-index.js"},"./providers/clerk/web/server":{"types":"./dist/providers/clerk/web/server.d.ts","import":"./dist/providers/clerk/web/server.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"node ../../scripts/check-name-collision.mjs . && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:25c9f070-e25c-4bed-9428-526936e29493"}},"repository":{"url":"git+https://github.com/clossys/foundry.git","type":"git","directory":"packages/bouncer"},"_npmVersion":"11.17.0","description":"The bouncer role: is this actor who they claim, and is what they are doing still inside what they were granted? Dependency-free machinery for a consumer's own authority records: a closed consumer-declared role hierarchy, a fail-closed session predicate, e","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.1","svix":"^1.96.0","react":"19.2.8","vitest":"^4.1.9","react-dom":"19.2.8","typescript":"~6.0.0","@types/node":"^22.10.0","@types/react":"^19.2.0","@clerk/nextjs":"7.8.3","@types/react-dom":"^19.2.5"},"peerDependencies":{"next":">=16 <17","svix":"^1.96.0","react":">=19 <20","react-dom":">=19 <20","@clerk/nextjs":">=7 <8"},"peerDependenciesMeta":{"next":{"optional":true},"svix":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true},"@clerk/nextjs":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/bouncer_0.1.3_1788456979648_0.7694282282715319","host":"s3://npm-registry-packages-npm-production"},"foundryReleaseVerification":{"next":{"proxySubpaths":["./providers/clerk/web/proxy"],"clientSubpaths":["./providers/clerk/web","./providers/clerk/web/client"],"serverSubpaths":["./providers/clerk/web/server"]}}},"0.1.7":{"name":"@clossys/bouncer","version":"0.1.7","keywords":["authorization","identity","entitlement","delegation","reconciliation","gate","typescript"],"author":{"name":"Clossys"},"license":"MIT","_id":"@clossys/bouncer@0.1.7","maintainers":[{"name":"thecalvinhung","email":"hello@clossys.com"}],"homepage":"https://github.com/clossys/foundry/tree/main/packages/bouncer#readme","bugs":{"url":"https://github.com/clossys/foundry/issues"},"bin":{"bouncer-check":"dist/cli.js"},"dist":{"shasum":"b84dcbe406f5e002d7d67df76cceeff54acce4e9","tarball":"https://registry.npmjs.org/@clossys/bouncer/-/bouncer-0.1.7.tgz","fileCount":174,"integrity":"sha512-/XuusonrhHU0VSCzn21e6dy78nwzX3SrbaIMQo4/JR360h6v9p0Ob53SoedaEHENT2hdlbYEB09j74y75PJDig==","signatures":[{"sig":"MEQCIGL1z9vnoA3ZYbRyIgBM15CQKTt6kZSXt2ozkbKnZZYkAiBqUjYr8j2cW5x4SCjIFEsTNc7I1deXuQpU+OQbxMFOKQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQD3Y5mV99EkE1GswxxaHA3wNj32EgHiGClELxWsiFIl3QIgJHiXdkK5H3ZmA0B2uLZTTxac9wPxSMf1XzHxXTyH4So=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@clossys%2fbouncer@0.1.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":586230},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./agent":{"types":"./dist/agent/index.d.ts","import":"./dist/agent/index.js"},"./providers/clerk":{"types":"./dist/providers/clerk/index.d.ts","import":"./dist/providers/clerk/index.js"},"./providers/clerk/web":{"types":"./dist/providers/clerk/web/index.d.ts","import":"./dist/providers/clerk/web/index.js"},"./providers/clerk/web/proxy":{"types":"./dist/providers/clerk/web/proxy-entry.d.ts","import":"./dist/providers/clerk/web/proxy-entry.js"},"./providers/clerk/web/client":{"types":"./dist/providers/clerk/web/client-index.d.ts","import":"./dist/providers/clerk/web/client-index.js"},"./providers/clerk/web/server":{"types":"./dist/providers/clerk/web/server.d.ts","import":"./dist/providers/clerk/web/server.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"node ../../scripts/check-name-collision.mjs . && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:25c9f070-e25c-4bed-9428-526936e29493"}},"repository":{"url":"git+https://github.com/clossys/foundry.git","type":"git","directory":"packages/bouncer"},"_npmVersion":"11.17.0","description":"The bouncer role: is this actor who they claim, and is what they are doing still inside what they were granted? Dependency-free machinery for a consumer's own authority records: a closed consumer-declared role hierarchy, a fail-closed session predicate, e","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.5","svix":"^1.96.0","react":"19.3.0","vitest":"^5.0.0","react-dom":"19.3.0","typescript":"~6.0.0","@types/node":"^26.5.1","@types/react":"^19.3.0","@clerk/nextjs":"7.9.1","@types/react-dom":"^19.3.0"},"peerDependencies":{"next":">=16 <17","svix":"^1.96.0","react":">=19 <20","react-dom":">=19 <20","@clerk/nextjs":">=7 <8"},"peerDependenciesMeta":{"next":{"optional":true},"svix":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true},"@clerk/nextjs":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/bouncer_0.1.7_1789610769779_0.7950344182407079","host":"s3://npm-registry-packages-npm-production"},"foundryReleaseVerification":{"next":{"proxySubpaths":["./providers/clerk/web/proxy"],"clientSubpaths":["./providers/clerk/web","./providers/clerk/web/client"],"serverSubpaths":["./providers/clerk/web/server"]}}},"0.1.8":{"name":"@clossys/bouncer","version":"0.1.8","keywords":["authorization","identity","entitlement","delegation","reconciliation","gate","typescript"],"author":{"name":"Clossys"},"license":"MIT","_id":"@clossys/bouncer@0.1.8","maintainers":[{"name":"thecalvinhung","email":"hello@clossys.com"}],"homepage":"https://github.com/clossys/foundry/tree/main/packages/bouncer#readme","bugs":{"url":"https://github.com/clossys/foundry/issues"},"bin":{"bouncer-check":"dist/cli.js","bouncer-rate-check":"dist/unreconciled-grant-rate-cli.js"},"dist":{"shasum":"93b28fa393febdde74ff1eb0d94ad8729b2609bc","tarball":"https://registry.npmjs.org/@clossys/bouncer/-/bouncer-0.1.8.tgz","fileCount":184,"integrity":"sha512-fK0I6fFcEb2GpZCSKyAyDY51E41fzWX3ftpUsJ96jIBX4Bn4CnMBDeZPP9u8ehNZegddgN9I6ezU5x5ySTZ5Mg==","signatures":[{"sig":"MEYCIQCr2+CQ696rExzUYCmWut8ceiTsihZ+KY90FTrMzW0h9QIhAO7mo0wVOB/6sIg01v+TanDMDVG+DYI6TMJxVUwjBmcA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDxtoOYnRB0kUOGnJi2qrEXWOce1xJtUal+xyVt2oq5egIgM+frOvaMhEQyrCwJRVjILqHFK0aVsyGHCXhYuIxICGM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@clossys%2fbouncer@0.1.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":622409},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./agent":{"types":"./dist/agent/index.d.ts","import":"./dist/agent/index.js"},"./providers/clerk":{"types":"./dist/providers/clerk/index.d.ts","import":"./dist/providers/clerk/index.js"},"./providers/clerk/web":{"types":"./dist/providers/clerk/web/index.d.ts","import":"./dist/providers/clerk/web/index.js"},"./providers/clerk/web/proxy":{"types":"./dist/providers/clerk/web/proxy-entry.d.ts","import":"./dist/providers/clerk/web/proxy-entry.js"},"./providers/clerk/web/client":{"types":"./dist/providers/clerk/web/client-index.d.ts","import":"./dist/providers/clerk/web/client-index.js"},"./providers/clerk/web/server":{"types":"./dist/providers/clerk/web/server.d.ts","import":"./dist/providers/clerk/web/server.js"}},"foundry":{"assessment":{"bin":"bouncer-rate-check","invocation":"single-json-input"}},"private":false,"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"node ../../scripts/check-name-collision.mjs . && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:25c9f070-e25c-4bed-9428-526936e29493"}},"repository":{"url":"git+https://github.com/clossys/foundry.git","type":"git","directory":"packages/bouncer"},"_npmVersion":"11.17.0","description":"The bouncer role: is this actor who they claim, and is what they are doing still inside what they were granted? Dependency-free machinery for a consumer's own authority records: a closed consumer-declared role hierarchy, a fail-closed session predicate, e","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.5","svix":"^1.96.0","react":"19.3.0","vitest":"^5.0.0","react-dom":"19.3.0","typescript":"~6.0.0","@types/node":"^26.5.1","@types/react":"^19.3.0","@clerk/nextjs":"7.9.1","@types/react-dom":"^19.3.0"},"peerDependencies":{"next":">=16 <17","svix":"^1.96.0","react":">=19 <20","react-dom":">=19 <20","@clerk/nextjs":">=7 <8"},"peerDependenciesMeta":{"next":{"optional":true},"svix":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true},"@clerk/nextjs":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/bouncer_0.1.8_1789799491185_0.14423308369687837","host":"s3://npm-registry-packages-npm-production"},"foundryReleaseVerification":{"next":{"proxySubpaths":["./providers/clerk/web/proxy"],"clientSubpaths":["./providers/clerk/web","./providers/clerk/web/client"],"serverSubpaths":["./providers/clerk/web/server"]}}},"0.1.9":{"name":"@clossys/bouncer","version":"0.1.9","keywords":["authorization","identity","entitlement","delegation","reconciliation","gate","typescript"],"author":{"name":"Clossys"},"license":"MIT","_id":"@clossys/bouncer@0.1.9","maintainers":[{"name":"thecalvinhung","email":"hello@clossys.com"}],"homepage":"https://github.com/clossys/foundry/tree/main/packages/bouncer#readme","bugs":{"url":"https://github.com/clossys/foundry/issues"},"bin":{"bouncer-check":"dist/cli.js","bouncer-rate-check":"dist/unreconciled-grant-rate-cli.js"},"dist":{"shasum":"3b7728470890d5b8876332f582659770f5cbc04c","tarball":"https://registry.npmjs.org/@clossys/bouncer/-/bouncer-0.1.9.tgz","fileCount":184,"integrity":"sha512-s3TNsqHxOqdDMY1N8rMQw6EgQ55YAPkYUEFVOUdw/oR5zhS2/TXQUhIzIZZYBGBpJIDK1Teb/CpxaQohJakXpg==","signatures":[{"sig":"MEUCIGcIjif/Z6/7FsdzX0ytUK5/op9ahpbwqbweByr6ow6/AiEApMKPU/6Vcn3e8BVJMt2hyl6NkUNHCaZR/Dk7+QUmRLY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCDwvs+dD4mGaI7yu4D/tIhbhWE937yB4aAQ5Gl4UrgYQIhAPnRUNOEUey956FsbVK2pbVD/QXAhZTUWVdZ3RAuZRYF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@clossys%2fbouncer@0.1.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":625504},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./agent":{"types":"./dist/agent/index.d.ts","import":"./dist/agent/index.js"},"./providers/clerk":{"types":"./dist/providers/clerk/index.d.ts","import":"./dist/providers/clerk/index.js"},"./providers/clerk/web":{"types":"./dist/providers/clerk/web/index.d.ts","import":"./dist/providers/clerk/web/index.js"},"./providers/clerk/web/proxy":{"types":"./dist/providers/clerk/web/proxy-entry.d.ts","import":"./dist/providers/clerk/web/proxy-entry.js"},"./providers/clerk/web/client":{"types":"./dist/providers/clerk/web/client-index.d.ts","import":"./dist/providers/clerk/web/client-index.js"},"./providers/clerk/web/server":{"types":"./dist/providers/clerk/web/server.d.ts","import":"./dist/providers/clerk/web/server.js"}},"foundry":{"assessment":{"bin":"bouncer-rate-check","invocation":"single-json-input"}},"private":false,"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"node ../../scripts/check-name-collision.mjs . && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:25c9f070-e25c-4bed-9428-526936e29493"}},"repository":{"url":"git+https://github.com/clossys/foundry.git","type":"git","directory":"packages/bouncer"},"_npmVersion":"11.17.0","description":"The bouncer role: is this actor who they claim, and is what they are doing still inside what they were granted? Dependency-free machinery for a consumer's own authority records: a closed consumer-declared role hierarchy, a fail-closed session predicate, e","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.5","svix":"^1.96.0","react":"19.3.0","vitest":"^5.0.0","react-dom":"19.3.0","typescript":"~6.0.0","@types/node":"^26.5.1","@types/react":"^19.3.0","@clerk/nextjs":"7.9.1","@types/react-dom":"^19.3.0"},"peerDependencies":{"next":">=16 <17","svix":"^1.96.0","react":">=19 <20","react-dom":">=19 <20","@clerk/nextjs":">=7 <8"},"peerDependenciesMeta":{"next":{"optional":true},"svix":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true},"@clerk/nextjs":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/bouncer_0.1.9_1789876098268_0.7935674640734092","host":"s3://npm-registry-packages-npm-production"},"foundryReleaseVerification":{"next":{"proxySubpaths":["./providers/clerk/web/proxy"],"clientSubpaths":["./providers/clerk/web","./providers/clerk/web/client"],"serverSubpaths":["./providers/clerk/web/server"]}}},"0.1.10":{"name":"@clossys/bouncer","version":"0.1.10","keywords":["authorization","identity","entitlement","delegation","reconciliation","gate","typescript"],"author":{"name":"Clossys"},"license":"MIT","_id":"@clossys/bouncer@0.1.10","maintainers":[{"name":"thecalvinhung","email":"hello@clossys.com"}],"homepage":"https://github.com/clossys/foundry/tree/main/packages/bouncer#readme","bugs":{"url":"https://github.com/clossys/foundry/issues"},"bin":{"bouncer-check":"dist/cli.js","bouncer-rate-check":"dist/unreconciled-grant-rate-cli.js"},"dist":{"shasum":"9972ed0a9f672939b68d4c62cd1b48f21246e1f4","tarball":"https://registry.npmjs.org/@clossys/bouncer/-/bouncer-0.1.10.tgz","fileCount":185,"integrity":"sha512-4omq2o//OLw+FclR/5h2LuLVOYDOGPhPpXnn3dtFAEhznvP3tsXmRwv+jmj37fbFS+bEXIjYRgzs4HG6oeqAKA==","signatures":[{"sig":"MEYCIQCkbWH2oQuoFo8s+gnZAbMiS0nkgyjC97DP9sFBcYntjwIhAPKy3DZxIw8XiGOjvt8lp5/Zi/dHWe6zRQPbh3JMi0Wr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDJV3ItV/hRg7pSnAigtXGakZ7nhOm/oSwyuYOfn04JXAIgP5e447G+bdw6UQdqoWg+kDd0zX12qfeEQgXM38UHnL0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":627872},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./agent":{"types":"./dist/agent/index.d.ts","import":"./dist/agent/index.js"},"./providers/clerk":{"types":"./dist/providers/clerk/index.d.ts","import":"./dist/providers/clerk/index.js"},"./providers/clerk/web":{"types":"./dist/providers/clerk/web/index.d.ts","import":"./dist/providers/clerk/web/index.js"},"./providers/clerk/web/proxy":{"types":"./dist/providers/clerk/web/proxy-entry.d.ts","import":"./dist/providers/clerk/web/proxy-entry.js"},"./providers/clerk/web/client":{"types":"./dist/providers/clerk/web/client-index.d.ts","import":"./dist/providers/clerk/web/client-index.js"},"./providers/clerk/web/server":{"types":"./dist/providers/clerk/web/server.d.ts","import":"./dist/providers/clerk/web/server.js"}},"foundry":{"assessment":{"bin":"bouncer-rate-check","invocation":"single-json-input"}},"private":false,"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"node ../../scripts/check-name-collision.mjs . && npm run build"},"_npmUser":{"name":"thecalvinhung","email":"hello@clossys.com"},"repository":{"url":"git+https://github.com/clossys/foundry.git","type":"git","directory":"packages/bouncer"},"_npmVersion":"11.17.0","description":"The bouncer role: is this actor who they claim, and is what they are doing still inside what they were granted? Dependency-free machinery for a consumer's own authority records: a closed consumer-declared role hierarchy, a fail-closed session predicate, e","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.5","svix":"^1.96.0","react":"19.3.0","vitest":"^5.0.1","react-dom":"19.3.0","typescript":"~6.0.0","@types/node":"^26.5.1","@types/react":"^19.3.0","@clerk/nextjs":"7.9.4","@types/react-dom":"^19.3.0"},"peerDependencies":{"next":">=16 <17","svix":"^1.96.0","react":">=19 <20","react-dom":">=19 <20","@clerk/nextjs":">=7 <8"},"peerDependenciesMeta":{"next":{"optional":true},"svix":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true},"@clerk/nextjs":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/bouncer_0.1.10_1790150895307_0.3847736699008424","host":"s3://npm-registry-packages-npm-production"},"foundryReleaseVerification":{"next":{"proxySubpaths":["./providers/clerk/web/proxy"],"clientSubpaths":["./providers/clerk/web","./providers/clerk/web/client"],"serverSubpaths":["./providers/clerk/web/server"]}}},"0.2.0":{"_id":"@clossys/bouncer@0.2.0","bin":{"bouncer-check":"dist/cli.js","bouncer-rate-check":"dist/unreconciled-grant-rate-cli.js"},"bugs":{"url":"https://github.com/clossys/foundry/issues"},"dist":{"shasum":"7532a5c689328e292d8af1161ab53fe2c371c1fc","tarball":"https://registry.npmjs.org/@clossys/bouncer/-/bouncer-0.2.0.tgz","fileCount":219,"integrity":"sha512-E+5mtUIAb8xlUJfOmuc61D9Bqym5y/JKQ+5GhRuPWWu0SGjie6QuBvlYNVsv/ko6aHN/CMFdBtqkLXDCMUKslg==","signatures":[{"sig":"MEYCIQCKDAc393obHFF9gEZdrqj5H4vo/LZLlyF0g1KlmKJKzwIhAIc0Mx2Qmm4qtO3PU04fjNaUND/DfSQREhrRTA4LpJcQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHEDVs2cemEsD0jt1NhRTIErKVDCqYYBeOv4vg+wnPtqAiEAzp1Qdc3YN1XCKKvs6HubA5KRFn5j4lLWmQkVadF7EqI="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@clossys%2fbouncer@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":826633},"main":"./dist/index.js","name":"@clossys/bouncer","type":"module","types":"./dist/index.d.ts","author":{"name":"Clossys"},"module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./gate":{"types":"./dist/gate/index.d.ts","import":"./dist/gate/index.js"},"./agent":{"types":"./dist/agent/index.d.ts","import":"./dist/agent/index.js"},"./providers/clerk":{"types":"./dist/providers/clerk/index.d.ts","import":"./dist/providers/clerk/index.js"},"./providers/clerk/web":{"types":"./dist/providers/clerk/web/index.d.ts","import":"./dist/providers/clerk/web/index.js"},"./providers/clerk/web/proxy":{"types":"./dist/providers/clerk/web/proxy-entry.d.ts","import":"./dist/providers/clerk/web/proxy-entry.js"},"./providers/clerk/web/client":{"types":"./dist/providers/clerk/web/client-index.d.ts","import":"./dist/providers/clerk/web/client-index.js"},"./providers/clerk/web/server":{"types":"./dist/providers/clerk/web/server.d.ts","import":"./dist/providers/clerk/web/server.js"}},"foundry":{"assessment":{"bin":"bouncer-rate-check","invocation":"single-json-input"}},"license":"MIT","private":false,"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"node ../../scripts/check-name-collision.mjs . && npm run build"},"version":"0.2.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"25c9f070-e25c-4bed-9428-526936e29493"}},"homepage":"https://github.com/clossys/foundry/tree/main/packages/bouncer#readme","keywords":["authorization","identity","entitlement","delegation","reconciliation","gate","typescript"],"repository":{"url":"git+https://github.com/clossys/foundry.git","type":"git","directory":"packages/bouncer"},"_npmVersion":"11.17.0","description":"The bouncer role: is this actor who they claim, and is what they are doing still inside what they were granted? Dependency-free machinery for a consumer's own authority records: a closed consumer-declared role hierarchy, a fail-closed session predicate, e","directories":{},"maintainers":[{"name":"thecalvinhung","email":"hello@clossys.com"}],"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.6","svix":"^1.96.0","react":"19.3.0","vitest":"^5.0.1","react-dom":"19.3.0","typescript":"~6.0.0","@types/node":"^26.6.3","@types/react":"^19.3.0","@clerk/nextjs":"7.9.4","@types/react-dom":"^19.3.0"},"peerDependencies":{"next":">=16 <17","svix":"^1.96.0","react":">=19 <20","react-dom":">=19 <20","@clerk/nextjs":">=7 <8"},"peerDependenciesMeta":{"next":{"optional":true},"svix":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true},"@clerk/nextjs":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bouncer_0.2.0_1790913068769_0.35621763054841993"},"foundryReleaseVerification":{"next":{"proxySubpaths":["./providers/clerk/web/proxy"],"clientSubpaths":["./providers/clerk/web","./providers/clerk/web/client"],"serverSubpaths":["./providers/clerk/web/server"]}}}},"time":{"created":"2026-08-31T17:29:44.409Z","modified":"2026-10-02T03:51:09.205Z","0.1.1":"2026-08-31T17:29:44.747Z","0.1.2":"2026-09-01T13:29:22.938Z","0.1.3":"2026-09-03T17:36:19.837Z","0.1.7":"2026-09-17T02:06:09.884Z","0.1.8":"2026-09-19T06:31:31.269Z","0.1.9":"2026-09-20T03:48:18.354Z","0.1.10":"2026-09-23T08:08:15.464Z","0.2.0":"2026-10-02T03:51:08.873Z"},"bugs":{"url":"https://github.com/clossys/foundry/issues"},"author":{"name":"Clossys"},"license":"MIT","homepage":"https://github.com/clossys/foundry/tree/main/packages/bouncer#readme","keywords":["authorization","identity","entitlement","delegation","reconciliation","gate","typescript"],"repository":{"url":"git+https://github.com/clossys/foundry.git","type":"git","directory":"packages/bouncer"},"description":"The bouncer role: is this actor who they claim, and is what they are doing still inside what they were granted? Dependency-free machinery for a consumer's own authority records: a closed consumer-declared role hierarchy, a fail-closed session predicate, e","maintainers":[{"name":"thecalvinhung","email":"hello@clossys.com"}],"readme":"# @clossys/bouncer\n\n**Everything about who you are, what you can do, and how that changes over\ntime.**\n\nThe question this role answers, and no other role does:\n\n> **Is this actor who they claim, and is what they are doing still inside what\n> they were granted?**\n\n## The case this package exists for\n\nA weaker tool checks that a session exists.\n\nIt passes while the role behind that session was revoked upstream an hour ago.\nThe session is real. It is well-formed. It is not expired. Nothing local has\nchanged, so nothing local can notice — and the provider of record, which does\nknow, was never asked.\n\n**Presence of a session is not currency of a grant.** Every checker here is\nbuilt so that the only way to reach a clean answer is to have compared against\nthe provider and seen it answer. And when the provider cannot be reached, the\nanswer is neither \"yes\" nor \"no\": it is `unverifiable`, and the gate exits `2`.\n\n## The closed loop\n\n| Stage | Here |\n| --- | --- |\n| Setpoint | Declared authority — the grants live in your own system |\n| Act | A grant, or a denial |\n| Observation | Reconciliation against every provider of record |\n| Comparison | Drift between what is live and what is still backed |\n| Correction | Revoke, or re-assert |\n\nA package that only answers \"may they?\" at runtime, without ever reconciling,\nhas a setpoint and an act and nothing else — half a loop, and the missing half\nis the half that notices.\n\n**Gate count:** *unreconciled grant surface* — authority live here that no\nprovider still backs. `checkAuthorityReconciliation` counts it. That count is\n0 on an empty set and is not the charter metric.\n\n**Charter metric:** *unreconciled grant rate* — live grants not independently\nbacked by their current provider of record / all live grants evaluated.\n`assessUnreconciledGrantRate()` computes it.\n\n**Runtime verdict:** `authorized` / `denied` / `unverifiable`.\n\n## Install\n\n```sh\nnpm install @clossys/bouncer\n```\n\nThis package is published to the public npm registry, `https://registry.npmjs.org`.\nInstalling it needs no authentication: no npm token, no `.npmrc` registry\noverride, and no GitHub credential of any kind.\n\nNothing is required alongside it. This package declares **zero runtime\ndependencies** — only optional peers (`@clerk/nextjs`, `next`, `react`,\n`react-dom`, `svix`), each needed by exactly one subpath and installed only if\nyou import that subpath. The provider-neutral root, and `./agent`, need none of\nthem.\n\n## Unreconciled grant rate\n\nIndependent consumer evidence shows the position's owned metric meets its\nsetpoint over the declared review cadence. The owned metric is `unreconciled\ngrant rate`, computed by `assessUnreconciledGrantRate()`. An empty evaluated\nset is `indeterminate`, never a perfect rate of 0.\n`checkAuthorityReconciliation` still reports unreconciled grant surface as a\ncount; that count is not this rate. Unverifiable observations stay\nunevaluated and are never folded into the rate. Grant expiry is not this\nmetric. This package does not measure consumer evidence and does not close\nthe loop. A green run of this package's tests is not a close.\n\n```ts\nimport { assessUnreconciledGrantRate } from \"@clossys/bouncer\";\n\nconst report = assessUnreconciledGrantRate(input);\n```\n\n```bash\nbouncer-rate-check assessment.json\n```\n\nThe command prints JSON and exits `0` for satisfied, `1` for violated, and\n`2` for indeterminate, unreadable, or invalid input.\n\nThis package declares that command as its first-day assessment surface in\nits own manifest:\n\n```json\n\"foundry\": { \"assessment\": { \"bin\": \"bouncer-rate-check\", \"invocation\": \"single-json-input\" } }\n```\n\nOnboarding discovers that declaration from the installed manifest and never\ninfers a surface. `bouncer-check` remains the three-gate CLI and is not the\nassessment surface. Bouncer is not a required first-day role; Advisor\nremains the only required first-day assessment.\n\n## The three gates\n\nAll three are reachable from the single `bouncer-check` bin. The charter\nassessment is a second mapped bin, `bouncer-rate-check`, and is not a fourth\ngate on this dispatcher.\n\n```sh\nbouncer-check authority-reconciliation grants.json providers.json --at 2026-08-22T12:00:00.000Z\nbouncer-check delegation-ceiling actors.json\nbouncer-check provider-contract mappings.json shapes.json\n```\n\n### `authority-reconciliation`\n\nEvery live grant traces to a provider that still backs it. Fails when a grant\nis revoked upstream, is not backed by its provider of record at all, or has\npassed its own declared expiry.\n\n**Exits `2`, never `0`, when a provider could not be reached.** An unreachable\nprovider means the comparison did not happen, and the local view is exactly\nwhat must not be reported on its own. It is not a denial either: fold\n`unverifiable` into `denied` and a provider outage becomes a mass revocation;\nfold it into `authorized` and the same outage becomes a silent blanket grant.\n\nThe same precedence holds inside a single run: if some grants were found\nunreconciled *and* some providers were unreachable, the run reports\nindeterminate. The findings it did produce are still printed — it is the exit\ncode that refuses to call the list complete. When the surface is non-zero, the\nunreconciled line names its provider reference: the `providerId` of each\nfailing grant's provider of record, so a run spanning several owners' grants\nnames the failing side.\n\n### `delegation-ceiling`\n\nA machine actor with no declared spend ceiling is a finding, **never an\nunlimited default**.\n\n`monetaryLimitAmount` has three distinguishable states and the distinction is\nthe point:\n\n| Value | Meaning | Gate |\n| --- | --- | --- |\n| a number | a declared ceiling | clean, given a currency to read it in |\n| `null` | \"this actor has no monetary surface\" | a finding, unless the record also carries `\"unlimitedSpendIsDeclared\": true` |\n| absent | nobody decided | always a finding — there is no opt-out for a question nobody asked |\n\nAlso fails on: an amount with no currency, a currency with no amount, an actor\nnaming no responsible human, and an empty tool scope.\n\nThe runtime guard in `./agent` reads `null` as unlimited amount authority and\nproceeds. The two disagree on purpose, at different times, about different\nquestions. The runtime asks \"may this call proceed?\" — and there is nothing\nuseful to do at that moment with a number nobody declared except refuse every\nactor that has none, which would strand actors that legitimately have no\nmonetary surface. The gate asks \"did anybody ever decide what this actor may\nspend?\", and treats silence as a finding rather than as consent.\n\n### `provider-contract`\n\nThe adapter's mapping still matches the provider's declared shape. Checked in\nboth directions, because the two silences are different:\n\n- **adapter → provider** — a field read, or an event recognised, that the\n  provider no longer declares. The adapter is reading air.\n- **provider → adapter** — an event the provider declares and the adapter does\n  not recognise. The provider is talking to nobody.\n\nPlus the subtler one: a field the provider still declares, but only\n`\"sometimes\"`, against an adapter that fails without it — a mapping that works\nuntil the first payload that omits it.\n\nThis package never fetches a provider's live schema. A gate that needed network\naccess, credentials and a per-provider client could not run in the offline,\nhermetic position where a gate belongs. Transcribing the provider's declared\nshape is yours; keeping the transcription honest against the adapter is the\ngate's.\n\n### Exit codes\n\n`0` clean · `1` findings · `2` could not run.\n\n`2` is not a variant of failure. It covers a missing, unreadable, unparseable\nor schema-invalid record store; an empty record set; an unreachable or\nunobserved provider; a provider shape that was never supplied; and — a bare\n`bouncer-check` with **no gate selected at all**, which is a run that never\nhappened and prints its usage to stderr. An explicitly requested `--help` is\nthe one argument-shaped `0`: a help that was asked for did what was asked.\n\n## Site security-headers baseline\n\n`createSiteSecurityHeaders` builds the HTTP security-header baseline for a\nsite surface. One call returns `SiteSecurityHeadersVariants`: a `development`\nresult and a `production` result, both `SiteSecurityHeadersResult`. The\ncaller passes a `SiteSecurityHeadersInput` and applies the header map. This\npackage does not invent a package declaration.\n\nProduction script policy is one of two modes:\n\n| Mode | `script-src` | Result |\n| --- | --- | --- |\n| `nonce` | `'nonce-…'` and `'strict-dynamic'` | The policy has no `'unsafe-inline'`. `warnings` is empty. |\n| `static` | `'self'` and `'unsafe-inline'` | Emitted when the caller declares an attributed framework exception. The result reports that exception as a `SiteSecurityHeaderWarning`. |\n\nAn undeclared script `'unsafe-inline'` is a refusal, and that token is not in\nthe emitted policy. Production refuses `'unsafe-eval'`, `'wasm-unsafe-eval'`,\na scheme-only source (`http:`, `https:`, `ws:`, `wss:`), a source containing\n`*`, and a `data:` or `blob:` source on every extension directive. A caller\nsource string that contains whitespace or `;`, including at either end of the\nraw string before trimming, is refused. The result is\n`ok: false` with reason `refused-source`, and the refused token is absent\nfrom the emitted policy.\n\nThe development variant adds `'unsafe-eval'` to `script-src`. The production\nvariant from the same call does not contain it.\n\nA successful policy is a `SiteSecurityHeaders` map. Its\n`Content-Security-Policy` includes `object-src 'none'`, `base-uri 'self'`,\nand `frame-ancestors 'none'`. Style `'unsafe-inline'` is included when an\nattributed package declaration names the package on `styleDeclarations`. A\ndeclaration that does not name a package is refused.\n\n`Strict-Transport-Security` is `max-age=63072000; includeSubDomains`. The\nvalue does not contain `preload`.\n\n`Referrer-Policy` is `strict-origin-when-cross-origin`.\n\n`Permissions-Policy` is `camera=(), microphone=(), geolocation=(), payment=()`.\n\nA host source — one or more DNS labels of ASCII letters, digits, and `-`\n(a label may start or end with `-`), with an optional trailing dot,\n`host:port`, `host/path`, a scheme-less host, or a bracketed IPv6 address — is\nemitted only when the caller lists it on\n`extensions`. The same host in `scriptSources` is not copied into the policy.\nA style\ndeclaration source other than `'unsafe-inline'` is not copied into\n`style-src` unless that exact source is also on `extensions`.\n\n```ts\nimport { createSiteSecurityHeaders } from \"@clossys/bouncer\";\n\nconst variants = createSiteSecurityHeaders({\n  script: { mode: \"nonce\", nonce: \"exampleNonce\" },\n  extensions: [{ directive: \"frame-src\", source: \"https://video.example.test\" }],\n});\n\nif (variants.production.ok) {\n  variants.production.headers[\"Content-Security-Policy\"];\n  variants.production.headers[\"Strict-Transport-Security\"];\n  variants.production.headers[\"Referrer-Policy\"];\n  variants.production.headers[\"Permissions-Policy\"];\n}\n```\n\n## Gated-host responses\n\nA gated host answers the public with nothing, and says so the same way every\ntime. These helpers use Fetch globals only and import no framework or\nprovider.\n\n| Export | What it does |\n| --- | --- |\n| `applyGatedHostHeaders(response, options?)` | Sets, never appends, `X-Robots-Tag: noindex, nofollow` on `response.headers`. Sets `Cache-Control: no-store` for status 300-399, 401, 403 and 503, or when `options.noStore` is true (a sign-in page). Otherwise leaves `Cache-Control` alone |\n| `createRobotsTxtRoute()` | Returns `() => Response`: 200, `text/plain; charset=utf-8`, a deny-all body, and the robots tag |\n| `createHealthRoute()` | Returns `() => Response`: 200, `{\"status\":\"ok\"}`, `no-store`, and the robots tag. It takes no options and probes nothing |\n| `createServiceUnavailableResponse(options?)` | A 503 with `{\"error\":\"unavailable\"}`, `Retry-After` of `retryAfterSeconds` (default 30), `no-store`, and the robots tag. A negative or non-integer value throws `TypeError` |\n\n`/robots.txt` and `/health` must be public routes of the proxy that gates the\nhost. A 401 or a redirect there hides the deny-all rule and fails monitors.\n\n```ts\nimport { createHealthRoute } from \"@clossys/bouncer\";\n\nexport const GET = createHealthRoute();\n```\n\n## Gated-host gate\n\n`@clossys/bouncer/gate` is one opt-in gate for a host that serves nothing to\nthe public. It is framework-neutral: it takes a Fetch `Request` and a\npass-through renderer and always returns a `Response`. The identity provider\nis a seam (`resolvePrincipal`); the gate imports no provider and no framework.\nIts response headers come from the gated-host response helpers above and its\nreturn-URL rules from the redirect allowlist.\n\n| Request | Answer |\n| --- | --- |\n| Signed-out navigation: `Sec-Fetch-Mode: navigate`, `Accept: text/html` with a quality above zero, or a Next.js `RSC` header or `_rsc` parameter | `307` to `signInPath` with a relative `redirect_url` and `no-store`. Never a 301 or 308 |\n| Signed-out non-navigation, or any path under `apiPathPrefixes` (default `/api/`) | `401` `{\"error\":\"unauthorized\"}` with `WWW-Authenticate: Bearer resource_metadata=\"<origin>/.well-known/oauth-protected-resource\"` |\n| `/.well-known/oauth-protected-resource` | `200` with the RFC 9728 document built from `protectedResourceMetadata`, for `GET` and `HEAD`; `405` for any other method |\n| Signed in, `isPermitted` did not answer `true` | `307` to `notAuthorizedPath` for a navigation, `403` `{\"error\":\"forbidden\"}` otherwise. The not-authorized route itself is forced to `403` |\n| `signInPath` and its sub-routes, or a path `isPublicPath` approves | Passed to `next`. Sign-in is rendered with `providerUnavailable` set when the provider did not answer, and in production the response is `503` with `Retry-After` |\n| Provider throws, answers `null` or answers an unknown shape | Treated as unavailable. Gated routes fail closed exactly like signed-out; nothing answers 500 |\n| `next` throws or returns a non-`Response` | `503` with `Retry-After` |\n| A request URL that is not http(s) | `400` `{\"error\":\"bad_request\"}` |\n\nEvery response, including a pass-through, carries `X-Robots-Tag: noindex,\nnofollow`.\n\nThe gate is closed by construction:\n\n- Nothing is rendered before the decision. `next` runs only after the provider\n  has answered and, on a gated route, the permission check has returned `true`.\n  The exceptions are the sign-in routes and `isPublicPath` paths, which run\n  without a sign-in, and the not-authorized route, which renders for any\n  signed-in principal without the permission check (a signed-out visitor is\n  still sent to sign-in).\n- Every pass-through to a gated route (a permitted principal, the sign-in\n  routes and the not-authorized route) is `Cache-Control: private, no-store`\n  and `Vary: Cookie, Authorization`, whatever `next` returned: a `public` or\n  `s-maxage` value is replaced and any existing `Vary` value is kept. A path\n  `isPublicPath` approves is left as `next` rendered it. CDN-specific cache\n  headers (every `CDN-Cache-Control` variant, such as\n  `Vercel-CDN-Cache-Control`, and `Surrogate-Control`) are removed from those\n  gated responses too. A shared cache or CDN therefore cannot keep a protected\n  page and serve it to a signed-out visitor. The header guarantee holds only\n  for the response `next` returns to the gate; a framework that rewrites cache\n  headers after the proxy runs is outside it. The downstream router must route\n  on the same `Request` URL the gate saw.\n- `isPermitted` is required and only the answer `true` permits; a throw or any\n  other answer denies. There is no permit-everyone default.\n- Every absolute URL in a response comes from `origin`, `siblingOrigins` and\n  `protectedResourceMetadata`. The request's host and headers are never read\n  into a response, and error bodies and construction errors are fixed strings\n  that do not quote a configured value.\n- A path with an encoded slash, backslash, dot, percent sign, null or\n  semicolon, a literal semicolon, a doubled slash or a non-ASCII character\n  (percent-encoded as `%80` and above) is ambiguous. It is never passed\n  through as a sign-in sub-route or a public path, so it is gated like any\n  other path.\n- `signInPath`, `notAuthorizedPath` and each `apiPathPrefixes` entry must be\n  plain same-host paths, and the two routes must differ and not overlap the\n  metadata path. `signInPath` and `notAuthorizedPath` must not be, or sit\n  under, `/api`, `/_next` or an `apiPathPrefixes` entry, because a sign-in\n  route is passed to `next` without a sign-in. Otherwise construction throws\n  `TypeError`.\n- A signed-out navigation whose `Location` would pass 2048 characters returns\n  to `/` after sign-in instead of the long path and query.\n\nThe `403` and `503` are set on the response `next` returns, so they apply only\nwhen `next` returns the final response. Under a Next.js proxy,\n`NextResponse.next()` or a rewrite can discard that status: the not-authorized\npage must return its own `403` (for example with `forbidden()`) and the sign-in\npage its own `503`, or `next` must render the page itself.\n\nThe not-authorized route is matched exactly. With `trailingSlash: true` in the\nNext.js config, a request for `/not-authorized/` is a different path to the\ngate, so the caller must handle the trailing-slash form of `notAuthorizedPath`\nitself, before calling the gate; the gate does not match it.\n\nThe sign-in page must run its incoming `redirect_url` through\n`createReturnUrlResolver`, which accepts a relative path on `origin` or an\nabsolute URL on one of `siblingOrigins` and falls back to `/` for everything\nelse. The gate builds only relative return URLs, so `siblingOrigins` matters\non the sign-in page.\n\n```ts\nimport { createGatedHostGate, createReturnUrlResolver } from \"@clossys/bouncer/gate\";\n\nconst origin = \"https://admin.example.test\";\nconst siblingOrigins = [\"https://app.example.test\"];\n\nconst gate = createGatedHostGate<{ readonly roles: readonly string[] }>({\n  origin,\n  signInPath: \"/sign-in\",\n  notAuthorizedPath: \"/not-authorized\",\n  siblingOrigins,\n  protectedResourceMetadata: { authorization_servers: [\"https://idp.example.test\"] },\n  resolvePrincipal: async () => ({ state: \"signed-out\" }),\n  isPermitted: (principal) => principal.roles.includes(\"admin\"),\n  isPublicPath: (pathname) => pathname === \"/robots.txt\" || pathname === \"/health\",\n});\n\nexport const resolveReturn = createReturnUrlResolver({ origin, siblingOrigins });\n\nexport function proxy(request: Request): Promise<Response> {\n  return gate(request, () => new Response(\"page\"));\n}\n```\n\n## Sign-in failure classes\n\nA sign-in provider's error text can reveal whether an account exists.\n`classifySignInFailure` reads a failure down to one of seven classes, and\n`signInFailureCopyId` maps a class to a Writer front-door copy id. The output\nis a class or an id and never provider text, so a host shows the copy it owns.\nBoth are pure and never throw.\n\n| Class | Copy id |\n| --- | --- |\n| `credential` | `front-door.password.notice`, or `front-door.code.notice` with `{ factor: \"code\" }` |\n| `notFound` | `front-door.identifier-not-found.notice` |\n| `rateLimited` | `front-door.rate-limited.notice` |\n| `locked` | `front-door.locked.notice` |\n| `network`, `unavailable`, `unknown` | `front-door.unavailable.notice` |\n\n`SIGN_IN_FAILURE_CLASSES` lists the seven in that order. The rules, in order:\n\n1. A failure that is not an object is `unknown`.\n2. Each `errors[i].code` in turn (the first 16 entries), then `code`: the first one that is an own key\n   of `options.codes` wins. A name such as `toString` is never a match.\n3. Otherwise status 429 is `rateLimited`, 423 is `locked`, and 500-599 is\n   `unavailable`.\n4. Anything else is `unknown`, and so is a failure that throws when read. A 404\n   is `unknown`: `notFound` comes only from a provider code.\n\n`hideAccountExistence: true` reads `notFound` as `credential` and `locked` as\n`rateLimited`, which changes the copy the page shows and nothing else. It does\nnot stop a visitor learning whether an account exists: some codes, such as\n`strategy_for_user_invalid`, `user_banned` and `form_password_pwned` or\n`form_password_compromised`, still read as `unknown` while an unknown account\nreads `credential`, and the raw Clerk code stays visible in the browser's\ndevtools. For that guarantee, use Clerk's own enumeration protection. The\ndefault keeps `notFound`.\n\nThe Clerk table, `CLERK_SIGN_IN_FAILURE_CODES`, ships from\n`./providers/clerk/web` and `./providers/clerk/web/client`. It holds\n`form_password_incorrect`, `form_password_or_identifier_incorrect` (the code\nClerk sends with enumeration protection on) and `form_code_incorrect`\n(`credential`), `form_identifier_not_found` (`notFound`), `user_locked`\n(`locked`) and `clerk_offline` (`network`), each checked against the installed\nClerk packages. Clerk codes not in it read as\n`unknown`, or by status when one is set. `humaniseClerkError` returns the\nprovider's own text, which can name an account; use this path where that text\nmust not reach the page.\n\nPass the Clerk table as `codes`:\n\n```ts\nimport { classifySignInFailure, signInFailureCopyId } from \"@clossys/bouncer\";\nimport type { SignInFailureCodeTable } from \"@clossys/bouncer\";\n\n// `codes` is CLERK_SIGN_IN_FAILURE_CODES for a Clerk sign-in.\nexport function copyIdForSignInError(error: unknown, codes: SignInFailureCodeTable) {\n  const failureClass = classifySignInFailure(error, { codes, hideAccountExistence: true });\n  return signInFailureCopyId(failureClass, { factor: \"password\" });\n}\n```\n\n## Front-door conformance\n\n`checkFrontDoorHttp` runs a host's handler through cookie-less GET requests\nand returns every way its responses break the gated-host rules, so a host that\ndrifts fails in its own test. The expected values come from the helpers above\nand from the production variant of `createSiteSecurityHeaders`. It uses Fetch\nglobals only and calls the handler in process: no test runner, browser,\nframework or network call. A handler that throws is a `handler-threw`\nviolation, never a throw.\n\n| Rule | Checked on |\n| --- | --- |\n| `robots-tag` | Every response: `X-Robots-Tag` is the gated-host robots tag |\n| `no-store` | Sign-in, boundary and 503 responses: `Cache-Control` carries the `no-store` directive |\n| `sign-in-status` | A sign-in path answers a status below 400 |\n| `boundary-status` | A boundary path answers 301, 302, 303, 307 or 308 with a `Location`, or 401 or 403 |\n| `security-headers` | Sign-in responses: `Strict-Transport-Security`, `Referrer-Policy` and `Permissions-Policy` equal the production baseline, and `Content-Security-Policy` is non-empty |\n| `robots-txt` | The robots path answers 200 with the deny-all body |\n| `health` | The health path answers with the status and body of `createHealthRoute()()`, with no redirect |\n| `service-unavailable` | Your `serviceUnavailable` response is a 503 with a non-negative integer `Retry-After` and the body of `createServiceUnavailableResponse()` |\n| `handler-threw` | The handler or `serviceUnavailable` threw or rejected |\n\n`robotsPath` defaults to `/robots.txt` and `healthPath` to `/health`. A\nredirect is read as returned, never followed. `origin` must be an absolute URL,\nor the call rejects with `TypeError`.\n\n```ts\nimport { assertFrontDoorHttp, createServiceUnavailableResponse } from \"@clossys/bouncer\";\n\n// `handle` is your host's request handler, for example your framework's fetch entry.\nexport async function frontDoorConforms(handle: (request: Request) => Response | Promise<Response>) {\n  await assertFrontDoorHttp(\n    {\n      origin: \"https://app.example\",\n      signInPaths: [\"/sign-in\"],\n      boundaryPaths: [\"/dashboard\"],\n      serviceUnavailable: () => createServiceUnavailableResponse(),\n    },\n    handle,\n  );\n}\n```\n\n## Exports\n\n### Root — `@clossys/bouncer`\n\nProvider-neutral. Nothing reachable from here imports a vendor SDK, a\nframework, or React.\n\n#### Authority records and their validators\n\n| Export | What it is |\n| --- | --- |\n| `Grant` | One authority live in your own system: `grantId`, `actorId`, `subjectId`, `providerId`, `authority`, `grantedAt`, optional `expiresAt` and `sessionId` |\n| `ProviderAssertion` | One observation of one provider of record, carrying `reachability` as its own field |\n| `BackedAuthority` | One authority a provider still (or no longer) stands behind |\n| `BackedAuthorityStatus` | `\"active\"` \\| `\"revoked\"` |\n| `ProviderReachability` | `\"reachable\"` \\| `\"unreachable\"` |\n| `DelegatedActor` | A delegated machine actor and its declared ceiling |\n| `AdapterMapping` / `MappedField` | What an adapter reads and which events it recognises |\n| `ProviderShape` / `DeclaredField` / `FieldPresence` | The provider's own declared shape, as you transcribed it |\n| `BACKED_AUTHORITY_STATUSES`, `PROVIDER_REACHABILITIES`, `FIELD_PRESENCES` | The closed vocabularies, exported so a consumer can enumerate rather than restate them |\n| `validateGrant` / `validateGrants` | Hand-rolled validators over `unknown`. Never throw |\n| `validateProviderAssertion` / `validateProviderAssertions` | As above, for provider observations |\n| `validateDelegatedActor` / `validateDelegatedActors` | As above, for machine actors |\n| `validateAdapterMapping` / `validateAdapterMappings` | As above, for adapter mappings |\n| `validateProviderShape` / `validateProviderShapes` | As above, for declared provider shapes |\n| `isGrant`, `isProviderAssertion`, `isDelegatedActor` | Type guards over the same readers |\n| `ValidationIssue`, `ValidationResult`, `Validator` | The shared validation result shape |\n\n#### The verdict and the gates\n\n| Export | What it is |\n| --- | --- |\n| `evaluateGrant` | One live grant against one provider observation. Returns `AuthorityDecision` |\n| `AuthorityDecision` | `authorized` \\| `denied` \\| `unverifiable`, each naming the actor, the subject and the provider |\n| `AuthorityDenialReason` | `revoked-upstream` \\| `not-backed` \\| `grant-expired` |\n| `AuthorityUnverifiableReason` | `provider-unreachable` \\| `provider-not-observed` \\| `provider-mismatch` \\| `unreadable-clock` |\n| `checkAuthorityReconciliation` | Gate 1. Returns `AuthorityReconciliationResult`, carrying the unreconciled grant surface |\n| `AuthorityReconciliationResult`, `ReconciliationFinding`, `ReconciliationFindingKind`, `ReconciliationFailureReason` | Its result shape |\n| `assessUnreconciledGrantRate` | Charter close metric. Returns `UnreconciledGrantRateAssessment` from consumer-supplied independent observations. Not `checkAuthorityReconciliation`. |\n| `UnreconciledGrantRateAssessment`, `UnreconciledGrantRateFinding`, `UnreconciledGrantRateState` | Its result shape |\n| `checkDelegationCeiling` | Gate 2. Returns `DelegationCeilingResult` |\n| `DelegationCeilingResult`, `DelegationFinding`, `DelegationFindingKind`, `DelegationFailureReason` | Its result shape |\n| `checkProviderContract` | Gate 3. Returns `ProviderContractResult` |\n| `ProviderContractResult`, `ProviderContractFinding`, `ProviderContractFindingKind`, `ProviderContractFailureReason` | Its result shape |\n\nEvery checker is pure: no I/O, no clock read, no ambient state. The instant to\njudge against is a parameter, so the same inputs always produce the same\nanswer.\n\n#### Runtime primitives\n\n| Export | What it is |\n| --- | --- |\n| `defineRoleHierarchy` | Creates a closed, least-to-most-privileged hierarchy from your own role names. Rejects duplicates and blanks |\n| `RoleHierarchy`, `Viewer` | Its types |\n| `getRoleRank`, `isKnownRole`, `hasRoleAtLeast` | Rank lookups that fail closed for a role the hierarchy does not know |\n| `resolveViewerRole`, `viewerHasAccess` | A viewer's configured role, never an unknown provider-supplied value |\n| `isAuthorized` | Runs your predicate, denying missing, invalid, expired and throwing sessions before it is ever called |\n| `Session`, `SessionResolver`, `AuthorizationPredicate` | Its types |\n| `reconcileExternalMembership` | Idempotent, ordered reconciliation of provider membership events against your own store |\n| `ExternalMembership`, `ExternalMembershipCreateInput`, `ExternalMembershipEvent`, `ExternalMembershipEventClaim`, `ExternalMembershipEventCursor`, `ExternalMembershipIdentity`, `ExternalMembershipReconciliationResult`, `ExternalMembershipRepository`, `ReconcileExternalMembershipCommand` | Its ports and result types |\n| `QueryAdapter`, `TransactionalQueryAdapter`, `WithTransactionQueryAdapter` | The host-supplied storage seam. Statements and result shapes stay yours |\n| `isQueryAdapter`, `isTransactionalQueryAdapter`, `requireTransactionalQueryAdapter` | Its guards, normalising a `withTransaction` pool without replacing its scoped query |\n| `createAllowedOriginPolicy`, `isAllowedOrigin`, `resolveSafeRedirect` | A strict redirect allowlist. Every rejection returns `undefined` rather than a caller-controlled fallback |\n| `AllowedOriginPolicy` | Its type |\n| `createSiteSecurityHeaders` | Site security-headers baseline. One call returns the development variant and the production variant |\n| `SiteSecurityHeadersInput`, `SiteSecurityHeadersVariants`, `SiteSecurityHeadersResult`, `SiteSecurityHeaders`, `SiteSecurityHeaderWarning` | Its input, the two variants, the acceptance-or-refusal result, the header map, and the static-mode warning |\n| `GATED_HOST_ROBOTS_TAG`, `GATED_HOST_ROBOTS_TXT` | The robots tag value and the deny-all `robots.txt` body of a gated host |\n| `applyGatedHostHeaders`, `createRobotsTxtRoute`, `createHealthRoute`, `createServiceUnavailableResponse` | Gated-host response helpers: robots tag, `no-store`, deny-all `robots.txt`, `/health`, and a 503 with `Retry-After` |\n| `GatedHostHeaderOptions`, `ServiceUnavailableOptions` | Their option types |\n| `SIGN_IN_FAILURE_CLASSES`, `classifySignInFailure`, `signInFailureCopyId` | Sign-in failure classes and their Writer copy ids. Never provider text |\n| `SignInFailureClass`, `SignInFailureShape`, `SignInFailureCodeTable`, `SignInFailureCopyId`, `ClassifySignInFailureOptions`, `SignInFailureCopyIdOptions` | Their types |\n| `checkFrontDoorHttp`, `assertFrontDoorHttp` | Front-door conformance kit, HTTP half: runs a handler through cookie-less GET requests and returns, or throws, every violation of the gated-host rules |\n| `FrontDoorHttpConfig`, `FrontDoorViolation`, `FrontDoorRule` | Its config, one violation, and the rule names |\n\n### `./agent`\n\nDelegated machine-actor authority. Provider-neutral, framework-neutral, and the\nsubpath `delegation-ceiling` reads records for.\n\n`assertAgentCanCall`, `assertAgentMonetaryAuthority`,\n`describeAgentLifecycleState`, `isAgentContextActive`,\n`AgentAuthorizationError`, and the types `GenericAgentContext`,\n`AgentLifecycleState`, `AgentAuthorizationFailureReason`,\n`BaseAgentAuditRecord`, `IsoDateTime`.\n\n### `./gate`\n\nOne opt-in gate contract for gated application hosts. Framework-neutral and\nprovider-neutral; see \"Gated-host gate\" above for its behavior.\n\n`createGatedHostGate`, `createReturnUrlResolver`, `isNavigationRequest`,\n`PROTECTED_RESOURCE_METADATA_PATH`, and the types `GatedHostGate`,\n`GatedHostGateOptions`, `GatedHostNext`, `GatePrincipalState`,\n`ProtectedResourceMetadata`, `ReturnUrlResolverOptions`.\n\n### `./providers/clerk` and its subpaths\n\nEvery provider adapter is isolated behind its own subpath, and the root never\nimports one. The Clerk adapter ships as `./providers/clerk` (event mapping and\nwebhook verification) plus `./providers/clerk/web`,\n`./providers/clerk/web/client`, `./providers/clerk/web/server`, and\n`./providers/clerk/web/proxy`, split so importing the edge-safe proxy entry\nnever pulls `next/headers`, `next/navigation`, React, or client components.\n\n#### Webhook verification contract\n\n`verifyClerkWebhook` and `verifyAndMapClerkWebhook` check in a fixed order:\nsigning secret, then headers, then signature, then JSON parse, then event\nshape. Each refusal throws `ClerkWebhookSignatureError` with a `code`; the\ncode is the vocabulary, and the status is what a route handler should answer:\n\n| `code` | Stage | Status |\n| --- | --- | --- |\n| `signing-secret-invalid` | signing secret | 503 |\n| `signature-headers-missing` | headers | 400 |\n| `signature-invalid` | signature | 401 |\n| `payload-invalid` | parse or shape | 400 |\n\n`signing-secret-invalid` is a server misconfiguration, not a bad delivery, so\nit is a 503 and is raised before the body or headers are looked at. The\nmessages are fixed text: no error carries the secret, a header value, or any\nbody text, and none sets a `cause`. `payload-invalid` means the signature\nmatched but the body is not JSON or is not a plain object (a signed `null`,\narray or scalar); an unsigned body is always `signature-invalid`. Any other\nthrow is not part of this contract: let it reach the route's own 500\n`internal_error` response rather than mapping it to one of these codes.\n\n`assertClerkWebhookSigningSecret(signingSecret)` is exported so a route can\ncheck its configured secret at startup or per request. A string is trimmed\nonce, may start with the optional prefix, and the rest must be strict base64\ndecoding to at least 16 bytes; a `Uint8Array` must be at least 16 bytes.\nCall the guard before reading the body, so a misconfigured secret answers 503\nwithout consuming the request.\n\n`./providers/clerk` (guards `svix`) and `./providers/clerk/web/server`\n(guards both `@clerk/nextjs` and `next`) each guard every optional peer they\nimport with `assertPeerVersion`, evaluated once at import time, checking the\ninstalled version against this package's declared range.\n`./providers/clerk/web` and its `/client` subpath guard `react` the same\nway, but do NOT range-check `@clerk/nextjs`: that peer's own `exports` map\ndeclares no `./package.json` subpath and its public surface exports no\nversion constant of any kind, so there is no signal a browser-safe module\ncan read without `node:fs` (which cannot resolve in a browser bundle at\nall). `./providers/clerk/web/proxy` guards `next` the same way `server`\ndoes — `next` declares no `exports` field at all, so its `package.json` is\nreadable as an ordinary JSON import, with no `node:fs` involved — but for\nthe identical reason, does not range-check `@clerk/nextjs` either: an Edge\nMiddleware bundle has no filesystem, the same constraint as the browser\nside. See `client.tsx`'s and `proxy.ts`'s own doc comments for the exact,\nchecked shape of this — every subpath either range-guards a peer it\nimports or is a named, tested exception, confirmed by this package's own\ninternal build-graph coverage test (not part of the published package);\nnothing is silently uncovered.\n\nEvery entry point still guards each optional peer's PRESENCE, range-checked\nor not: the unconditional import throws Node's own named\n`ERR_MODULE_NOT_FOUND` if the peer is not installed at all, before this\npackage's own code ever runs — that case never reaches `assertPeerVersion`'s\nown \"not installed\" message, because every call site sits behind a static\nESM import, and an absent package fails module resolution first. What `assertPeerVersion` covers, where it runs, is\nspecifically the installed-but-incompatible case: a version that resolves\nbut falls outside this package's declared range gets a named, actionable\nerror instead of whatever the peer's own call surface happened to crash on.\nAn installed version this guard cannot parse at all is treated as\nindeterminate and warns rather than blocking a build.\n\n## One-way, for public consumption\n\nNo values, roles, tiers, ceilings, currencies, providers or policies of ours\nappear anywhere in this package. There is no role vocabulary, no entitlement\ncatalogue, and no jurisdiction logic. Every declaration is authored by the\nconsumer.\n\nActor and subject stay separate identifiers in every signature, and neither is\never derived from the other: an operator acting on their own account and an\noperator acting on somebody else's are different events with different\nconsequences, and one conflated identifier makes them indistinguishable\nforever — after the fact, in the only record anyone will still have.\n\nStorage and audit are host-supplied ports. This package writes nothing, stores\nnothing, and commits no person-attributable record anywhere.\n\n**Ships the schema and the checkers; every consumer authors its own values.**\n\n## Changelog\n\nRelease notes for every version are in the [changelog](https://github.com/clossys/foundry/blob/main/docs/changelogs/bouncer.md), kept in the public repository rather than in the installed package.\n","readmeFilename":"README.md"}