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

@roostorg/coop-integration-example

v1.0.0

Published

Example package to show how a custom integration and signal can be used in COOP this is meant to be a reference repository and provide basic determination

Readme

@roostorg/coop-integration-example

Example COOP integration plugin. Reference repository showing how to build a custom integration and signals for use in COOP.

  • Integration config – saving and loading per-org config (e.g. “True percentage”)
  • Routing rules – using the plugin signal in conditions
  • Automated enforcement – the same signal in enforcement rules

What it provides

  • Integration: COOP_INTEGRATION_EXAMPLE
  • Signal 1 – Random Signal Selection (RANDOM_SIGNAL_SELECTION): Returns true or false at random. The probability (0–100%) comes from the org’s integration config (“True percentage”). Set e.g. 70 in Org settings → Integrations; the signal returns true about 70% of the time. Use this to test config saving and boolean conditions.
  • Signal 2 – Random Score (RANDOM_SCORE): Returns a random number between 0 and 1. No integration config needed. In the rule builder you set a threshold (e.g. 0.5) and choose above or below. Use this to test numeric score conditions (e.g. “score ≥ 0.5” or “score < 0.3”).

Install

From this repo (development):

git clone https://github.com/roostorg/coop-integration-example.git
cd coop-integration-example
npm install
npm run build

From npm:

npm install @roostorg/coop-integration-example

Configure in COOP

In your COOP integrations.config.json (or INTEGRATIONS_CONFIG_PATH), add:

Local path (development):
If you cloned this repo next to your COOP server directory, use a path relative to the server (e.g. from server/):

{
  "integrations": [
    { "package": "../coop-integration-example", "enabled": true }
  ]
}

From npm:

{
  "integrations": [
    { "package": "@roostorg/coop-integration-example", "enabled": true }
  ]
}

Restart the COOP server so it loads the plugin.

Use in the app

  1. Org settings → Integrations – you should see “COOP Integration Example”. Open it and set True percentage (0–100) (e.g. 70) for Random Signal Selection. Save.
  2. Rules (routing or enforcement) – when adding a condition:
    • Random Signal Selection: Pick that signal; the condition uses your configured percentage (true/false).
    • Random Score: Pick “Random Score”, then set a threshold (e.g. 0.5) and choose above or below. The rule compares the random score to your threshold.

Contract

This package implements the COOP plugin contract from @roostorg/types:

  • Default export: CoopIntegrationPlugin with manifest and createSignals(context).
  • Manifest: id, name, version, requiresConfig, configurationFields, signalTypeIds, modelCard (with required sections modelDetails and technicalIntegration).
  • createSignals: Returns two descriptors:
    • RANDOM_SIGNAL_SELECTION: run(input) uses context.getCredential(orgId) for true percentage; returns { outputType: { scalarType: 'BOOLEAN' }, score: boolean }.
    • RANDOM_SCORE: run() returns { outputType: { scalarType: 'NUMBER' }, score: number } in [0, 1]; no config. Threshold is set in the rule (above/below).

Publishing

CI runs on push/PR (build only). To publish to npm:

  1. Create a GitHub release (tag e.g. v1.0.1). The Publish to npm workflow runs on release and runs npm publish --access public.
  2. Add NPM_TOKEN in this repo’s secrets (Settings → Secrets and variables → Actions): an npm automation token with publish permission for @roostorg/coop-integration-example.

You can also trigger Publish to npm manually from the Actions tab (workflow_dispatch).