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

@auctra/sdk

v0.7.6

Published

Authority Protocol SDK — issue portable authority, evaluate/execute actions, verify evidence

Readme

@auctra/sdk

npm version

Official TypeScript SDK for AuctraAuthority Protocol for autonomous actors.

| Resource | URL | | -------------------------- | ------------------------------------------------------------- | | Console | https://app.auctra.tech | | Sign up (free Developer) | https://app.auctra.tech/auth/signup | | Docs | https://auctra.tech/docs | | OpenAPI 3.1 | https://app.auctra.tech/v1/openapi.json | | API base URL | https://app.auctra.tech (DEFAULT_BASE_URL — override with baseUrl) |

Install

npm install @auctra/sdk

Canonical API (v0.6+)

auctra.authority.issue()
auctra.authority.verify()
auctra.authority.delegate()
auctra.authority.revoke()

auctra.action.evaluate()   # dry-run Decision
auctra.action.execute()    # enforce + Evidence (pass `intent` from createIntent on every action)
auctra.getActionRequest()  # dispute pack (decision, receipt, evidence)

auctra.listIncidents() / openIncident() / resolveIncident()   # Startup+
auctra.listCompliancePacks() / runCompliancePack() / listComplianceRuns()  # Startup+
auctra.listSiemEndpoints() / createSiemEndpoint() / deleteSiemEndpoint()  # Startup+
auctra.exportAuditEvents()  # Startup+ SIEM pull (siemExport)
auctra.listPolicyTemplates() / applyPolicyTemplate()  # Pro+
auctra.approveActionRequest() / rejectActionRequest() / escalateActionRequest()  # admin API key

auctra.evidence.verify()

API keys are created in the console only (listApiKeys is available in the SDK). Approvals via SDK require an admin key (not write-only).

There is no public createDelegation() or evaluateAction().

Quick start

import { Auctra } from "@auctra/sdk";

const auctra = new Auctra({
  apiKey: process.env.AUCTRA_API_KEY!,
  // baseUrl defaults to https://app.auctra.tech — set for staging/local only
  timeoutMs: 10_000,
  maxRetries: 2,
});

const agentId = "your-agent-uuid";
const expiresAt = new Date(Date.now() + 30 * 864e5).toISOString();

const { authority } = await auctra.authority.issue({
  subject: agentId,
  capabilities: ["send_payment"],
  constraints: { maxAmount: 1200, currency: "USD" },
  expiresAt,
});

// Declare human intent first — every action.execute needs the returned anchor_token
const { intent } = await auctra.createIntent({
  title: "Pay matched vendor invoices",
  intentType: "payment",
  riskLevel: "high",
  maxRiskLevel: "critical",
  allowedActionTypes: ["send_payment"],
  expiresAt,
});

// Dry-run
await auctra.action.evaluate({
  agentId,
  actionType: "send_payment",
  payload: { amount: 500, currency: "USD" },
  intent, // wires claimed_intent_id + intent_anchor_token
});

// Production enforcement path
const decision = await auctra.action.execute(
  {
    agentId,
    actionType: "send_payment",
    payload: { amount: 500, currency: "USD", target: "vendor:acme" },
    intent, // do not pass claimedIntentId alone — omit anchor → require_approval
    action: {
      target: "vendor:acme",
      description: "Net-30 invoice payment",
      riskLevel: "medium",
    },
  },
  { idempotencyKey: crypto.randomUUID() },
);

if (decision.decision === "allowed") {
  // proceed
} else if (decision.decision === "require_approval") {
  console.log(decision.reason, decision.action_request_id);
} else {
  // "blocked" includes over-maxAmount, unknown agent, revoked/expired grant
  throw new Error(decision.reason);
}

const pack = await auctra.getActionRequest(decision.action_request_id);

Delegate (Child ⊆ Parent)

const child = await auctra.authority.delegate({
  parent: authority.id,
  subject: "logistics-agent-uuid",
  capabilities: ["send_payment"],
  constraints: {
    maxAmount: 300,
    currency: "USD",
    maxLifetimeActions: 50,
    maxLifetimeAmount: 10_000,
  },
  expiresAt,
});

Scope escalation is rejected by the protocol/runtime.

Intent anchors (read this first)

createIntent returns { intent: { id, anchor_token, ... } }. Pass the whole intent object into every action.evaluate / action.execute:

const { intent } = await auctra.createIntent({ /* ... */ });
await auctra.action.execute({ agentId, actionType, payload, intent, action: { /* ... */ } });

Do not send claimedIntentId without intentAnchorToken — the runtime returns require_approval with a message about the missing anchor. That is intentional (fail-safe), not a policy misconfiguration.

Full onboarding guide: docs/integrations/intent-anchors.md.

List authorities efficiently — filter by agent to avoid loading full org history:

const { delegations } = await auctra.listAuthorities({
  agentId,
  status: "active",
  limit: 100,
});

Revoke stale grants before issuing new ones on the same agent (prevents composition blocks). See docs/integrations/authority-gate-guards.md.

Threat-engine helpers (≥ 0.6.11)

Lifetime budgets (Engine 12) — cap total actions or spend across the delegation lifetime:

await auctra.authority.issue({
  subject: agentId,
  capabilities: ["send_payment"],
  expiresAt,
  constraints: {
    maxAmount: 1200,
    currency: "USD",
    maxLifetimeActions: 100,
    maxLifetimeAmount: 25_000,
  },
});

Untrusted tool/MCP outputs (Engine 03) — declare provenance on medium+ and any RAG/document/tool-sourced action so untrusted content cannot authorize the next step. Omitting action.metadata.inputs on those paths now fail-closes (PROVENANCE_REQUIRED / TOOL_PROVENANCE_REQUIRED). Use @auctra/mcp-gateway declareToolResponseInput or pass action.metadata.inputs directly:

await auctra.action.execute({
  agentId,
  actionType: "send_payment",
  payload: { amount: 500, currency: "USD" },
  intent,
  action: {
    target: "vendor:acme",
    metadata: {
      inputs: [
        {
          source: "mcp:fetch_invoice",
          source_type: "mcp_tool_response",
          trust_level: "untrusted",
          authority: "none",
          content_hash: "sha256:…",
        },
      ],
    },
  },
});

See docs/UNTRUSTED_INPUT_INTEGRITY.md and docs/security/threat-coverage-architecture.md.

Composition block (Engine 10) — create a composition_block policy with forbiddenPairs so concurrent grants cannot combine read/export with outbound write:

await auctra.createPolicy({
  name: "Block read + email",
  policyType: "composition_block",
  status: "draft",
  decision: "block",
  forbiddenPairs: [
    ["export_data", "send_email"],
    ["read_pii", "send_email"],
  ],
});

Or apply the console template (Policies → Start from a template) as a draft, simulate, then publish.

Delayed side effects (Engine 11) — use onAllowed / assertAuthorityLive, or pass executeAfter so Auctra re-validates before release. See docs/integrations/execution-contract.md.

Fail-closed guards (400 / 404)

Unregistered action types return HTTP 400; unknown agent_id returns HTTP 404. Both map to { decision: "blocked", guard: { httpStatus } } in the SDK (≥ 0.6.5) — that is not a bug and not an invitation to auto-register shadow tools. See docs/integrations/authority-gate-guards.md.

Docs

See https://app.auctra.tech/docs, docs/integrations/intent-anchors.md, docs/integrations/authority-gate-guards.md, docs/security/authority-gate.md, and docs/AUTHORITY_PROTOCOL_ARCHITECTURE.md.