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

@zerotoallai/core

v0.1.0

Published

Domain-agnostic scoring engine for zerotoall protocol. Quadratic weighting, MCP server analysis, and trust evolution.

Readme

@zerotoallai/core

Domain-agnostic scoring engine for permissionless trust baselines.

Overview

This is the core scoring engine of the zerotoall protocol. It provides:

  • Quadratic Weighting: Anti-manipulation mechanism that reduces influence of repeat submissions
  • Aggregation: Baseline calculation across multiple dimensions
  • Trust Evolution: Drift detection and timeline tracking
  • Schemas: Domain-agnostic evaluation types

Installation

npm install @zerotoallai/core

Usage

Quadratic Weighting

import { calculateQuadraticWeight, aggregateScoresQuadratic } from '@zerotoallai/core';

// Single weight calculation
const weight = calculateQuadraticWeight(4);  // 0.5 (4 submissions = 50% influence)

// Aggregate scores from multiple evaluators
const result = aggregateScoresQuadratic([
  { submissionCount: 1, score: 80 },
  { submissionCount: 10, score: 60 },
  { submissionCount: 2, score: 70 },
]);

console.log(result);
// {
//   aggregatedScore: 75,
//   totalEvaluators: 3,
//   effectiveSampleSize: 2.0,
//   confidence: 'low'
// }

Baseline Aggregation

import { aggregateToBaseline, compareWithBaseline } from '@zerotoallai/core';

// Aggregate evaluations into baseline
const baseline = aggregateToBaseline([
  { evaluatorId: 'a', submissionCount: 1, scores: { security: 80, reliability: 90 } },
  { evaluatorId: 'b', submissionCount: 3, scores: { security: 70, reliability: 85 } },
]);

// Compare subject against baseline
const comparison = compareWithBaseline(
  { security: 85, reliability: 75 },
  baseline
);

console.log(comparison);
// {
//   comparisons: {
//     security: { subjectScore: 85, baselineAverage: 77, gap: 8, position: 'above' },
//     reliability: { subjectScore: 75, baselineAverage: 88, gap: -13, position: 'below' }
//   },
//   overallAlignment: 79
// }

MCP Server Analyzer

Analyze MCP server security posture from package.json:

import { analyzeMcpServer } from '@zerotoallai/core';

// Analyze an MCP server
const result = analyzeMcpServer({
  name: "@example/mcp-server",
  version: "1.0.0",
  description: "Example MCP server",
  author: "Example Author",
  license: "MIT",
  repository: "https://github.com/example/mcp-server",
  dependencies: {
    "axios": "^1.0.0",      // Detected: network access
    "fs-extra": "^10.0.0",  // Detected: file write
  },
});

console.log(result);
// {
//   name: "@example/mcp-server",
//   riskLevel: "medium",
//   overallScore: 68,
//   permissions: {
//     fileRead: true,
//     fileWrite: true,
//     shellExecute: false,
//     networkFetch: true,
//     envAccess: false
//   },
//   risks: [
//     { pattern: "undeclared_permissions", severity: "medium", ... }
//   ],
//   positives: ["Licensed: MIT", "Source code available", "No shell access"],
//   confidence: "medium"
// }

Risk Levels

| Level | Score | Meaning | |-------|-------|---------| | low | 80+ | Safe, minimal permissions | | medium | 60-79 | Some permissions detected | | high | 40-59 | Multiple risk patterns | | critical | <40 | Dangerous permission combinations |

Critical Risk Patterns

  • file_write_shell: File write + shell = arbitrary code execution
  • network_env: Network + env access = secret exfiltration risk
  • suspicious_deps: Git URLs, wildcard versions, non-registry sources

Trust Evolution

import { createSnapshot, buildTimeline, detectSignificantDrifts } from '@zerotoallai/core';

// Create snapshots over time
const snapshot1 = createSnapshot('server-a', 75, { security: 80 }, 'medium', 5);
const snapshot2 = createSnapshot('server-a', 45, { security: 40 }, 'high', 12);

// Build timeline
const timeline = buildTimeline('server-a', [snapshot1, snapshot2]);

console.log(timeline.trend);  // 'degrading'

// Detect significant drifts
const drifts = detectSignificantDrifts(timeline);
// Returns drift alerts for significant changes

Exports

// Scoring
export { calculateQuadraticWeight, aggregateScoresQuadratic } from '@zerotoallai/core';

// Aggregation
export { aggregateToBaseline, compareWithBaseline } from '@zerotoallai/core';

// Trust Evolution
export { createSnapshot, buildTimeline, detectSignificantDrifts } from '@zerotoallai/core';

// MCP Analyzer
export { analyzeMcpServer, type McpServerPosture, type PackageJson } from '@zerotoallai/core';

// Version
export { PROTOCOL_VERSION } from '@zerotoallai/core';

Philosophy

This module implements concepts from:

  • Plurality (Audrey Tang, Glen Weyl) - Quadratic weighting for plural voices
  • Balance of Power (Vitalik Buterin) - Protocol as field designer, not referee
  • X Community Notes - Bridging-based consensus

License

MIT