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

@griffin-app/griffin-plan-executor

v0.1.26

Published

Executor for griffin JSON test monitors

Readme

griffin Monitor Executor

The griffin Monitor Executor takes JSON test monitors (output from the test system DSL) and executes them. It can run tests locally or remotely (e.g., in a Lambda function).

Features

Currently Working:

  • Execute JSON test monitors
  • Support for HTTP endpoints (GET, POST, PUT, DELETE, PATCH)
  • Support for wait nodes
  • Graph-based execution following edges (topological sort)
  • Secrets resolution at runtime (env, AWS Secrets Manager, HashiCorp Vault)
  • Local execution mode
  • Detailed error reporting with node-by-node results

🚧 In Development:

  • Assertion evaluation (structure in place)
  • Remote execution mode
  • Advanced error handling and retries

Installation

npm install
npm run build

Usage

Programmatic Usage

import { executeMonitor } from "./dist/executor";
import type { TestMonitor } from "./dist/test-monitor-types";

const testMonitor: TestMonitor = {
  name: "my-test",
  endpoint_host: "http://localhost",
  nodes: [
    {
      id: "health",
      type: "endpoint",
      method: "GET",
      path: "/health",
      response_format: "JSON",
    },
  ],
  edges: [
    { from: "__START__", to: "health" },
    { from: "health", to: "__END__" },
  ],
};

const results = await executeMonitor(testMonitor, {
  mode: "local",
  baseUrl: "http://localhost:3000",
  timeout: 30000,
  secretRegistry: secretRegistry, // Optional: for resolving secrets in test monitors
});

console.log(results);
// {
//   success: true,
//   results: [
//     {
//       nodeId: "health",
//       success: true,
//       response: { status: "ok" },
//       duration_ms: 25
//     }
//   ],
//   errors: [],
//   totalDuration_ms: 25
// }

Execution Options

interface ExecutionOptions {
  mode: "local" | "remote"; // Currently only 'local' is fully supported
  baseUrl?: string; // Base URL for endpoints (overrides monitor's endpoint_host)
  timeout?: number; // Request timeout in ms (default: 30000)
  secretRegistry?: SecretProviderRegistry; // Optional: for resolving secrets in test monitors
}

Execution Flow

  1. Parse the test monitor JSON - Validates structure and types
  2. Build execution graph - Performs topological sort starting from __START__
  3. Execute nodes in order:
    • Endpoints: Makes HTTP requests, stores responses
    • Waits: Sleeps for specified duration
    • Assertions: Evaluates assertions (currently structure only)
  4. Collect results - Aggregates success/failure status for each node
  5. Return execution results - Includes detailed node results, errors, and timing

Node Types

HttpRequest Nodes

  • Makes HTTP requests using axios
  • Supports all HTTP methods (GET, POST, PUT, DELETE, PATCH)
  • Parses JSON, XML, or TEXT responses
  • Stores response for use in subsequent nodes

Wait Nodes

  • Pauses execution for specified duration
  • Duration specified in milliseconds

Assertion Nodes

  • Currently structure is in place but evaluation needs implementation
  • Will evaluate assertions with access to all previous endpoint responses

Secrets Resolution

If a test monitor contains secret references (created using the secret() function in the DSL), they are resolved before execution begins. Secrets can be used in endpoint headers and request bodies.

Supported Providers:

  • Environment Variables: Read from process environment
  • AWS Secrets Manager: Retrieve secrets from AWS Secrets Manager
  • HashiCorp Vault: Retrieve secrets from Vault KV secrets engine

Example test monitor with secrets:

{
  "name": "authenticated-check",
  "nodes": [
    {
      "id": "api_call",
      "type": "endpoint",
      "headers": {
        "Authorization": {
          "$secret": {
            "provider": "env",
            "ref": "API_TOKEN"
          }
        }
      }
    }
  ]
}

The executor will resolve all secrets before executing the monitor. If any secret cannot be resolved, execution fails immediately with a clear error message.