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

@keystrokehq/integration-authoring

v0.0.7

Published

Authoring helpers for building Keystroke integration packages: operation factories, REST clients, trigger bindings, and webhook verification.

Readme

@keystrokehq/integration-authoring

Authoring helpers for building Keystroke integration packages.

This package owns the integration-author ergonomics that aren't workflow primitives themselves: operation factories, REST client helpers, webhook verification, and trigger-binding helpers. It is intentionally separate from @keystrokehq/core so core can stay focused on CredentialSet, Step, Tool, Workflow, and the other end-user authoring primitives.

Install

npm install @keystrokehq/integration-authoring

This package is normally pulled in transitively when you install a Keystroke integration package (e.g. @keystrokehq/slack). Install it directly only if you are authoring your own integration package.

Public subpaths

| Import | Purpose | |---|---| | @keystrokehq/integration-authoring | createOperationFactory, error-normalizing proxy, polling and webhook trigger binding factories | | @keystrokehq/integration-authoring/http | createJsonRestClient and friends — typed JSON REST client with consistent error shapes | | @keystrokehq/integration-authoring/webhooks | HMAC webhook verification helpers | | @keystrokehq/integration-authoring/official | defineOfficialIntegration and the official-integration operation factory used by Keystroke's first-party integration packages | | @keystrokehq/integration-authoring/official/catalog | Provider-app seed and catalog descriptor types |

Operation factory

import { createOperationFactory } from '@keystrokehq/integration-authoring';
import { z } from 'zod';
import { mySlackCredentialSet } from './credential-set';

const myOp = createOperationFactory(mySlackCredentialSet);

export const sendMessage = myOp({
  id: 'send-message',
  name: 'Send Slack message',
  description: 'Posts a message to a Slack channel',
  input: z.object({ channel: z.string(), text: z.string() }),
  output: z.object({ ts: z.string() }),
  run: async ({ channel, text }, credentials) => {
    const res = await fetch('https://slack.com/api/chat.postMessage', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${credentials.SLACK_BOT_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ channel, text }),
    });
    const json = await res.json();
    return { ts: json.ts };
  },
});

The factory produces a @keystrokehq/core Operation with the credential set wired up, while letting authors keep a flat run(input, credentials) signature.

REST client

import { createJsonRestClient } from '@keystrokehq/integration-authoring/http';

const client = createJsonRestClient({
  baseUrl: 'https://api.example.com',
  headers: () => ({ Authorization: `Bearer ${getToken()}` }),
});

const result = await client.get<{ id: string }>('/items/123');

Webhook verification

import { verifyHmacSignature } from '@keystrokehq/integration-authoring/webhooks';

const ok = verifyHmacSignature({
  algorithm: 'sha256',
  secret: signingSecret,
  payload: rawBody,
  expected: req.headers['x-signature'],
});

Trigger binding factories

import {
  createPollingTriggerBindingFactory,
  createWebhookTriggerBindingFactory,
} from '@keystrokehq/integration-authoring';

These are used to declare polling and webhook triggers that compose with Keystroke's Trigger primitive.

Worked examples

Every integration in the integrations/ directory of this repository uses this package.

License

MIT