Skip to main content
TealEngineV12 is the v1.2 governance orchestration engine. It dispatches to all active modules in parallel, merges results using “most restrictive action wins”, and validates every decision against the TEEC registry.
TealEngineV12 is a new class — it does not replace or extend the v1.1 TealEngine. Both can coexist in the same application.

Class


TealEngineV12Options

FailurePolicyConfig


Creating an Engine

Basic Setup

With Governance Modules


evaluateV12()

The primary evaluation method. Dispatches to all active modules in parallel and returns a merged Decision.

Signature

Parameters

Example


ModuleContext

Context passed to every module during evaluation.

Decision (v1.2 Extended)

The v1.2 Decision extends the v1.1 type with TEEC evidence fields.

Decision Metadata (v1.2)

The metadata field includes evaluation telemetry:

DecisionAction (v1.2)

v1.2 adds 5 memory-governance actions to the existing 6:

Helper Methods

getModuleStatus()

Returns the registration and initialization status of all modules.

getTEECRegistry()

Returns the embedded TEEC registry for inspection.

getTEECValidator()

Returns the TEEC validator for manual decision validation.

Error Handling

TealConfigError

Thrown when the policy references a module that isn’t registered.

Fail-Closed Decisions

When a module throws during evaluation and failurePolicy.default is 'FAIL_CLOSED', the engine returns a DENY decision instead of throwing:

Performance

TealEngineV12 targets:
  • Parallel dispatch — All modules run simultaneously via Promise.allSettled
  • Lazy initialization — Modules init only on first use
  • < 15ms per evaluation (p99, 4 modules, without external calls)
  • Deterministic results — Same inputs + same policy → same outputs

Python Equivalent