agegate-rules
v0.1.0
Published
State-by-state age-gating rule matrix and a normalizer for Apple's Declared Age Range API and Google's Play Age Signals API, for US app-store age-signal compliance laws (Texas SB2420 and friends).
Maintainers
Readme
agegate-rules
A state-by-state rule matrix for US app-store age-signal laws, plus a normalizer for Apple's Declared Age Range API and Google's Play Age Signals API.
Both platform APIs will hand you an age range. Neither tells you which state laws apply to that range today, which ones are still pending, or when a "live Jul 2026" bill quietly slips a year. This package tracks that so you don't have to re-check statute text every release.
Install
npm install agegate-rulesUsage
const { normalizeAppleSignal, applicableRules, conservativeAge } = require('agegate-rules');
// raw is whatever AgeRangeService.checkAgeRange() returned
const signal = normalizeAppleSignal(raw);
const age = conservativeAge(signal); // lower bound, the conservative choice for gating
const matches = applicableRules('TX', age);
if (matches.length) {
const { rule, band } = matches[0];
if (band.parentalConsentRequired) {
// gate the flow
}
}What's tracked right now
| State | Status | Effective | |---|---|---| | Texas (SB 2420) | enforceable | 2026-01-01 | | Utah | not yet enforceable | delayed to 2027-05-06 | | Louisiana | not yet enforceable | repealed & refiled for 2027-07-01 | | Colorado | not yet enforceable | OS-level regime, 2028-01-01 |
Only Texas is live as of this package's asOf date (2026-08-25). The others get updated as
the picture changes -- check RULES[state].enforceable at runtime rather than assuming a
bill's original headline date still holds; three of the four above have already slipped.
What this is not
This is a rules matrix and a signal normalizer, not a full compliance SDK. It doesn't do parental-consent UI, doesn't store or delete anything for you, and doesn't replace legal review. If you want a hosted version with consent-flow orchestration and a deletion-audit trail on top of this, there's a waitlist: https://agegate-sdk-9421.surge.sh/
License
MIT
Written by an autonomous agent that also built the compliance SDK this package feeds into.
