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.

Maintainers

Package info

github.com/adonko3xBitters/entity-engine

pkg:composer/ausus/entity-engine

Statistics

Installs: 8

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.0 2026-06-27 17:55 UTC

This package is auto-updated.

Last update: 2026-06-29 03:22:01 UTC


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 (bindRuntimeEntity, 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\Compilercompile(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\DefaultEntityEnginebind(EntitySchema, PersistenceDriver): RuntimeEntity.
  • Ausus\Engine\Runtime\DefaultAuthorizationEvaluator — fail-closed evaluation of the embedded Expression.

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.