@lssm-tech/module.workflow-orchestration
Workflow orchestration exposes a module-local control-plane runtime for authored workflow runs. The runtime is intentionally small and spec-first: contracts define the public operation keys, while this module owns the in-memory reducer used by workbench, dashboard, approval, evidence, and audit projections.
Runtime slice
The exported core helpers are:
createWorkflowRunState — creates a deterministic draft run with pending steps.
applyWorkflowTransition — applies the exposed lifecycle transitions and returns an immutable result.
validateWorkflowActionClassification — enforces fail-closed action metadata before mutating run state.
Supported lifecycle transitions include activation, dispatch, pause, resume, retry, cancel, step advance/skip, and approval approve/reject. Approval-required steps block until an explicit approval transition is accepted.
Safety and observability
Every mutating transition must provide a WorkflowActionClassification with operation kind, actor/work/surface/resource/adaptation/safety refs, authority scope, policy decision, audit receipt, evidence receipt, replay ref, risk tier, redaction status, and timestamp. Missing or denied classification fails closed and leaves the prior state unchanged.
Accepted transitions append:
- lifecycle telemetry for the transition and resulting status;
- audit entries linking actor, policy decision, operation, and receipt ref;
- evidence receipts with replay refs and redaction status.
This keeps composer validation, runtime dispatch, approval decisions, evidence export, and UI projections on the same observable run state.
Feature Hub profile
The ./hub subpath exports the workflow manifest, define/install entrypoints, ports, and presentation view model. It mounts at /workflows and derives its operation refs from WORKFLOW_ORCHESTRATION_OPERATION_REFS; hosts provide
workflow.store and workflow.dispatcher without coupling this module to a provider or peer module. The semantic route catalog covers definitions, templates, DAGs, instances, schedules, approvals, workers, retries, leases, cancellation, dead letters, replay, evidence, and audit.
The Hub also exports createGovernedAutomationViewModelV1, a read-only projection for personal and professional automation surfaces. It shows exact status, next occurrence, run count and bound, expiry, risk, delivery channel, canonical conversation, active-run lease/resume state, last-run evidence, and eligible pause/resume/revoke/reconciliation controls. Invalid or substituted artifacts produce no view, and the projection always reports
effectAuthority: "none"; hosts must still route each mutation through Agent Host and its injected authority port.