npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mizara/sdk

v0.2.0

Published

Mizara — programmable authorization layer for AI actions

Readme

Mizara SDK for Node.js

npm License

Authorization layer for AI agents. Call authorize() before any consequential action. Sub-2ms evaluation, policy-as-data, cryptographic receipt on every decision.

Also available for Python: pip install mizara

Install

npm install @mizara/sdk

Quickstart

Local policy file

import { createMizaraClient } from '@mizara/sdk';

const mizara = createMizaraClient({ policyPath: './policy.json' });

const result = await mizara.authorize({
  actor:    { id: 'agent_support_v4', type: 'autonomous_agent' },
  action:   { name: 'execute_refund' },
  resource: { type: 'monetary_transaction', id: 'tx_99210',
               attributes: { amount: 75, currency: 'USD' } },
});

if (result.status === 'DENY') {
  throw new Error(result.enforcement.user_facing_error);
}
// result.status                   -> 'ALLOW' | 'DENY' | 'REDACT' | 'RE_ROUTE'
// result.cryptographic_receipt.id -> 'rcpt_8f3c...'

Hosted API

Sign up at mizara.ai/signup to skip the local file:

import { createMizaraClient } from '@mizara/sdk';

const mizara = createMizaraClient({
  apiKey:   process.env.MIZARA_API_KEY!,
  clientId: 'acme_corp',
});

const result = await mizara.authorize({
  actor:    { id: 'agent_1', type: 'autonomous_agent' },
  action:   { name: 'execute_refund' },
  resource: { type: 'monetary_transaction', id: 'tx_1',
               attributes: { amount: 75 } },
});

Policy format

Plain JSON. No Rego, no Cedar syntax.

{
  "policy_id": "pol_refund_v1",
  "client_id": "acme_corp",
  "rules": [
    {
      "id": "rule_max_refund",
      "target_action": "execute_refund",
      "condition": "resource.attributes.amount <= 50.00",
      "effect": "ALLOW",
      "fallback_effect": "DENY",
      "remediation_message": "Refund exceeds the $50 unapproved threshold."
    }
  ]
}

Condition expressions support comparisons, boolean logic, arithmetic, and .contains():

resource.attributes.amount <= 50.00
context.jurisdiction == 'EU' && context.data_classification.contains('PII')
context.session_total + resource.attributes.amount <= 500

Integrations

| Framework | Example | | --- | --- | | LangGraph | examples/langgraph/ | | OpenAI Agents SDK | examples/openai-agents/ | | Hosted API | examples/hosted-api/ | | MCP (Claude Desktop, Claude Code) | see below |

MCP server

@mizara/sdk ships an MCP server that exposes authorize() as a tool — mizara_authorize — to any MCP-compatible agent.

npm install -g @mizara/sdk

Add to your MCP client config (e.g. Claude Desktop's claude_desktop_config.json):

{
  "mcpServers": {
    "mizara": {
      "command": "mizara-mcp",
      "args": ["--policy", "/absolute/path/to/your/policy.json"]
    }
  }
}

Restart the client. The agent now has mizara_authorize in its tool list and gets a signed receipt back with every call.

Design choices

Fail closed. No matching rule returns DENY, not ALLOW.

Policy as data. Rules live in a JSON file that non-engineers can edit without a deploy.

No Cedar or Rego. Conditions are plain boolean expressions. The engine compiles them safely without eval().

Receipt on every call. Even ALLOW decisions are signed and stored. The audit trail is part of the product, not an afterthought.

License

Apache-2.0