@xcon-workflow/core
v0.1.1
Published
Public XCON workflow model, parser, validator, diagram renderer, and dry-run tracer.
Readme
@xcon-workflow/core
Core utilities for public XCON workflow documents:
- Parse workflow SKETCH
- Normalize JSON action documents
- Validate action shape and public safety boundaries
- Build graph nodes and edges
- Render Mermaid or small HTML diagrams
- Produce non-executing dry-run traces
Install
npm install @xcon-workflow/coreQuick usage
import {
parseWorkflowSketch,
normalizeWorkflow,
validateWorkflow,
buildWorkflowGraph,
workflowToMermaid,
renderWorkflowHtml,
dryRunWorkflow
} from '@xcon-workflow/core';
const source = `
workflow "Deploy flow"
saveSelected: saveData
target "global"
key "itemId"
data "= item.id"
`;
const workflow = parseWorkflowSketch(source);
const diagnostics = validateWorkflow(workflow);
const graph = buildWorkflowGraph(workflow);
const mermaid = workflowToMermaid(workflow);
const html = renderWorkflowHtml(workflow);
const trace = dryRunWorkflow(workflow);parseWorkflow is also available in the package API and accepts SKETCH text, JSON text, or workflow objects.
