@enforra/sdk-node
v0.2.1
Published
Node.js SDK for local Enforra tool-call enforcement.
Readme
@enforra/sdk-node
Node.js SDK wrapper for enforcing Enforra policy decisions around tool calls.
Installation
npm install @enforra/sdk-nodeUsage
import { createEnforraClient } from "@enforra/sdk-node";
const enforra = await createEnforraClient({
policyPath: "./policies/starter/support-agent.yaml",
auditPath: ".enforra/audit.jsonl"
});
const result = await enforra.enforceToolCall({
agent: "support-agent",
tool: "stripe.refund",
args: { amount: 20 },
execute: async () => ({ status: "succeeded" })
});Hash-Chain Audit
For tamper-evident local audit logs:
const enforra = await createEnforraClient({
policyPath,
auditPath,
auditIntegrity: "hash_chain"
});See Audit Integrity for more details.
