ausus / entity-engine
AUSUS Entity Engine (L1) — content-addressed compile pipeline (Canonicalizer semantic normal form, Hasher, ClosureValidator) plus the bind/runtime half. EE-RFC-011 / EE-RFC-012.
v2.0.0
2026-06-27 17:55 UTC
Requires
- php: >=8.3
- ausus/kernel: ^2.0
README
AUSUS 2.0 — Entity Engine (L1). The two halves of EE-RFC-011: the
content-addressed compile pipeline (Canonicalizer → Hasher → ClosureValidator
→ EntitySchema) and the runtime (bind → RuntimeEntity, with fail-closed
authorization). Same semantics ⇒ same hash; binding never recompiles.
Installation
composer require ausus/entity-engine:^2.0
Dependencies
- PHP 8.3+
ausus/kernel
Public surface
Ausus\Engine\Compile\Compiler—compile(EntityDefinition[]): CompiledGraph(EntitySchema[]+SchemaIndex); atomic, any error produces nothing.Ausus\Engine\Compile\{Canonicalizer, Hasher, ClosureValidator}— semantic normal form, SHA-256 content hash, the 16 closure invariants.Ausus\Engine\Runtime\DefaultEntityEngine—bind(EntitySchema, PersistenceDriver): RuntimeEntity.Ausus\Engine\Runtime\DefaultAuthorizationEvaluator— fail-closed evaluation of the embeddedExpression.
Minimal example
<?php use Ausus\Engine\Runtime\DefaultEntityEngine; use Ausus\Engine\Runtime\DefaultAuthorizationEvaluator; $engine = new DefaultEntityEngine(new DefaultAuthorizationEvaluator(), $repository); $runtime = $engine->bind($repository->resolve('customer'), $driver); $runtime->invoke('create', ['name' => 'Globex'], $context);
Documentation
See the canonical reference docs/v2/ and the
Quick Start.