Skip to main content
TealEngine v1.3 extends the parallel evaluation pipeline with pre-evaluation stages (FREEZE rules, NHI verification), post-evaluation hooks (evidence emission, response transformation), automation levels, and PLAN_ONLY mode.
TealEngine v1.3 is backward-compatible with v1.2 policies. Existing evaluateV12() calls continue to work. The new evaluate() method adds pre/post stages and automation level support.

Class


TealEngineOptions


evaluate()

The primary v1.3 evaluation method. Executes the full pipeline:

Signature

EvaluationRequest

EvaluationContext

Example


PLAN_ONLY Mode

Returns what the governance decision would be without executing enforcement or emitting evidence. Useful for agent planning loops and UI previews.

approveDecision()

Resolves a PENDING decision by providing human approval.

Example


rejectDecision()

Resolves a PENDING decision by rejecting it.

loadPolicy()

Hot-swap the policy bundle at runtime. FREEZE rules are preserved across swaps.

Example

If the bundle includes an integrity hash, TealEngine validates it before applying. A mismatched hash triggers BUNDLE_INTEGRITY_VIOLATION and the swap is rejected. See Anti-Tamper Controls.

Pre-Evaluation Pipeline

The v1.3 pre-evaluation pipeline runs before module dispatch:
If any pre-evaluation stage fails, the pipeline short-circuits with DENY. No modules are invoked.

Post-Evaluation Hooks

Post-evaluation hooks run after the decision is computed but before it’s returned:

Decision (v1.3 Extended)


Error Handling


Performance


Migration from v1.2

The evaluateV12() method is preserved for backward compatibility. It bypasses pre-evaluation stages and automation levels, behaving identically to v1.2.