nomsentry
v1.1.1
Published
Deterministic identifier policy and deception detection engine
Maintainers
Readme
Nomsentry
Deterministic identifier policy and deception detection engine.
Nomsentry evaluates identifiers like usernames, tenant slugs, and tenant names against a compiled ruleset and returns:
allowreviewreject
It is designed for signup, workspace creation, and naming workflows where impersonation, reserved technical names, profanity, and brand-risk signals should be handled consistently.
Install
npm install nomsentryRequires Node.js >=20.
CLI quick start
npx nomsentry check support
npx nomsentry explain "example value"Typical output:
checkprints one ofallow,review,rejectexplainprints JSON with matched rules and reasons
Optional explicit kind:
npx nomsentry check support --kind defaultLibrary quick start
import {
createEngine,
loadRuntimeBundle,
defaultKind,
defaultPolicy,
} from "nomsentry";
const bundle = loadRuntimeBundle();
const engine = createEngine({
sources: [bundle],
policies: [defaultPolicy],
});
const result = engine.evaluate({ value: "support" });
console.log(result.decision);defaultPolicy is one strict baseline policy for the single defaultKind.
Meaning:
- technical/reserved, impersonation, profanity-like, and composite risk hits ->
reject - protected brand hits ->
review - mixed-script/script risk ->
review
defaultKind is exported for explicit calls when needed:
engine.evaluate({ kind: defaultKind, value: "support" });Use check for a final decision and explain when you need matched reasons for logs or moderation tooling.
Runtime artifacts
dist/runtime-sources.json.br: compiled runtime bundle (default)dist/build-manifest.json: machine-readable provenance manifest
Full documentation
The npm README is intentionally short. Full project documentation is maintained in GitHub:
- Repository: https://github.com/svenschaefer/nomsentry
- Docs index: https://github.com/svenschaefer/nomsentry/tree/main/docs
- Third-party notices: https://github.com/svenschaefer/nomsentry/blob/main/THIRD_PARTY_NOTICES.md
- Security policy: https://github.com/svenschaefer/nomsentry/blob/main/SECURITY.md
