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

@sguild/external-actions

v1.0.0

Published

External Actions Queue producer SDK for Sguild domains, per ADR-0011 and the external-actions queue contract. Producer-transactional enqueue, producer-driven cancel, and the handler registration and authoring types.

Downloads

78

Readme

@sguild/external-actions

External Actions Queue producer SDK for Sguild domains, per ADR-0011 and the external-actions queue contract (coordination/contracts/external-actions/README.md).

The External Actions Queue is the outbound-side mirror of the dispatcher: one action goes to one destination with retry, response correlation, and dead-letter. This package is the producer-facing surface of that queue. The queue runner, the retry and dead-letter machinery, and the operator and reconciliation routes are Platform-side and are not part of this package.

What this package provides

  • enqueueExternalAction(input) — enqueue one outbound action. Pass client: tx from inside prisma.$transaction(...) so the action row and the producer-side row write land atomically (the producer-transactional-guarantee seam).
  • cancelExternalAction(input) — producer-driven cancellation of an action that has not yet executed.
  • registerExternalActionHandler(handler) — register a per-(provider, actionKind) handler implementing the ExternalActionHandler interface.
  • The handler and payload types (ExternalActionHandler, HandlerContext, HandlerResult, and the input and DTO types).

Setup

The SDK does not import any domain's generated Prisma client. Inject yours once at process startup, the same way the dispatcher SDK is configured:

import { configureExternalActions } from "@sguild/external-actions";
import { prisma } from "./lib/db/prisma";

configureExternalActions({ prismaClient: prisma });

Enqueues that pass a per-call client (an interactive-transaction tx) do not need the injected client; the injected client is the default for enqueues and cancels with no caller-supplied transaction.

Enqueue

import { enqueueExternalAction } from "@sguild/external-actions";

await prisma.$transaction(async (tx) => {
  await tx.surveySend.create({ data: { ... } });
  await enqueueExternalAction({
    producer: "delivery",
    provider: "quo",
    actionKind: "quo.sms.send",
    payload: { ... },
    client: tx,
  });
});

Distribution

This package ships built (dist/) and versioned independently of the external-actions queue contract version, the same way @sguild/dispatcher is versioned independently of the event-envelope contract. Producer domains add it as a dependency rather than vendoring a copy of the source.

Related

  • ADR-0011 (coordination/adrs/ADR-0011-external-actions-at-platform.md)
  • External Actions Queue contract (coordination/contracts/external-actions/README.md)
  • @sguild/dispatcher, the inbound-side sibling SDK (ADR-0009)