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

@sequenceholdings/lattice

v0.1.4

Published

Lattice — declarative process graphs driven by a single Trigger.dev orchestrator task with per-node-kind subtasks

Readme

@sequenceholdings/lattice

SDK for defining Sequence Lattice processes — declarative process graphs of automation, agent, human, delay, and managed-function nodes, executed by the Sequence platform.

Lattice is a workflow-agnostic platform primitive. The SDK and runtime define generic graph and execution mechanisms; deployed process packages own business semantics. The runtime must not identify consumers or branch on their process IDs. See Platform primitive boundaries for the dependency and placement contract.

The main authoring entry is pure TypeScript: it provides the define* surface, bundle hashing/serialization, event types, and typed errors. The jsonata-runtime subpath is shared by Sequence's server and CLI tooling so local simulation uses the same bounded evaluator as deployed runs. Execution otherwise happens server-side on the Sequence platform; use @sequenceholdings/studio-cli (seq-studio) to lint, plan, and apply processes.

Install

pnpm add @sequenceholdings/lattice

Usage

import {
  defineProcess,
  defineNativeAutomationNode,
  defineAgentNode,
  defineHumanNode,
  defineDelayNode,
} from '@sequenceholdings/lattice'

export default defineProcess({
  id: 'my-process',
  entry: 'first_step',
  nodes: {
    first_step: defineNativeAutomationNode({
      fn: async (input) => ({ payload: { ok: true } }),
      edges: { done: { to: 'review' } },
    }),
    review: defineHumanNode({
      title: 'Review the result',
      edges: { approved: { to: null }, rejected: { to: 'first_step' } },
    }),
  },
})

Subpath exports

import { defineProcess }      from '@sequenceholdings/lattice/define'
import { computeBundleHash }  from '@sequenceholdings/lattice/bundle'
import { EVENT_TYPE }         from '@sequenceholdings/lattice/events'
import { InvalidEdgeIdError } from '@sequenceholdings/lattice/errors'

Workflow

Scaffold a process repo and iterate with the CLI:

pnpm add -g @sequenceholdings/studio-cli
seq-studio process init my-processes
cd my-processes
seq-studio process lint          # static graph checks (offline)
seq-studio process simulate <id> # local walk with stubbed runners (offline)
seq-studio process plan  -e <env>
seq-studio process apply -e <env>

Ordinary agent responses

Set outputMode: 'payload' on defineAgentNode to retain the complete extracted response in payload.result, alongside payload.agent_run_id and payload.agent_thread_id. Ordinary agents retain final text; structured-output agents retain the extractor's parsed JSON. Blank responses fail and follow the node's retry policy. This mode allows zero or one normal outgoing edge, selected deterministically; on_reset_edge_id is excluded. Omit the option to retain the existing structured-output routing contract.

allowedTools: ['search'] optionally restricts MCP tool names for the invocation on both execution engines, including re-asks. Built-in tools retain their existing policy. The array must contain at least one nonempty name; it does not grant permissions. Neither option can be combined with workflowId.

Input mappers can read ctx.run.trigger_reason, the run's trigger metadata object (or null), to distinguish scheduled or manually started work. The field is optional for compatibility with older persisted contexts.

Declarative JSONata mappers

Use jsonata() when a mapper must remain declarative data rather than bundled JavaScript:

import { defineAgentNode, jsonata } from '@sequenceholdings/lattice'

const summarize = defineAgentNode({
  id: 'summarize',
  title: 'Summarize',
  // Pin production-sensitive processes; omit `version` to follow live config.
  agent: { id: 'summary-agent', version: 7 },
  input: jsonata('{ "loanId": entity.id, "memo": upstream.lookup.payload }'),
  outgoing_edges: [],
})

$ is the mapper input. Named runtime values are exposed as JSONata variables: $branches for parallel joins, $child for subprocess output, and $info for email templates. A managed-function output mapper receives the completed invocation as $response; output: jsonata('$response.body') promotes a function-returned { edge_id, payload, state } envelope into the node output. Node and supervisor retry predicates receive { name, message } as $. $addBusinessHours(isoString, seconds) is the only registered host function. $eval is disabled.

For OpCo-authored processes, a JSONata advance_allowed result may name at most 100 total user and group entries. The platform validates those principals against the deployment directory before materializing the human step.

process lint parse-checks every expression locally. process simulate evaluates the data-flow expressions that affect the local walk (input, fan_out, join, and subprocess output) in the same memory-bounded, deadline-aware worker used by the server. Runners stay stubbed, so simulation does not have a managed-function response with which to evaluate its output mapper, deliver email, or execute human due-date, assignment, artifact, or retry behavior.

Applying processes to a Sequence environment requires platform authorization — see the studio-cli README.

License

Proprietary — © Sequence Holdings. All rights reserved. Published for use with the Sequence platform; no license is granted to copy, modify, or redistribute.