@sequenceholdings/lattice
v0.1.2
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.
This package is pure TypeScript with no runtime dependencies: it provides the
define* authoring surface, bundle hashing/serialization, event types, and
typed errors. Execution happens server-side on the Sequence platform; use
@sequenceholdings/studio-cli
(seq-studio) to lint, plan, and apply processes.
Install
pnpm add @sequenceholdings/latticeUsage
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>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.
