Siglo v1.0.0.
1. Checkpoint Schema v2.0.0
A checkpoint represents a serialized snapshot of an execution stack at a point in time:Key Schema Guarantees:
version: 2&schemaVersion: '2.0.0': Explicit storage schema version tracking. Attempting to restore a checkpoint from an unsupported future storage engine version (version > 2) throwsCheckpointVersionException. (Note: This storage schema version is distinct from workflow code semantic versioning, which throwsWorkflowVersionMismatchExceptionif workflow steps differ without a migration).revision: number: Monotonically incremented on each checkpoint save, state transition, or migration.expiresAt?: number: Optional Unix epoch expiration timestamp (calculated fromttlMs). Expired checkpoints can be cleaned viacleanExpiredCheckpoints().status: Indicates execution lifecycle status:'running','completed','failed','cancelled', or'waiting'.
2. Optimistic Concurrency Control (OCC)
To prevent lost updates in distributed or concurrent environments, checkpoints support optimistic concurrency:- If the current revision does not match
expectedRevision,CheckpointConflictExceptionis thrown: - On conflict, callers can reload the latest checkpoint, reconcile state, and retry.
3. Namespace Scoping & Partitioning
Checkpoints recorded with anamespace partition data across tenants:
- Restoring a checkpoint with
restoreCheckpoint(cp, { expectedNamespace: 'ns-A' })throwsNamespaceMismatchExceptionwhen bothexpectedNamespaceandcp.namespaceare present and differ. - Storage adapter operations pass
namespacefor key prefixing and partitioning. - Note: Namespace scoping is logical key partitioning, not an enforced authenticated tenant boundary. Application-level authorization and explicit validation are still required.
4. Field Redaction (redactFields)
Sensitive context fields (tokens, passwords, API keys) can be redacted from checkpoints:
- Redaction applies recursively to both top-level context fields and nested sub-objects.
- Matched keys are replaced with
"[REDACTED]".
5. Storage Error Modes (StorageErrorMode)
Configured via defaultStorageManager.setErrorMode(mode):
6. Storage Adapter Interface
Custom adapters implement theStorageAdapter interface:
