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

@axtary/proxy

v0.1.0

Published

Local fail-closed runtime proxy for Axtary policy, ActionPass issuance, and ledger recording.

Downloads

434

Readme

@axtary/proxy

Local fail-closed runtime proxy for Axtary policy, ActionPass issuance, and ledger recording.

Early 0.x release: the runtime path is real and tested, but the API is not stable yet and may change between minor versions.

npm install @axtary/proxy

What It Does

  • Parses a normalized Axtary action.
  • Evaluates it through @axtary/policy.
  • Requires ActionPass signing before execution by default.
  • Appends every executable or blocked decision to @axtary/ledger.
  • Executes only registered handlers for allowed tools.
  • Can resolve exact approval evidence for step_up decisions before issuing a pass.
  • Returns structured blocked, executed, failed, and malformed results.
  • Returns per-stage timings for parse, policy, ActionPass issuance, ledger append, handler execution, and total latency.
  • Accepts either a static policy object or an async policy getter for hot-reloaded local configs.

Quickstart

This example runs as-is with Node 20+:

import { createProxyRuntime } from "@axtary/proxy";
import { createFakeHandlers } from "@axtary/adapters";
import { LocalJsonlLedger } from "@axtary/ledger";
import { demoAction } from "@axtary/actionpass";

const proxy = createProxyRuntime({
  issuer: "https://axtary.local",
  tenant: "org:example",
  ledger: new LocalJsonlLedger(".axtary/ledger.jsonl"),
  handlers: createFakeHandlers(),
  allowUnsignedExecution: true, // local demo only; real runs sign every pass
});

// A PR inside policy with passing tests: decision, ledger write, then handler.
const safeAction = structuredClone(demoAction);
safeAction.capability.payload.testsPassed = true;
console.log((await proxy.handle(safeAction)).status); // executed

// The same PR without test evidence requires step-up; with no approval
// resolver attached, the proxy blocks before the handler is ever called.
console.log((await proxy.handle(demoAction)).status); // blocked

Design Notes

The proxy is the first runtime enforcement surface. It is intentionally local and deterministic. Real adapters register handlers and let the proxy own the decision, pass issuance, and ledger write before any production tool is touched.

Unsigned execution is possible only with allowUnsignedExecution: true, which is meant for dry-run tests and local demos.

Handlers are bounded by handlerTimeoutMs from config. Timeout failures are recorded as failed executions after the allow decision is ledgered, which keeps the authorization trace intact without letting slow providers stall the runtime.

When a dynamic policy getter fails, the proxy fails closed, records a deny decision in the ledger, and does not call the downstream handler. That preserves the audit trail while avoiding stale or partially parsed policy.

approvalResolver is the local bridge to hosted or local approval queues. It receives the normalized action and step_up policy decision, and may return a payload-bound approval artifact. If resolution fails, returns nothing, or the artifact does not bind to the exact action, the proxy blocks before handler execution.