@guidegraph/definitions
v0.1.0-alpha.1
Published
Workflow definition lifecycle contracts and in-memory registry for GuideGraph.
Maintainers
Readme
@guidegraph/definitions
Workflow definition lifecycle contracts for GuideGraph.
This package gives apps a stable boundary between AI/builder-generated workflow definitions and runtime execution.
It includes:
WorkflowDefinitionRegistryMemoryWorkflowDefinitionRegistry- draft / published / archived status helpers
- duplicate-version and version-conflict errors
compareWorkflowDefinitions()migration-risk helper
The memory registry is useful for tests and local demos. Production apps can implement the same interface with their own database.
import { MemoryWorkflowDefinitionRegistry } from "@guidegraph/definitions";
const registry = new MemoryWorkflowDefinitionRegistry();
const draft = await registry.createDraft({
definition,
createdBy: "user_1"
});
await registry.publish({ id: draft.id });
const published = await registry.getPublished(definition.id);