Skip to main content

@svatah/yam-workflow

Story-as-function runner and resume

Exports

ExportKindSignature
checkEnvironmentfunctionexport function checkEnvironment(Refuse a non-idempotent story in production without an explicit override.
EnvironmentRefusalclassexport class EnvironmentRefusal extends ErrorA run refused before it started (LLD §15, exit 10).
PolicyOptionsinterfaceexport interface PolicyOptions
runWorkflowfunctionexport async function runWorkflow(Run one story as a function.
storyOffunctionexport function storyOf(plan: Plan, name: string): StoryThe story, or a message naming the ones that exist.
UnknownStoryclassexport class UnknownStory extends ErrorThe plan has no story by that name (LLD §15, exit 64).
WorkflowOptionsinterfaceexport interface WorkflowOptions extends PolicyOptions
WorkflowOutcomeinterfaceexport interface WorkflowOutcome