All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Removed deprecated
asyncConditionsengine option — async conditions are detected at runtime; useevaluateAsync(),explainAsync(), orpermittedAsync()when rules contain promise-returning conditions
- API stability policy (docs/introduction/api-stability.md)
- Upgrading guide (docs/getting-started/upgrading.md)
- Express and Fastify middleware test suites (12 tests)
- Example policy tests in
examples/express-multi-tenant/policies.test.ts - GitHub issue templates for bugs and feature requests
- Coverage thresholds in Vitest config (85% lines/branches, 90% functions)
- Non-blocking benchmark job in CI
- SECURITY.md supported versions updated for 1.x and 0.4.x
- CONTRIBUTING.md release checklist added
- README links to API stability and upgrading docs
- Documentation hub: removed redundant meta prose about doc structure
- Documentation site under
docs/— introduction, concepts, guides, patterns, comparisons, and API reference - VitePress build with local search, sidebar navigation, and home page
- GitHub Pages deployment workflow (
.github/workflows/docs.yml) — published at vegtelenseg.github.io/sentinel npm run docs:dev,docs:build, anddocs:previewscripts- README badges for documentation and docs deploy status
- README reworked as a landing page linking to the full docs site
package.jsonhomepageset to the documentation URL (was playground-only)
- README and CHANGELOG in published package now match 0.4.0 release notes (docs were updated after initial 0.4.0 publish)
- Runtime detection for async conditions —
evaluate()andexplain()throw a clear error when they encounter an async condition, guiding you to useevaluateAsync()orexplainAsync()instead of failing silently evaluateAsync()andexplainAsync()now work without theasyncConditionsflag — no opt-in required
asyncConditionsengine option — will be removed in v2. Async conditions are now detected automatically; use the*Asyncmethods when you have async conditions.
- Silent deny when async conditions were used with sync APIs without the
asyncConditionsflag — now throws with a helpful error message
- Hono middleware (
@siremzam/sentinel/middleware/hono) withhonoGuard()factory - Tests for Hono middleware (6 tests: allow, deny, 401, custom onDenied, tenantId/resourceContext, engine error)
- README rewrite: badges, table of contents, "What's New" callout, prominent playground link
- "How Evaluation Works" section with step-by-step algorithm walkthrough
- Concepts glossary for authorization newcomers (collapsible)
- "Patterns & Recipes" section with 6 real-world scenarios (ownership, time-gated access, feature flags, async quota checks, broad deny overrides, IP-based restrictions)
- "Testing Your Policies" section showing
explain()in vitest - Migration guide from CASL, Casbin, and accesscontrol
- "When NOT to Use This" section with honest boundary-setting
- Performance section with real benchmark numbers
- Standalone example (
examples/standalone/) — single-file, no HTTP server
- Features restructured into Core / Observability / Integration / Performance tiers
- Server Mode section expanded with polyglot use-case framing
{} as MySchemapattern explained in Quick Startschemaoption description updated in API Reference
- CommonJS build output alongside ESM for wider compatibility
- ESLint flat config with typescript-eslint
- Automated npm publish workflow with provenance
.npmrcwithaccess=publicfor scoped package
"require"and"default"conditions added to all package.json exports- CI now runs lint checks
- Coverage results uploaded as CI artifacts
- Build tool switched from tsc to tsup for dual ESM/CJS output
- Benchmark suite (
benchmarks/run.ts) covering 100, 1,000, and 10,000 rule scenarios - Comparison table vs Casbin, accesscontrol, and CASL in README
- Security policy (SECURITY.md)
- Contributing guide (CONTRIBUTING.md)
- GitHub Actions CI workflow
- Minimal example app (
examples/express-multi-tenant)
- README rewritten for clarity: quick start, comparison, security section, philosophy
- Package version bumped to 0.3.0 for first public release
createPolicyFactory<S>()— schema-boundallow()anddeny()without generic noiseengine.permitted()andengine.permittedAsync()— "what can this user do?" for UI renderingengine.explain()andengine.explainAsync()— full evaluation trace for debuggingtoAuditEntry()— converts Decision to serialization-safe AuditEntryonConditionErrorcallback — surfaces silent condition failuresstrictTenancymode — throws if tenantId omitted for tenant-scoped subjects- Pre-compiled wildcard action regexes at
addRule()time - Server authentication hook (
authenticatecallback) - Server body size limit (
maxBodyBytes, default 1 MB) - Import validation for
effectfield inimportRules()
- Cache only stores evaluations of unconditional rules (prevents stale cache with resourceContext)
- Rules frozen with
Object.freezeon add (prevents post-insertion mutation)
- Core
AccessEnginewith synchronous and asynchronous evaluation - Fluent
RuleBuilderwith.roles(),.actions(),.on(),.when(),.priority() RoleHierarchywith cycle detection- LRU evaluation cache (conditional rules excluded)
- JSON policy serialization with
ConditionRegistry - HTTP authorization server (
createAuthServer) on Node built-inhttp - Express, Fastify, and NestJS middleware
- Fluent check API:
engine.can(user).perform(action).on(resource) onDecisionobservability hook- Multi-tenant role resolution
- Wildcard action patterns (
invoice:*,*:read) - Zero runtime dependencies