@loop-engine/guards
v0.1.5
Published
Deterministic policy guard registry and built-in guard evaluators
Downloads
704
Maintainers
Readme
@loop-engine/guards
Built-in guard implementations and guard evaluation pipeline for Loop Engine.
Install
npm install @loop-engine/guardsQuick Start
import { GuardRegistry, evaluateGuards } from "@loop-engine/guards";
const guards = new GuardRegistry();
guards.registerBuiltIns();
const summary = await evaluateGuards(
[{ guardId: "human-only" as never, severity: "hard", evaluatedBy: "runtime", description: "Human only" }],
{ actor: { type: "human", id: "[email protected]" as never }, loopId: "expense.approval" as never, aggregateId: "EXP-1" as never, fromState: "pending" as never, toState: "approved" as never, signal: "approve" as never },
guards
);Documentation link
https://loopengine.io/docs/packages/guards
License
Apache-2.0 © Better Data, Inc.
