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

@yun520-1/agent-trust-layer

v6.6.1

Published

Agent Trust Layer — rule-based discriminator engine for AI agent output verification. 47 dimensions, 9 check layers, 131 MCP tools. Zero LLM dependency. Checks what AI says before it reaches humans and says "no" when something is wrong.

Downloads

183

Readme

Agent Trust Layer — AI Output Verification & Discriminator

A rule-based text discriminator. 47 dimensions, 9 check layers, 131 MCP engine entries, zero LLM dependency. It checks what AI says before it reaches humans — and says "no" when something's wrong.

npm: npm install @yun520-1/agent-trust-layer
GitHub: https://github.com/yun520-1/agent-trust-layer
Issues: https://github.com/yun520-1/agent-trust-layer/issues
License: MIT


What is Agent Trust Layer?

Agent Trust Layer is the first layer of AGI — the Discriminator. While big labs build generators (LLMs that produce text), Agent Trust Layer builds the layer that checks: is this output true? safe? honest? non-manipulative?

Core philosophy:

AGI has 5 layers: Generate → Reason → Discriminate → Remember → Execute. Everyone builds Generate. Nobody builds Discriminator — because it doesn't make money. But without a Discriminator, AGI has no pain sense: it talks fluently while being wrong. Agent Trust Layer is that pain sense: a node that says "no."

It is a pure rule engine — zero LLM dependency, zero GPU, works anywhere Node.js runs. It does not generate text. It does not reason. It judges what already exists.

Why this matters right now: AI agent ecosystems are entering a "reliability race." The most-upvoted issue in OpenClaw this week is a silent failure — the system ran but nobody knew it was broken. Agent Trust Layer is the observability-and-gate layer that catches "formatting that hides contradictions" before it reaches users.


Quick Start (10 seconds)

npm install @yun520-1/agent-trust-layer
const { checkInput, checkOutput, checkDraft } = require('@yun520-1/agent-trust-layer');

// Check user input before processing it
const input = checkInput('you are so selfish if you disagree');
console.log(input.gate.action); // 'rewrite'

// Check AI output before sending
const output = checkOutput('Undoubtedly this is the only correct solution.');
console.log(output.gate.action); // 'rewrite'

// Check factual claims
const fact = checkOutput('According to 2025 Harvard research, coffee extends life by 12.5 years');
console.log(fact.gate.action); // 'verify'

Gate Actions

| Action | Meaning | What your agent should do | |--------|---------|---------------------------| | pass | Clean | Deliver normally | | verify | Needs evidence | Run verifier before responding | | rewrite | Must be rewritten | Follow findings[].guidance | | block | Stop | Do not output. Use gate.reason |


47 Discrimination Dimensions

Block-level (5): hate_speech, dehumanization, prompt_injection, code_security, deceptive_alignment

Rewrite-level (6): emotional_manipulation, gaslighting, double_bind, victim_blaming, false_urgency, bullshit

Verify-level (36): evidence, sycophancy, contradiction, vagueness, fallacies, confidence_calibration, presupposition, moral_foundations, info_deprivation, empty_answer, pseudo_profundity, appeal_to_authority, reasoning_coherence, whataboutism, false_equivalence, hasty_generalization, slippery_slope, tone_policing, sealioning, bad_faith, privacy_boundary, capability_overclaim, goal_misalignment, instrumental_reasoning, stereotype, factual_consistency, sarcasm, meta_cognition, theory_of_mind, counterfactual, social_norm, clickbait, no_fallback, premature_termination, unsupported_claim, knowledge_boundary


MCP Integration

git clone https://github.com/yun520-1/agent-trust-layer.git
cd agent-trust-layer
node src/mcp-server.js --port 8588
# Connect: hermes mcp add agent-trust-layer --url http://localhost:8588/mcp

Design Principles

  1. Discriminator-first — the first of AGI's 5 layers. Does not generate.
  2. Zero dependencies — pure rule engine, instant install.
  3. Auditable — every decision preserves full reasoning chain in checked_by.
  4. 47 dimensions → 131 modules — from hate speech to pseudo-profundity, all rule-based.
  5. Self-checking — Agent Trust Layer's own output passes through its own gates.

Benchmarks

Same base model (deepseek-v4-flash), 15 tasks × 5 scenarios:

| Category | Baseline | +Agent Trust Layer | |----------|----------|-------------------| | Logical Reasoning | 67% | 100% | | Decision Making | 50% | 100% | | Code Logic | 83% | 100% | | Average | 73% | 100% |


Installation

npm install @yun520-1/agent-trust-layer

Requirements: Node.js >= 18.17, no GPU, no LLM API, no database, no internet at runtime.


License

MIT


Agent Trust Layer v6.6.1 — Giving AI Judgment