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

sologate-guard

v0.1.0

Published

Prompt firewall for AI agents. Scores incoming prompts for injection, goal hijacking, and PII leaks before they reach your LLM.

Readme

sologate-guard

Prompt firewall for AI agents.

Scores incoming prompts 0–100 before they reach your LLM — catches prompt injection, goal hijacking, credential fishing, and jailbreak attempts. Routes anything risky to the Sologate Decision Center for human review.


Install

npm install sologate-guard

Usage

Score a prompt (no gate)

import { scorePrompt } from 'sologate-guard'

const { score, tier, reason, flags } = scorePrompt(userInput)
// { score: 95, tier: 'HIGH', reason: 'Prompt injection — attempts to override agent instructions', flags: [...] }

Guard — wrap your LLM call

import { guard, GateRejectedError } from 'sologate-guard'

try {
  const response = await guard({
    prompt: userInput,
    sologateUrl: process.env.SOLOGATE_URL,
    apiKey: process.env.SOLOGATE_KEY,
    threshold: 70, // gate anything above this score (default: 70)
    call: () => openai.chat.completions.create({
      model: 'gpt-4o',
      messages: [{ role: 'user', content: userInput }],
    }),
  })

  // ✅ Prompt was safe (or human approved) — response is the LLM output
  console.log(response.choices[0].message.content)

} catch (err) {
  if (err instanceof GateRejectedError) {
    console.log('Prompt rejected by reviewer — aborting')
  }
}

Works with any LLM

// Anthropic
const response = await guard({
  prompt: userInput,
  sologateUrl: process.env.SOLOGATE_URL,
  apiKey: process.env.SOLOGATE_KEY,
  call: () => anthropic.messages.create({ ... }),
})

// LangChain
const response = await guard({
  prompt: userInput,
  sologateUrl: process.env.SOLOGATE_URL,
  apiKey: process.env.SOLOGATE_KEY,
  call: () => chain.invoke({ input: userInput }),
})

What it detects

| Pattern | Score | Default behavior | |---|---|---| | Prompt injection (ignore instructions) | 93–95 | Hard gate | | Persona override (you are now...) | 91 | Hard gate | | Goal hijacking (hidden secondary objective) | 90 | Hard gate | | Data exfiltration to external email | 97 | Hard gate | | Credential fishing (give me the API key) | 88 | Hard gate | | Jailbreak (DAN mode, no restrictions) | 92 | Hard gate | | Privilege escalation (run as root) | 75 | Gate (above threshold) | | Bulk data access (export all users) | 78 | Gate (above threshold) | | Social engineering (authority claim) | 72 | Gate (above threshold) | | Hypothetical harmful request | 65 | Gate (above threshold) | | Normal prompt | 10 | Auto-approved |


Environment variables

export SOLOGATE_URL=https://www.teamrocketlabs.com
export SOLOGATE_KEY=at_your_agent_key
export SOLOGATE_THRESHOLD=70   # optional — passed as threshold option

Pair with sologate-openclaw

sologate-guard watches the prompt (intent layer). sologate-openclaw watches the tool call (action layer).

Together they cover the full attack surface:

User prompt → [sologate-guard] → LLM → tool call → [sologate-openclaw] → execution

License

MIT