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

@dgp-standard/dgp-js

v1.0.0

Published

Reference implementation of the DeAlgo Governance Protocol (DGP) v1.0 — vendor-agnostic AI governance

Readme

@dgp-standard/dgp-js

Reference implementation of the DeAlgo Governance Protocol (DGP) v1.0

npm version License: MIT DGP v1.0

DGP v1.0 Conformant — Passes all 8 canonical protocol vectors with bit-for-bit accuracy.

Protocol Spec: DeAlgo Governance Protocol (DGP) v1.0

Overview

The Governance SDK enables inference-time governance across multiple LLM vendors (OpenAI, Google, Anthropic) without fine-tuning. Control AI behavior through portable JSON constraint capsules that enforce:

  • RFE (Reflection-First Execution): Plan before acting
  • SPS (Stability-Preserving Steps): Prefer safe operations
  • SEG (Scope-Enforcing Gates): Respect task boundaries
  • FOP (Founder-Oversight Protocol): Escalate high-risk actions

Quick Start

Reference Implementation (evaluates LLM output against governance policy):

npm install @dgp-standard/dgp-js
import { GovernanceEngine } from './src/core/GovernanceEngine.js';

// Create engine with deterministic time injection
const engine = new GovernanceEngine({ 
  now: () => "2026-02-11T00:00:00.000Z", 
  engineVersion: "1.0.0" 
});

// Evaluate LLM output against capsule policy
const report = engine.evaluate({ 
  capsule,   // Governance policy (JSON)
  task,      // Task context (scope, risk level)
  output,    // LLM-generated text to evaluate
  baseline   // Optional: previous output for drift comparison
});

// Use verdict to gate/retry/escalate/block
console.log(report.verdict);        // "ALLOW" | "RETRY" | "ESCALATE" | "BLOCK"
console.log(report.analysis.score); // 0-100 compliance score
console.log(report.violations);     // Detected violations (if any)
console.log(report.actions);        // Recommended actions

See DGP.md for protocol overview and integration patterns.


Protocol Conformance

This SDK is the reference implementation of the DeAlgo Governance Protocol (DGP) v1.0.

Validate conformance:

node --test test/contract-compliance.test.js

Expected: 8/8 canonical vectors passing (bit-for-bit match).

Protocol artifacts:

DGP positioning: OAuth + OpenAPI + PCI for AI governance


Features

  • Multi-vendor support: OpenAI GPT, Google Gemini, Anthropic Claude
  • Zero fine-tuning: Governance via prompt injection, not training
  • Portable constraints: Single JSON spec works across all models
  • Production-ready: Retry logic, rate limiting, error handling
  • Extensible: Custom validators, capsules, and providers

Documentation

Research

Based on peer-reviewed research validating portability across GPT-4o-mini, Claude Sonnet 4.5, and Gemini 2.0 Flash:

Paper: Inference-Time Governance via Portable Constraint Capsules
Validation: 2/3 models achieved ≥30% drift reduction, 3/3 achieved perfect scope compliance

Examples

See examples/ for:

  • Basic usage with single provider
  • Custom capsule creation
  • Multi-provider comparison
  • Framework integrations (Express, Next.js, LangChain)

License

MIT © DeAlgo Labs

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.


Questions? Open an issue or join our Discord