@fabricorg/platform-temporal
v4.1.0
Published
Temporal binding contracts for governed Fabric Platform actions and sagas.
Readme
@fabricorg/platform-temporal
Host-side Temporal binding for governed Platform actions. Activities invoke the public governed Host boundary with stable workflow/step idempotency, carry workflow evidence, and map saga/approval messages to signals. Temporal supplies durable orchestration; Platform invocation and event records remain canonical audit evidence. This package does not call handlers or make Platform a workflow authority.
temporalWorkflowStartClient() adapts the official @temporalio/client WorkflowClient; all direct Temporal packages in an application must remain on the family-supported version line.
SagaWorkflowRegistry maps saga action IDs to workflow types and task queues without process-global
registration. createTemporalSagaDispatcher() starts the parent under the Host's stable workflow ID
with Temporal's use-existing conflict policy. createSagaParentActivities() exposes explicit durable
progress, approval-parking, cancellation, completion, and compensation-failure callbacks; workflows
must finalize the canonical parent invocation through those activities rather than treating Temporal
history as the audit ledger.
createSagaParentActivities() attaches a distinct stable lifecycleId to each progress step,
approval gate, cancellation, completion, and failure. sagaParentActivityIdentity() accepts an
optional occurrence discriminator for callers constructing those identities directly, while
sagaChildCausation() produces stable child causation. A durable lifecycle adapter uses these
identities to make a retried or replayed activity idempotent. SAGA_SIGNALS declares
the stable signal names (saga.proceed, saga.cancel, saga.approval) a workflow may register
handlers for.
