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

@parmanasystems/sdk-client

v1.98.56

Published

Typed deterministic governance SDK for replay-safe execution, provenance-aware integrations, runtime compatibility validation, and independently verifiable governance workflows.

Readme

@parmanasystems/sdk-client

Type-safe TypeScript HTTP client for the Parmana runtime API. Wraps fetch with typed request/response interfaces matching the server's OpenAPI contract. Provides a client.audit.* sub-namespace for the decision timeline and stats endpoints. Throws ParmanaApiError on non-2xx responses with the server's error message.


Public API

/** Construction options. */
interface ParmanaClientOptions {
  /** Base URL of the Parmana server, e.g. "http://localhost:3001". */
  baseUrl: string;
  /** Bearer token — required when the server has PARMANA_API_KEY set. */
  apiKey?: string;
}

class ParmanaClient {
  readonly audit: AuditNamespace;

  constructor(options: ParmanaClientOptions)

  /** GET /health */
  async health(): Promise<HealthResult>

  /** GET /runtime/manifest */
  async runtimeManifest(): Promise<RuntimeManifestResult>

  /** GET /runtime/capabilities */
  async runtimeCapabilities(): Promise<RuntimeCapabilitiesResult>

  /** POST /execute — governed execution, returns signed attestation. */
  async execute(request: ExecuteRequest): Promise<ExecutionAttestation>

  /** POST /verify — verify an attestation signature and runtime integrity. */
  async verify(attestation: ExecutionAttestation): Promise<VerificationResult>

  /** POST /evaluate — dry-run policy evaluation, no attestation produced. */
  async evaluate(request: EvaluateRequest): Promise<EvaluateResult>

  /** POST /simulate — full pipeline dry-run with attestation preview. */
  async simulate(request: SimulateRequest): Promise<SimulateResult>

  /** POST /confirm-execution — prove a real action matched its authorization. */
  async confirmExecution(request: {
    attestation: ExecutionAttestation;
    executedAction: ExecutedAction;
    timeWindowSeconds?: number;
  }): Promise<ExecutionIntegrityProof>
}

class AuditNamespace {
  /** GET /audit/decisions — paginated decision timeline. */
  async decisions(params?: DecisionListParams): Promise<DecisionRow[]>

  /** GET /audit/decisions/:id — single decision detail. */
  async decision(executionId: string): Promise<DecisionDetail>

  /** GET /audit/stats — aggregate counts. */
  async stats(): Promise<AuditStats>

  /** GET /audit/security — security event dashboard. */
  async security(params?: { from?: string; to?: string; limit?: number }): Promise<SecurityEventRow[]>
}

/** Thrown on non-2xx HTTP responses. */
class ParmanaApiError extends Error {
  readonly status: number;
  constructor(status: number, message: string)
}

// ── Request types ───────────────────────────────────────────────────────────

interface ExecuteRequest {
  policyId: string;
  policyVersion: string;
  signals: Record<string, unknown>;
}

interface EvaluateRequest {
  policyId: string;
  policyVersion: string;
  signals: Record<string, unknown>;
}

interface SimulateRequest {
  policyId: string;
  policyVersion: string;
  signals: Record<string, unknown>;
}

// ── Response types ──────────────────────────────────────────────────────────

interface HealthResult {
  status: string;
  runtimeVersion: string;
  runtimeHash: string;
  verification: string;
  audit_db: boolean;
  signing_mode: "env" | "disk";
  capabilities: string[];
  supportedSchemaVersions: string[];
}

interface EvaluateResult {
  wouldDecide: "approve" | "reject" | string;
  ruleMatched: string;
  reason: string;
  signalsValidated: boolean;
}

interface SimulateResult {
  simulation: true;
  decision: { action: "approve" | "reject" | string; reason: string; ruleMatched: string };
  signalsValidated: boolean;
  policyLoaded: boolean;
  wouldSign: boolean;
  attestationPreview: Record<string, unknown>;
}

interface DecisionListParams {
  limit?: number;
  offset?: number;
  policyId?: string;
  decision?: "approve" | "deny" | "any";
  from?: string;
  to?: string;
}

interface AuditStats {
  total_decisions: string;
  decisions_today: string;
  total_verifications: string;
  valid_verifications: string;
  invalid_verifications: string;
  total_security_events: string;
  total_api_calls: string;
}

Environment variables

None. The client is configured via constructor arguments.


Usage example

import { ParmanaClient } from "@parmanasystems/sdk-client";

const client = new ParmanaClient({
  baseUrl: "http://localhost:3001",
  apiKey: process.env.PARMANA_API_KEY,
});

const attestation = await client.execute({
  policyId: "loan-approval",
  policyVersion: "1.0.0",
  signals: { amount: 50000, credit_score: 720 },
});

const result = await client.verify(attestation);
console.log(result.valid); // true

Package wiring

@parmanasystems/sdk-client has no internal @parmanasystems dependencies — it communicates exclusively over HTTP. It is the only dependency of @parmanasystems/dashboard. Callers embedding governance workflows in their applications can use it as a standalone package without installing the full runtime stack.