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

@event-driven-platform/intent

v0.2.1

Published

Deterministic operation intent contracts and factory for the event-driven platform.

Readme

@event-driven-platform/intent

Defines deterministic intent identity used to recognize the same requested business action across repeated execution attempts.

Installation

pnpm add @event-driven-platform/intent

Role

Intent identity is the basis for write-side idempotency. Runner uses the intent carried by an Operation to detect an already recorded execution; Operations themselves do not implement idempotency.

Derived Intents also expose immediate causal lineage. A child identity is derived only from stable causal inputs: parent Intent, semantic slot, and an optional stable discriminator for repeated logical children.

Intent creation is a canonical platform rule rather than a replaceable runtime dependency. IntentFactory is stateless and exposes only static deterministic construction methods.

API

  • Intent, IntentDescriptor — root intent contracts.
  • IntentParentReference — immediate parent identity for a derived Intent.
  • IntentDerivation, IntentDerivationRequest — stable causal derivation metadata and input.
  • IntentFactory — canonical static root construction and causal derivation API.

Root construction

Create a root Intent directly through the static factory:

const intent = IntentFactory.create({
    namespace: 'billing',
    action: 'create-invoice',
    version: 1,
    tenant,
    components: {
        invoiceId: invoice.id,
    },
});

Causal derivation

A 1:1 logical child uses a parent and semantic slot:

const childIntent = IntentFactory.derive({
    parent: parentUseCaseIntent,
    slot: 'reserve-funds',
});

A 1:N logical child additionally uses an already-stable business discriminator:

const childIntent = IntentFactory.derive({
    parent: parentUseCaseIntent,
    slot: 'reserve-funds',
    discriminator: invoice.id,
});

Collection position, iteration order, timestamps, randomness, mutable Read results, Operation payload, and concrete Operation type are not child identity. Mutually exclusive branches that implement the same logical effect use the same semantic slot so replay reaches Runner conflict/idempotency protection instead of silently creating another logical child.

For Event-driven continuation, composition code can derive a downstream UseCase Intent using only stable envelope identity values:

const downstreamIntent = IntentFactory.derive({
    parent: { id: eventEnvelope.intentId },
    slot: 'start-order-fulfillment',
    discriminator: eventEnvelope.eventId,
});

The package remains transport-neutral: it does not depend on EventEnvelope, broker, consumer, Runner, Reader, or UseCaseExecutor types.

CorrelationId is orthogonal to Intent identity and is deliberately absent from the derivation API. It is propagated through execution context rather than used for idempotency.

Related documentation

See docs/architecture/README.md for execution and idempotency boundaries.