JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3508
  • Score
    100M100P100Q104138F

Runtime orchestration layer for Parmana Systems.

Package Exports

  • @parmanasystems/execution-runtime

Readme

@parmanasystems/execution-runtime

High-level orchestration layer for Parmana Systems governed execution.

npm


Overview

@parmanasystems/execution-runtime is the orchestration layer that sits above @parmanasystems/execution. It wires together policy evaluation, replay protection, signing, and verification into a single executeFromSignals call - the primary entry point for most Parmana Systems integrations.

Most applications should use @parmanasystems/core, which re-exports everything from this package. Use this package directly only if you need the runtime orchestration layer without the full SDK surface.


Install

npm install @parmanasystems/execution-runtime

Usage

import {
  executeFromSignals,
  MemoryReplayStore,
} from "@parmanasystems/execution-runtime";
import { LocalSigner, LocalVerifier } from "@parmanasystems/execution";
import crypto from "crypto";

const { privateKey, publicKey } = crypto.generateKeyPairSync("ed25519", {
  privateKeyEncoding: { type: "pkcs8", format: "pem" },
  publicKeyEncoding:  { type: "spki",  format: "pem" },
});

const signer      = new LocalSigner(privateKey);
const verifier    = new LocalVerifier(publicKey);
const replayStore = new MemoryReplayStore();

const attestation = await executeFromSignals(
  {
    policyId:      "loan-approval",
    policyVersion: "1.0.0",
    signals: {
      credit_score:  712,
      requested_usd: 50000,
    },
  },
  signer,
  verifier,
  replayStore
);

console.log(attestation.execution_state); // "completed"
console.log(attestation.decision.action); // "approve"
console.log(attestation.signature);       // Ed25519 over canonical attestation JSON

Redis replay store (production)

import { executeFromSignals, RedisReplayStore } from "@parmanasystems/execution-runtime";
import Redis from "ioredis";

const replayStore = new RedisReplayStore(new Redis(process.env.REDIS_URL));

const attestation = await executeFromSignals(context, signer, verifier, replayStore);

Exports

Export Description
executeFromSignals Primary execution entry point - evaluates a policy, signs the result, returns ExecutionAttestation
MemoryReplayStore In-process replay store for development and testing
RedisReplayStore Distributed replay store for production use

Relationship to other packages

Package Role
@parmanasystems/execution Deterministic evaluation engine and attestation primitives
@parmanasystems/execution-runtime Orchestration: wires evaluation, signing, verification, replay
@parmanasystems/core Unified public SDK - re-exports both of the above

Documentation

Full docs: parmanasystems.mintlify.app
Package page: parmanasystems.mintlify.app/packages/execution


License

Apache-2.0