JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 68
  • Score
    100M100P100Q80609F
  • License Apache-2.0

Loop Engine runtime for state transitions, guard evaluation, and event emission

Package Exports

  • @loop-engine/runtime

Readme

@loop-engine/runtime

npm Apache-2.0 Loop Engine

The Loop Engine runtime for governed loop lifecycle, transition execution, and event emission.

Install

npm install @loop-engine/runtime @loop-engine/adapter-memory @loop-engine/guards

Quick Start

import { createLoopSystem } from "@loop-engine/runtime";
import { createMemoryLoopStorageAdapter } from "@loop-engine/adapter-memory";
import { GuardRegistry } from "@loop-engine/guards";

const guardRegistry = new GuardRegistry();
guardRegistry.registerBuiltIns();
const registry = { get: () => loopDefinition, list: () => [loopDefinition] };
const system = createLoopSystem({ registry, storage: createMemoryLoopStorageAdapter(), guardRegistry });

await system.startLoop({ loopId: "expense.approval" as never, aggregateId: "EXP-1" as never, actor: { type: "human", id: "manager@acme.com" as never } });
await system.transition({ aggregateId: "EXP-1" as never, transitionId: "approve" as never, actor: { type: "human", id: "manager@acme.com" as never } });

https://loopengine.io/docs/packages/runtime

License

Apache-2.0 © Better Data, Inc.