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

@wrongstack/plugin-sdk

v0.320.1

Published

Authoring SDK for WrongStack plugins — the plugin contract types, definePlugin, and shared runtime helpers. Third-party plugins should depend on this package only.

Readme

@wrongstack/plugin-sdk

Authoring SDK for WrongStack plugins. Third-party plugin authors should depend on this package only — it exposes the plugin contract, the definePlugin helper, and the same audit-hardened runtime helpers the built-in plugins use.

npm install @wrongstack/plugin-sdk

Minimal plugin

import { definePlugin } from '@wrongstack/plugin-sdk';

export default definePlugin(
  {
    name: 'wstack-plugin-hello',
    version: '1.0.0',
    description: 'Greets the team',
    capabilities: { tools: true },
    defaultConfig: { greeting: 'hello' },
  },
  async (api, options) => {
    api.tools.register({
      name: 'hello_greet',
      description: `Say ${options.greeting} to someone`,
      inputSchema: {
        type: 'object',
        properties: { who: { type: 'string' } },
        required: ['who'],
      },
      permission: 'auto',
      riskTier: 'safe',
      async execute(input) {
        return { greeting: `${options.greeting}, ${input.who}!` };
      },
    });
  },
);

definePlugin injects the current KERNEL_API_VERSION for you. If you write the plugin object by hand instead, declare the contract version your plugin was built against:

import { KERNEL_API_VERSION } from '@wrongstack/plugin-sdk';

export const plugin = {
  name: 'wstack-plugin-hello',
  apiVersion: '^0.1', // keep loading across additive host releases
  // ...
  async setup(api) {},
};

What's in the box

| Import | Purpose | |---|---| | definePlugin | Typed authoring helper (infers options, injects apiVersion) | | KERNEL_API_VERSION | The host's plugin contract version | | Plugin, PluginAPI, PluginCapabilities, … | The full plugin contract types | | HookEvent, HookOutcome, InProcessHook, … | Lifecycle hook types (PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, Stop) | | AgentExtension, ProviderRunnerWrapper, … | Agent-loop extension point types | | Tool, EventName, Config, ConfigStore | Registry, event, and config types | | @wrongstack/plugin-sdk/runtime | Bounded collections, releaseHandles, sandboxed paths (safePath, isInsideProject), ReDoS guards (withReDoSGuard), safe runner spawning (resolveRunnerCommand, runRunnerCommand), optional-LLM helpers (runOptionalPluginLlm, runOptionalPluginCouncil) |

Versioning

The SDK tracks the host's plugin contract (KERNEL_API_VERSION), not the host package version. Pin apiVersion: '^0.1' for additive compatibility; the host refuses plugins whose declared range no longer satisfies the kernel (see docs/plugin-third-party.md in the repository for the compatibility policy and release checklist).

Loading your plugin in WrongStack

# register an npm-installed package (installs into ~/.wrongstack/plugins,
# scripts disabled by default for supply-chain safety)
wstack plugin add wstack-plugin-hello --install

# or point at local code during development
wstack plugin add ./my-plugin          # writes { name, path } into config.plugins

External plugins run in-process with full host privileges. On first load the host pins a SHA-256 of your plugin's entry file (~/.wrongstack/plugin-trust.json); after an update, users re-confirm with wstack plugin trust <name>. See docs/plugin-author-guide.md for the full isolation and capability-enforcement model.