@smthrs/engine-store 0.0.0-stage → 1.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +247 -0
- package/LICENSE +21 -0
- package/README.md +146 -2
- package/dist/cjs/ArtifactGc.d.ts +235 -0
- package/dist/cjs/ArtifactGc.d.ts.map +1 -0
- package/dist/cjs/ArtifactGc.js +183 -0
- package/dist/cjs/ArtifactGc.js.map +7 -0
- package/dist/cjs/ArtifactSync.d.ts +164 -0
- package/dist/cjs/ArtifactSync.d.ts.map +1 -0
- package/dist/cjs/ArtifactSync.js +144 -0
- package/dist/cjs/ArtifactSync.js.map +7 -0
- package/dist/cjs/CacheSync.d.ts +112 -0
- package/dist/cjs/CacheSync.d.ts.map +1 -0
- package/dist/cjs/CacheSync.js +64 -0
- package/dist/cjs/CacheSync.js.map +7 -0
- package/dist/cjs/DeferredClockFold.d.ts +354 -0
- package/dist/cjs/DeferredClockFold.d.ts.map +1 -0
- package/dist/cjs/DeferredClockFold.js +335 -0
- package/dist/cjs/DeferredClockFold.js.map +7 -0
- package/dist/cjs/DisasterRecovery.d.ts +431 -0
- package/dist/cjs/DisasterRecovery.d.ts.map +1 -0
- package/dist/cjs/DisasterRecovery.js +453 -0
- package/dist/cjs/DisasterRecovery.js.map +7 -0
- package/dist/cjs/DurableEngineState.d.ts +776 -0
- package/dist/cjs/DurableEngineState.d.ts.map +1 -0
- package/dist/cjs/DurableEngineState.js +1536 -0
- package/dist/cjs/DurableEngineState.js.map +7 -0
- package/dist/cjs/EngineStore.d.ts +158 -0
- package/dist/cjs/EngineStore.d.ts.map +1 -0
- package/dist/cjs/EngineStore.js +398 -0
- package/dist/cjs/EngineStore.js.map +7 -0
- package/dist/cjs/EngineStoreMetrics.d.ts +276 -0
- package/dist/cjs/EngineStoreMetrics.d.ts.map +1 -0
- package/dist/cjs/EngineStoreMetrics.js +135 -0
- package/dist/cjs/EngineStoreMetrics.js.map +7 -0
- package/dist/cjs/Errors.d.ts +22 -0
- package/dist/cjs/Errors.d.ts.map +1 -0
- package/dist/cjs/Errors.js +39 -0
- package/dist/cjs/Errors.js.map +7 -0
- package/dist/cjs/EventTypes.d.ts +27 -0
- package/dist/cjs/EventTypes.d.ts.map +1 -0
- package/dist/cjs/EventTypes.js +37 -0
- package/dist/cjs/EventTypes.js.map +7 -0
- package/dist/cjs/ExecutionFacts.d.ts +59 -0
- package/dist/cjs/ExecutionFacts.d.ts.map +1 -0
- package/dist/cjs/ExecutionFacts.js +123 -0
- package/dist/cjs/ExecutionFacts.js.map +7 -0
- package/dist/cjs/ExecutionSnapshot.d.ts +117 -0
- package/dist/cjs/ExecutionSnapshot.d.ts.map +1 -0
- package/dist/cjs/ExecutionSnapshot.js +111 -0
- package/dist/cjs/ExecutionSnapshot.js.map +7 -0
- package/dist/cjs/Inconsistency.d.ts +154 -0
- package/dist/cjs/Inconsistency.d.ts.map +1 -0
- package/dist/cjs/Inconsistency.js +135 -0
- package/dist/cjs/Inconsistency.js.map +7 -0
- package/dist/cjs/Migrations.d.ts +56 -0
- package/dist/cjs/Migrations.d.ts.map +1 -0
- package/dist/cjs/Migrations.js +78 -0
- package/dist/cjs/Migrations.js.map +7 -0
- package/dist/cjs/OwnerIdentity.d.ts +91 -0
- package/dist/cjs/OwnerIdentity.d.ts.map +1 -0
- package/dist/cjs/OwnerIdentity.js +65 -0
- package/dist/cjs/OwnerIdentity.js.map +7 -0
- package/dist/cjs/PlanInputStore.d.ts +110 -0
- package/dist/cjs/PlanInputStore.d.ts.map +1 -0
- package/dist/cjs/PlanInputStore.js +224 -0
- package/dist/cjs/PlanInputStore.js.map +7 -0
- package/dist/cjs/PlanMergeStore.d.ts +113 -0
- package/dist/cjs/PlanMergeStore.d.ts.map +1 -0
- package/dist/cjs/PlanMergeStore.js +255 -0
- package/dist/cjs/PlanMergeStore.js.map +7 -0
- package/dist/cjs/PlanScheduler.d.ts +363 -0
- package/dist/cjs/PlanScheduler.d.ts.map +1 -0
- package/dist/cjs/PlanScheduler.js +1090 -0
- package/dist/cjs/PlanScheduler.js.map +7 -0
- package/dist/cjs/Reconciliation.d.ts +175 -0
- package/dist/cjs/Reconciliation.d.ts.map +1 -0
- package/dist/cjs/Reconciliation.js +119 -0
- package/dist/cjs/Reconciliation.js.map +7 -0
- package/dist/cjs/ReplayOnly.d.ts +91 -0
- package/dist/cjs/ReplayOnly.d.ts.map +1 -0
- package/dist/cjs/ReplayOnly.js +52 -0
- package/dist/cjs/ReplayOnly.js.map +7 -0
- package/dist/cjs/Retention.d.ts +113 -0
- package/dist/cjs/Retention.d.ts.map +1 -0
- package/dist/cjs/Retention.js +99 -0
- package/dist/cjs/Retention.js.map +7 -0
- package/dist/cjs/RunCatalogRead.d.ts +17 -0
- package/dist/cjs/RunCatalogRead.d.ts.map +1 -0
- package/dist/cjs/RunCatalogRead.js +33 -0
- package/dist/cjs/RunCatalogRead.js.map +7 -0
- package/dist/cjs/RunChangeFeed.d.ts +75 -0
- package/dist/cjs/RunChangeFeed.d.ts.map +1 -0
- package/dist/cjs/RunChangeFeed.js +96 -0
- package/dist/cjs/RunChangeFeed.js.map +7 -0
- package/dist/cjs/RunState.d.ts +116 -0
- package/dist/cjs/RunState.d.ts.map +1 -0
- package/dist/cjs/RunState.js +76 -0
- package/dist/cjs/RunState.js.map +7 -0
- package/dist/cjs/Selection.d.ts +495 -0
- package/dist/cjs/Selection.d.ts.map +1 -0
- package/dist/cjs/Selection.js +288 -0
- package/dist/cjs/Selection.js.map +7 -0
- package/dist/cjs/SelectionStore.d.ts +141 -0
- package/dist/cjs/SelectionStore.d.ts.map +1 -0
- package/dist/cjs/SelectionStore.js +229 -0
- package/dist/cjs/SelectionStore.js.map +7 -0
- package/dist/cjs/StepBoundary.d.ts +501 -0
- package/dist/cjs/StepBoundary.d.ts.map +1 -0
- package/dist/cjs/StepBoundary.js +619 -0
- package/dist/cjs/StepBoundary.js.map +7 -0
- package/dist/cjs/StepCacheFold.d.ts +148 -0
- package/dist/cjs/StepCacheFold.d.ts.map +1 -0
- package/dist/cjs/StepCacheFold.js +131 -0
- package/dist/cjs/StepCacheFold.js.map +7 -0
- package/dist/cjs/StepSandbox.d.ts +78 -0
- package/dist/cjs/StepSandbox.d.ts.map +1 -0
- package/dist/cjs/StepSandbox.js +75 -0
- package/dist/cjs/StepSandbox.js.map +7 -0
- package/dist/cjs/WakeBus.d.ts +116 -0
- package/dist/cjs/WakeBus.d.ts.map +1 -0
- package/dist/cjs/WakeBus.js +89 -0
- package/dist/cjs/WakeBus.js.map +7 -0
- package/dist/cjs/WorkspaceSandbox.d.ts +619 -0
- package/dist/cjs/WorkspaceSandbox.d.ts.map +1 -0
- package/dist/cjs/WorkspaceSandbox.js +711 -0
- package/dist/cjs/WorkspaceSandbox.js.map +7 -0
- package/dist/cjs/index.d.ts +157 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +95 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/internal/ActionPersistence.d.ts +276 -0
- package/dist/cjs/internal/ActionPersistence.d.ts.map +1 -0
- package/dist/cjs/internal/ActionPersistence.js +1395 -0
- package/dist/cjs/internal/ActionPersistence.js.map +7 -0
- package/dist/cjs/internal/ArtifactRoots.d.ts +38 -0
- package/dist/cjs/internal/ArtifactRoots.d.ts.map +1 -0
- package/dist/cjs/internal/ArtifactRoots.js +89 -0
- package/dist/cjs/internal/ArtifactRoots.js.map +7 -0
- package/dist/cjs/internal/AttemptAdmission.d.ts +53 -0
- package/dist/cjs/internal/AttemptAdmission.d.ts.map +1 -0
- package/dist/cjs/internal/AttemptAdmission.js +52 -0
- package/dist/cjs/internal/AttemptAdmission.js.map +7 -0
- package/dist/cjs/internal/AttemptLifecycle.d.ts +245 -0
- package/dist/cjs/internal/AttemptLifecycle.d.ts.map +1 -0
- package/dist/cjs/internal/AttemptLifecycle.js +112 -0
- package/dist/cjs/internal/AttemptLifecycle.js.map +7 -0
- package/dist/cjs/internal/AttemptProbe.d.ts +53 -0
- package/dist/cjs/internal/AttemptProbe.d.ts.map +1 -0
- package/dist/cjs/internal/AttemptProbe.js +66 -0
- package/dist/cjs/internal/AttemptProbe.js.map +7 -0
- package/dist/cjs/internal/CacheAdmission.d.ts +79 -0
- package/dist/cjs/internal/CacheAdmission.d.ts.map +1 -0
- package/dist/cjs/internal/CacheAdmission.js +71 -0
- package/dist/cjs/internal/CacheAdmission.js.map +7 -0
- package/dist/cjs/internal/CacheAgeHistory.d.ts +27 -0
- package/dist/cjs/internal/CacheAgeHistory.d.ts.map +1 -0
- package/dist/cjs/internal/CacheAgeHistory.js +61 -0
- package/dist/cjs/internal/CacheAgeHistory.js.map +7 -0
- package/dist/cjs/internal/CacheAgeVerdicts.d.ts +15 -0
- package/dist/cjs/internal/CacheAgeVerdicts.d.ts.map +1 -0
- package/dist/cjs/internal/CacheAgeVerdicts.js +73 -0
- package/dist/cjs/internal/CacheAgeVerdicts.js.map +7 -0
- package/dist/cjs/internal/CacheOutputPolicy.d.ts +24 -0
- package/dist/cjs/internal/CacheOutputPolicy.d.ts.map +1 -0
- package/dist/cjs/internal/CacheOutputPolicy.js +75 -0
- package/dist/cjs/internal/CacheOutputPolicy.js.map +7 -0
- package/dist/cjs/internal/CachePublication.d.ts +97 -0
- package/dist/cjs/internal/CachePublication.d.ts.map +1 -0
- package/dist/cjs/internal/CachePublication.js +80 -0
- package/dist/cjs/internal/CachePublication.js.map +7 -0
- package/dist/cjs/internal/CallFacts.d.ts +15 -0
- package/dist/cjs/internal/CallFacts.d.ts.map +1 -0
- package/dist/cjs/internal/CallFacts.js +97 -0
- package/dist/cjs/internal/CallFacts.js.map +7 -0
- package/dist/cjs/internal/CopiedRecord.d.ts +61 -0
- package/dist/cjs/internal/CopiedRecord.d.ts.map +1 -0
- package/dist/cjs/internal/CopiedRecord.js +134 -0
- package/dist/cjs/internal/CopiedRecord.js.map +7 -0
- package/dist/cjs/internal/DeferredPersistence.d.ts +108 -0
- package/dist/cjs/internal/DeferredPersistence.d.ts.map +1 -0
- package/dist/cjs/internal/DeferredPersistence.js +270 -0
- package/dist/cjs/internal/DeferredPersistence.js.map +7 -0
- package/dist/cjs/internal/EffectRecords.d.ts +92 -0
- package/dist/cjs/internal/EffectRecords.d.ts.map +1 -0
- package/dist/cjs/internal/EffectRecords.js +63 -0
- package/dist/cjs/internal/EffectRecords.js.map +7 -0
- package/dist/cjs/internal/EngineJj.d.ts +30 -0
- package/dist/cjs/internal/EngineJj.d.ts.map +1 -0
- package/dist/cjs/internal/EngineJj.js +42 -0
- package/dist/cjs/internal/EngineJj.js.map +7 -0
- package/dist/cjs/internal/EngineStateSchema.d.ts +68 -0
- package/dist/cjs/internal/EngineStateSchema.d.ts.map +1 -0
- package/dist/cjs/internal/EngineStateSchema.js +58 -0
- package/dist/cjs/internal/EngineStateSchema.js.map +7 -0
- package/dist/cjs/internal/ExecutionSnapshotRead.d.ts +162 -0
- package/dist/cjs/internal/ExecutionSnapshotRead.d.ts.map +1 -0
- package/dist/cjs/internal/ExecutionSnapshotRead.js +199 -0
- package/dist/cjs/internal/ExecutionSnapshotRead.js.map +7 -0
- package/dist/cjs/internal/ExecutionSnapshotRelations.d.ts +39 -0
- package/dist/cjs/internal/ExecutionSnapshotRelations.d.ts.map +1 -0
- package/dist/cjs/internal/ExecutionSnapshotRelations.js +105 -0
- package/dist/cjs/internal/ExecutionSnapshotRelations.js.map +7 -0
- package/dist/cjs/internal/ExitEncoding.d.ts +180 -0
- package/dist/cjs/internal/ExitEncoding.d.ts.map +1 -0
- package/dist/cjs/internal/ExitEncoding.js +236 -0
- package/dist/cjs/internal/ExitEncoding.js.map +7 -0
- package/dist/cjs/internal/FileBoundarySnapshot.d.ts +14 -0
- package/dist/cjs/internal/FileBoundarySnapshot.d.ts.map +1 -0
- package/dist/cjs/internal/FileBoundarySnapshot.js +51 -0
- package/dist/cjs/internal/FileBoundarySnapshot.js.map +7 -0
- package/dist/cjs/internal/FileEnumeration.d.ts +127 -0
- package/dist/cjs/internal/FileEnumeration.d.ts.map +1 -0
- package/dist/cjs/internal/FileEnumeration.js +194 -0
- package/dist/cjs/internal/FileEnumeration.js.map +7 -0
- package/dist/cjs/internal/HostReflection.d.ts +80 -0
- package/dist/cjs/internal/HostReflection.d.ts.map +1 -0
- package/dist/cjs/internal/HostReflection.js +43 -0
- package/dist/cjs/internal/HostReflection.js.map +7 -0
- package/dist/cjs/internal/JournalRecords.d.ts +325 -0
- package/dist/cjs/internal/JournalRecords.d.ts.map +1 -0
- package/dist/cjs/internal/JournalRecords.js +122 -0
- package/dist/cjs/internal/JournalRecords.js.map +7 -0
- package/dist/cjs/internal/NodeJournal.d.ts +157 -0
- package/dist/cjs/internal/NodeJournal.d.ts.map +1 -0
- package/dist/cjs/internal/NodeJournal.js +192 -0
- package/dist/cjs/internal/NodeJournal.js.map +7 -0
- package/dist/cjs/internal/Ordering.d.ts +14 -0
- package/dist/cjs/internal/Ordering.d.ts.map +1 -0
- package/dist/cjs/internal/Ordering.js +25 -0
- package/dist/cjs/internal/Ordering.js.map +7 -0
- package/dist/cjs/internal/PlanInputs.d.ts +14 -0
- package/dist/cjs/internal/PlanInputs.d.ts.map +1 -0
- package/dist/cjs/internal/PlanInputs.js +78 -0
- package/dist/cjs/internal/PlanInputs.js.map +7 -0
- package/dist/cjs/internal/PlanMerges.d.ts +178 -0
- package/dist/cjs/internal/PlanMerges.d.ts.map +1 -0
- package/dist/cjs/internal/PlanMerges.js +125 -0
- package/dist/cjs/internal/PlanMerges.js.map +7 -0
- package/dist/cjs/internal/ProvenanceSlot.d.ts +30 -0
- package/dist/cjs/internal/ProvenanceSlot.d.ts.map +1 -0
- package/dist/cjs/internal/ProvenanceSlot.js +53 -0
- package/dist/cjs/internal/ProvenanceSlot.js.map +7 -0
- package/dist/cjs/internal/ResultEnvelope.d.ts +88 -0
- package/dist/cjs/internal/ResultEnvelope.d.ts.map +1 -0
- package/dist/cjs/internal/ResultEnvelope.js +90 -0
- package/dist/cjs/internal/ResultEnvelope.js.map +7 -0
- package/dist/cjs/internal/RetentionOps.d.ts +414 -0
- package/dist/cjs/internal/RetentionOps.d.ts.map +1 -0
- package/dist/cjs/internal/RetentionOps.js +354 -0
- package/dist/cjs/internal/RetentionOps.js.map +7 -0
- package/dist/cjs/internal/RunCatalogOps.d.ts +118 -0
- package/dist/cjs/internal/RunCatalogOps.d.ts.map +1 -0
- package/dist/cjs/internal/RunCatalogOps.js +85 -0
- package/dist/cjs/internal/RunCatalogOps.js.map +7 -0
- package/dist/cjs/internal/RunCoordinator.d.ts +78 -0
- package/dist/cjs/internal/RunCoordinator.d.ts.map +1 -0
- package/dist/cjs/internal/RunCoordinator.js +123 -0
- package/dist/cjs/internal/RunCoordinator.js.map +7 -0
- package/dist/cjs/internal/RunDriver.d.ts +192 -0
- package/dist/cjs/internal/RunDriver.d.ts.map +1 -0
- package/dist/cjs/internal/RunDriver.js +1584 -0
- package/dist/cjs/internal/RunDriver.js.map +7 -0
- package/dist/cjs/internal/RunLifecycle.d.ts +22 -0
- package/dist/cjs/internal/RunLifecycle.d.ts.map +1 -0
- package/dist/cjs/internal/RunLifecycle.js +63 -0
- package/dist/cjs/internal/RunLifecycle.js.map +7 -0
- package/dist/cjs/internal/RunListing.d.ts +78 -0
- package/dist/cjs/internal/RunListing.d.ts.map +1 -0
- package/dist/cjs/internal/RunListing.js +171 -0
- package/dist/cjs/internal/RunListing.js.map +7 -0
- package/dist/cjs/internal/RunListingError.d.ts +35 -0
- package/dist/cjs/internal/RunListingError.d.ts.map +1 -0
- package/dist/cjs/internal/RunListingError.js +47 -0
- package/dist/cjs/internal/RunListingError.js.map +7 -0
- package/dist/cjs/internal/RuntimeGraph.d.ts +73 -0
- package/dist/cjs/internal/RuntimeGraph.d.ts.map +1 -0
- package/dist/cjs/internal/RuntimeGraph.js +180 -0
- package/dist/cjs/internal/RuntimeGraph.js.map +7 -0
- package/dist/cjs/internal/SandboxedExecution.d.ts +80 -0
- package/dist/cjs/internal/SandboxedExecution.d.ts.map +1 -0
- package/dist/cjs/internal/SandboxedExecution.js +104 -0
- package/dist/cjs/internal/SandboxedExecution.js.map +7 -0
- package/dist/cjs/internal/StateTransaction.d.ts +44 -0
- package/dist/cjs/internal/StateTransaction.d.ts.map +1 -0
- package/dist/cjs/internal/StateTransaction.js +52 -0
- package/dist/cjs/internal/StateTransaction.js.map +7 -0
- package/dist/cjs/internal/StepFacts.d.ts +14 -0
- package/dist/cjs/internal/StepFacts.d.ts.map +1 -0
- package/dist/cjs/internal/StepFacts.js +58 -0
- package/dist/cjs/internal/StepFacts.js.map +7 -0
- package/dist/cjs/internal/TypedEvents.d.ts +14 -0
- package/dist/cjs/internal/TypedEvents.d.ts.map +1 -0
- package/dist/cjs/internal/TypedEvents.js +37 -0
- package/dist/cjs/internal/TypedEvents.js.map +7 -0
- package/dist/cjs/migrations/0001_initial.d.ts +17 -0
- package/dist/cjs/migrations/0001_initial.d.ts.map +1 -0
- package/dist/cjs/migrations/0001_initial.js +61 -0
- package/dist/cjs/migrations/0001_initial.js.map +7 -0
- package/dist/cjs/migrations/0002_selection_store.d.ts +15 -0
- package/dist/cjs/migrations/0002_selection_store.d.ts.map +1 -0
- package/dist/cjs/migrations/0002_selection_store.js +56 -0
- package/dist/cjs/migrations/0002_selection_store.js.map +7 -0
- package/dist/cjs/migrations/0003_plan_inputs.d.ts +13 -0
- package/dist/cjs/migrations/0003_plan_inputs.d.ts.map +1 -0
- package/dist/cjs/migrations/0003_plan_inputs.js +90 -0
- package/dist/cjs/migrations/0003_plan_inputs.js.map +7 -0
- package/dist/cjs/migrations/0004_plan_environment.d.ts +14 -0
- package/dist/cjs/migrations/0004_plan_environment.d.ts.map +1 -0
- package/dist/cjs/migrations/0004_plan_environment.js +56 -0
- package/dist/cjs/migrations/0004_plan_environment.js.map +7 -0
- package/dist/cjs/migrations/0005_plan_merges.d.ts +14 -0
- package/dist/cjs/migrations/0005_plan_merges.d.ts.map +1 -0
- package/dist/cjs/migrations/0005_plan_merges.js +82 -0
- package/dist/cjs/migrations/0005_plan_merges.js.map +7 -0
- package/dist/cjs/migrations/0006_execution_listing.d.ts +15 -0
- package/dist/cjs/migrations/0006_execution_listing.d.ts.map +1 -0
- package/dist/cjs/migrations/0006_execution_listing.js +101 -0
- package/dist/cjs/migrations/0006_execution_listing.js.map +7 -0
- package/dist/cjs/migrations/0007_run_parent_sequence.d.ts +15 -0
- package/dist/cjs/migrations/0007_run_parent_sequence.d.ts.map +1 -0
- package/dist/cjs/migrations/0007_run_parent_sequence.js +40 -0
- package/dist/cjs/migrations/0007_run_parent_sequence.js.map +7 -0
- package/dist/cjs/migrations/0008_deferred_consumption.d.ts +16 -0
- package/dist/cjs/migrations/0008_deferred_consumption.d.ts.map +1 -0
- package/dist/cjs/migrations/0008_deferred_consumption.js +45 -0
- package/dist/cjs/migrations/0008_deferred_consumption.js.map +7 -0
- package/dist/cjs/migrations/0009_deferred_clock_facts.d.ts +24 -0
- package/dist/cjs/migrations/0009_deferred_clock_facts.d.ts.map +1 -0
- package/dist/cjs/migrations/0009_deferred_clock_facts.js +141 -0
- package/dist/cjs/migrations/0009_deferred_clock_facts.js.map +7 -0
- package/dist/cjs/migrations/0010_pending_cancellation.d.ts +15 -0
- package/dist/cjs/migrations/0010_pending_cancellation.d.ts.map +1 -0
- package/dist/cjs/migrations/0010_pending_cancellation.js +41 -0
- package/dist/cjs/migrations/0010_pending_cancellation.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/test/TestStores.d.ts +89 -0
- package/dist/cjs/test/TestStores.d.ts.map +1 -0
- package/dist/cjs/test/TestStores.js +98 -0
- package/dist/cjs/test/TestStores.js.map +7 -0
- package/dist/esm/ArtifactGc.d.ts +235 -0
- package/dist/esm/ArtifactGc.d.ts.map +1 -0
- package/dist/esm/ArtifactGc.js +268 -0
- package/dist/esm/ArtifactGc.js.map +1 -0
- package/dist/esm/ArtifactSync.d.ts +164 -0
- package/dist/esm/ArtifactSync.d.ts.map +1 -0
- package/dist/esm/ArtifactSync.js +176 -0
- package/dist/esm/ArtifactSync.js.map +1 -0
- package/dist/esm/CacheSync.d.ts +112 -0
- package/dist/esm/CacheSync.d.ts.map +1 -0
- package/dist/esm/CacheSync.js +94 -0
- package/dist/esm/CacheSync.js.map +1 -0
- package/dist/esm/DeferredClockFold.d.ts +354 -0
- package/dist/esm/DeferredClockFold.d.ts.map +1 -0
- package/dist/esm/DeferredClockFold.js +472 -0
- package/dist/esm/DeferredClockFold.js.map +1 -0
- package/dist/esm/DisasterRecovery.d.ts +431 -0
- package/dist/esm/DisasterRecovery.d.ts.map +1 -0
- package/dist/esm/DisasterRecovery.js +523 -0
- package/dist/esm/DisasterRecovery.js.map +1 -0
- package/dist/esm/DurableEngineState.d.ts +776 -0
- package/dist/esm/DurableEngineState.d.ts.map +1 -0
- package/dist/esm/DurableEngineState.js +1648 -0
- package/dist/esm/DurableEngineState.js.map +1 -0
- package/dist/esm/EngineStore.d.ts +158 -0
- package/dist/esm/EngineStore.d.ts.map +1 -0
- package/dist/esm/EngineStore.js +403 -0
- package/dist/esm/EngineStore.js.map +1 -0
- package/dist/esm/EngineStoreMetrics.d.ts +276 -0
- package/dist/esm/EngineStoreMetrics.d.ts.map +1 -0
- package/dist/esm/EngineStoreMetrics.js +260 -0
- package/dist/esm/EngineStoreMetrics.js.map +1 -0
- package/dist/esm/Errors.d.ts +22 -0
- package/dist/esm/Errors.d.ts.map +1 -0
- package/dist/esm/Errors.js +22 -0
- package/dist/esm/Errors.js.map +1 -0
- package/dist/esm/EventTypes.d.ts +27 -0
- package/dist/esm/EventTypes.d.ts.map +1 -0
- package/dist/esm/EventTypes.js +27 -0
- package/dist/esm/EventTypes.js.map +1 -0
- package/dist/esm/ExecutionFacts.d.ts +59 -0
- package/dist/esm/ExecutionFacts.d.ts.map +1 -0
- package/dist/esm/ExecutionFacts.js +96 -0
- package/dist/esm/ExecutionFacts.js.map +1 -0
- package/dist/esm/ExecutionSnapshot.d.ts +117 -0
- package/dist/esm/ExecutionSnapshot.d.ts.map +1 -0
- package/dist/esm/ExecutionSnapshot.js +95 -0
- package/dist/esm/ExecutionSnapshot.js.map +1 -0
- package/dist/esm/Inconsistency.d.ts +154 -0
- package/dist/esm/Inconsistency.d.ts.map +1 -0
- package/dist/esm/Inconsistency.js +133 -0
- package/dist/esm/Inconsistency.js.map +1 -0
- package/dist/esm/Migrations.d.ts +56 -0
- package/dist/esm/Migrations.d.ts.map +1 -0
- package/dist/esm/Migrations.js +91 -0
- package/dist/esm/Migrations.js.map +1 -0
- package/dist/esm/OwnerIdentity.d.ts +91 -0
- package/dist/esm/OwnerIdentity.d.ts.map +1 -0
- package/dist/esm/OwnerIdentity.js +99 -0
- package/dist/esm/OwnerIdentity.js.map +1 -0
- package/dist/esm/PlanInputStore.d.ts +110 -0
- package/dist/esm/PlanInputStore.d.ts.map +1 -0
- package/dist/esm/PlanInputStore.js +207 -0
- package/dist/esm/PlanInputStore.js.map +1 -0
- package/dist/esm/PlanMergeStore.d.ts +113 -0
- package/dist/esm/PlanMergeStore.d.ts.map +1 -0
- package/dist/esm/PlanMergeStore.js +244 -0
- package/dist/esm/PlanMergeStore.js.map +1 -0
- package/dist/esm/PlanScheduler.d.ts +363 -0
- package/dist/esm/PlanScheduler.d.ts.map +1 -0
- package/dist/esm/PlanScheduler.js +1321 -0
- package/dist/esm/PlanScheduler.js.map +1 -0
- package/dist/esm/Reconciliation.d.ts +175 -0
- package/dist/esm/Reconciliation.d.ts.map +1 -0
- package/dist/esm/Reconciliation.js +175 -0
- package/dist/esm/Reconciliation.js.map +1 -0
- package/dist/esm/ReplayOnly.d.ts +91 -0
- package/dist/esm/ReplayOnly.d.ts.map +1 -0
- package/dist/esm/ReplayOnly.js +59 -0
- package/dist/esm/ReplayOnly.js.map +1 -0
- package/dist/esm/Retention.d.ts +113 -0
- package/dist/esm/Retention.d.ts.map +1 -0
- package/dist/esm/Retention.js +139 -0
- package/dist/esm/Retention.js.map +1 -0
- package/dist/esm/RunCatalogRead.d.ts +17 -0
- package/dist/esm/RunCatalogRead.d.ts.map +1 -0
- package/dist/esm/RunCatalogRead.js +17 -0
- package/dist/esm/RunCatalogRead.js.map +1 -0
- package/dist/esm/RunChangeFeed.d.ts +75 -0
- package/dist/esm/RunChangeFeed.d.ts.map +1 -0
- package/dist/esm/RunChangeFeed.js +81 -0
- package/dist/esm/RunChangeFeed.js.map +1 -0
- package/dist/esm/RunState.d.ts +116 -0
- package/dist/esm/RunState.d.ts.map +1 -0
- package/dist/esm/RunState.js +109 -0
- package/dist/esm/RunState.js.map +1 -0
- package/dist/esm/Selection.d.ts +495 -0
- package/dist/esm/Selection.d.ts.map +1 -0
- package/dist/esm/Selection.js +482 -0
- package/dist/esm/Selection.js.map +1 -0
- package/dist/esm/SelectionStore.d.ts +141 -0
- package/dist/esm/SelectionStore.d.ts.map +1 -0
- package/dist/esm/SelectionStore.js +215 -0
- package/dist/esm/SelectionStore.js.map +1 -0
- package/dist/esm/StepBoundary.d.ts +501 -0
- package/dist/esm/StepBoundary.d.ts.map +1 -0
- package/dist/esm/StepBoundary.js +919 -0
- package/dist/esm/StepBoundary.js.map +1 -0
- package/dist/esm/StepCacheFold.d.ts +148 -0
- package/dist/esm/StepCacheFold.d.ts.map +1 -0
- package/dist/esm/StepCacheFold.js +201 -0
- package/dist/esm/StepCacheFold.js.map +1 -0
- package/dist/esm/StepSandbox.d.ts +78 -0
- package/dist/esm/StepSandbox.d.ts.map +1 -0
- package/dist/esm/StepSandbox.js +70 -0
- package/dist/esm/StepSandbox.js.map +1 -0
- package/dist/esm/WakeBus.d.ts +116 -0
- package/dist/esm/WakeBus.d.ts.map +1 -0
- package/dist/esm/WakeBus.js +121 -0
- package/dist/esm/WakeBus.js.map +1 -0
- package/dist/esm/WorkspaceSandbox.d.ts +619 -0
- package/dist/esm/WorkspaceSandbox.d.ts.map +1 -0
- package/dist/esm/WorkspaceSandbox.js +985 -0
- package/dist/esm/WorkspaceSandbox.js.map +1 -0
- package/dist/esm/index.d.ts +157 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +157 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal/ActionPersistence.d.ts +276 -0
- package/dist/esm/internal/ActionPersistence.d.ts.map +1 -0
- package/dist/esm/internal/ActionPersistence.js +2306 -0
- package/dist/esm/internal/ActionPersistence.js.map +1 -0
- package/dist/esm/internal/ArtifactRoots.d.ts +38 -0
- package/dist/esm/internal/ArtifactRoots.d.ts.map +1 -0
- package/dist/esm/internal/ArtifactRoots.js +76 -0
- package/dist/esm/internal/ArtifactRoots.js.map +1 -0
- package/dist/esm/internal/AttemptAdmission.d.ts +53 -0
- package/dist/esm/internal/AttemptAdmission.d.ts.map +1 -0
- package/dist/esm/internal/AttemptAdmission.js +52 -0
- package/dist/esm/internal/AttemptAdmission.js.map +1 -0
- package/dist/esm/internal/AttemptLifecycle.d.ts +245 -0
- package/dist/esm/internal/AttemptLifecycle.d.ts.map +1 -0
- package/dist/esm/internal/AttemptLifecycle.js +104 -0
- package/dist/esm/internal/AttemptLifecycle.js.map +1 -0
- package/dist/esm/internal/AttemptProbe.d.ts +53 -0
- package/dist/esm/internal/AttemptProbe.d.ts.map +1 -0
- package/dist/esm/internal/AttemptProbe.js +83 -0
- package/dist/esm/internal/AttemptProbe.js.map +1 -0
- package/dist/esm/internal/CacheAdmission.d.ts +79 -0
- package/dist/esm/internal/CacheAdmission.d.ts.map +1 -0
- package/dist/esm/internal/CacheAdmission.js +72 -0
- package/dist/esm/internal/CacheAdmission.js.map +1 -0
- package/dist/esm/internal/CacheAgeHistory.d.ts +27 -0
- package/dist/esm/internal/CacheAgeHistory.d.ts.map +1 -0
- package/dist/esm/internal/CacheAgeHistory.js +49 -0
- package/dist/esm/internal/CacheAgeHistory.js.map +1 -0
- package/dist/esm/internal/CacheAgeVerdicts.d.ts +15 -0
- package/dist/esm/internal/CacheAgeVerdicts.d.ts.map +1 -0
- package/dist/esm/internal/CacheAgeVerdicts.js +54 -0
- package/dist/esm/internal/CacheAgeVerdicts.js.map +1 -0
- package/dist/esm/internal/CacheOutputPolicy.d.ts +24 -0
- package/dist/esm/internal/CacheOutputPolicy.d.ts.map +1 -0
- package/dist/esm/internal/CacheOutputPolicy.js +73 -0
- package/dist/esm/internal/CacheOutputPolicy.js.map +1 -0
- package/dist/esm/internal/CachePublication.d.ts +97 -0
- package/dist/esm/internal/CachePublication.d.ts.map +1 -0
- package/dist/esm/internal/CachePublication.js +116 -0
- package/dist/esm/internal/CachePublication.js.map +1 -0
- package/dist/esm/internal/CallFacts.d.ts +15 -0
- package/dist/esm/internal/CallFacts.d.ts.map +1 -0
- package/dist/esm/internal/CallFacts.js +83 -0
- package/dist/esm/internal/CallFacts.js.map +1 -0
- package/dist/esm/internal/CopiedRecord.d.ts +61 -0
- package/dist/esm/internal/CopiedRecord.d.ts.map +1 -0
- package/dist/esm/internal/CopiedRecord.js +165 -0
- package/dist/esm/internal/CopiedRecord.js.map +1 -0
- package/dist/esm/internal/DeferredPersistence.d.ts +108 -0
- package/dist/esm/internal/DeferredPersistence.d.ts.map +1 -0
- package/dist/esm/internal/DeferredPersistence.js +240 -0
- package/dist/esm/internal/DeferredPersistence.js.map +1 -0
- package/dist/esm/internal/EffectRecords.d.ts +92 -0
- package/dist/esm/internal/EffectRecords.d.ts.map +1 -0
- package/dist/esm/internal/EffectRecords.js +94 -0
- package/dist/esm/internal/EffectRecords.js.map +1 -0
- package/dist/esm/internal/EngineJj.d.ts +30 -0
- package/dist/esm/internal/EngineJj.d.ts.map +1 -0
- package/dist/esm/internal/EngineJj.js +29 -0
- package/dist/esm/internal/EngineJj.js.map +1 -0
- package/dist/esm/internal/EngineStateSchema.d.ts +68 -0
- package/dist/esm/internal/EngineStateSchema.d.ts.map +1 -0
- package/dist/esm/internal/EngineStateSchema.js +53 -0
- package/dist/esm/internal/EngineStateSchema.js.map +1 -0
- package/dist/esm/internal/ExecutionSnapshotRead.d.ts +162 -0
- package/dist/esm/internal/ExecutionSnapshotRead.d.ts.map +1 -0
- package/dist/esm/internal/ExecutionSnapshotRead.js +218 -0
- package/dist/esm/internal/ExecutionSnapshotRead.js.map +1 -0
- package/dist/esm/internal/ExecutionSnapshotRelations.d.ts +39 -0
- package/dist/esm/internal/ExecutionSnapshotRelations.d.ts.map +1 -0
- package/dist/esm/internal/ExecutionSnapshotRelations.js +81 -0
- package/dist/esm/internal/ExecutionSnapshotRelations.js.map +1 -0
- package/dist/esm/internal/ExitEncoding.d.ts +180 -0
- package/dist/esm/internal/ExitEncoding.d.ts.map +1 -0
- package/dist/esm/internal/ExitEncoding.js +361 -0
- package/dist/esm/internal/ExitEncoding.js.map +1 -0
- package/dist/esm/internal/FileBoundarySnapshot.d.ts +14 -0
- package/dist/esm/internal/FileBoundarySnapshot.d.ts.map +1 -0
- package/dist/esm/internal/FileBoundarySnapshot.js +29 -0
- package/dist/esm/internal/FileBoundarySnapshot.js.map +1 -0
- package/dist/esm/internal/FileEnumeration.d.ts +127 -0
- package/dist/esm/internal/FileEnumeration.d.ts.map +1 -0
- package/dist/esm/internal/FileEnumeration.js +236 -0
- package/dist/esm/internal/FileEnumeration.js.map +1 -0
- package/dist/esm/internal/HostReflection.d.ts +80 -0
- package/dist/esm/internal/HostReflection.d.ts.map +1 -0
- package/dist/esm/internal/HostReflection.js +98 -0
- package/dist/esm/internal/HostReflection.js.map +1 -0
- package/dist/esm/internal/JournalRecords.d.ts +325 -0
- package/dist/esm/internal/JournalRecords.d.ts.map +1 -0
- package/dist/esm/internal/JournalRecords.js +306 -0
- package/dist/esm/internal/JournalRecords.js.map +1 -0
- package/dist/esm/internal/NodeJournal.d.ts +157 -0
- package/dist/esm/internal/NodeJournal.d.ts.map +1 -0
- package/dist/esm/internal/NodeJournal.js +298 -0
- package/dist/esm/internal/NodeJournal.js.map +1 -0
- package/dist/esm/internal/Ordering.d.ts +14 -0
- package/dist/esm/internal/Ordering.d.ts.map +1 -0
- package/dist/esm/internal/Ordering.js +14 -0
- package/dist/esm/internal/Ordering.js.map +1 -0
- package/dist/esm/internal/PlanInputs.d.ts +14 -0
- package/dist/esm/internal/PlanInputs.d.ts.map +1 -0
- package/dist/esm/internal/PlanInputs.js +57 -0
- package/dist/esm/internal/PlanInputs.js.map +1 -0
- package/dist/esm/internal/PlanMerges.d.ts +178 -0
- package/dist/esm/internal/PlanMerges.d.ts.map +1 -0
- package/dist/esm/internal/PlanMerges.js +113 -0
- package/dist/esm/internal/PlanMerges.js.map +1 -0
- package/dist/esm/internal/ProvenanceSlot.d.ts +30 -0
- package/dist/esm/internal/ProvenanceSlot.d.ts.map +1 -0
- package/dist/esm/internal/ProvenanceSlot.js +39 -0
- package/dist/esm/internal/ProvenanceSlot.js.map +1 -0
- package/dist/esm/internal/ResultEnvelope.d.ts +88 -0
- package/dist/esm/internal/ResultEnvelope.d.ts.map +1 -0
- package/dist/esm/internal/ResultEnvelope.js +83 -0
- package/dist/esm/internal/ResultEnvelope.js.map +1 -0
- package/dist/esm/internal/RetentionOps.d.ts +414 -0
- package/dist/esm/internal/RetentionOps.d.ts.map +1 -0
- package/dist/esm/internal/RetentionOps.js +576 -0
- package/dist/esm/internal/RetentionOps.js.map +1 -0
- package/dist/esm/internal/RunCatalogOps.d.ts +118 -0
- package/dist/esm/internal/RunCatalogOps.d.ts.map +1 -0
- package/dist/esm/internal/RunCatalogOps.js +120 -0
- package/dist/esm/internal/RunCatalogOps.js.map +1 -0
- package/dist/esm/internal/RunCoordinator.d.ts +78 -0
- package/dist/esm/internal/RunCoordinator.d.ts.map +1 -0
- package/dist/esm/internal/RunCoordinator.js +115 -0
- package/dist/esm/internal/RunCoordinator.js.map +1 -0
- package/dist/esm/internal/RunDriver.d.ts +192 -0
- package/dist/esm/internal/RunDriver.d.ts.map +1 -0
- package/dist/esm/internal/RunDriver.js +2334 -0
- package/dist/esm/internal/RunDriver.js.map +1 -0
- package/dist/esm/internal/RunLifecycle.d.ts +22 -0
- package/dist/esm/internal/RunLifecycle.d.ts.map +1 -0
- package/dist/esm/internal/RunLifecycle.js +49 -0
- package/dist/esm/internal/RunLifecycle.js.map +1 -0
- package/dist/esm/internal/RunListing.d.ts +78 -0
- package/dist/esm/internal/RunListing.d.ts.map +1 -0
- package/dist/esm/internal/RunListing.js +146 -0
- package/dist/esm/internal/RunListing.js.map +1 -0
- package/dist/esm/internal/RunListingError.d.ts +35 -0
- package/dist/esm/internal/RunListingError.d.ts.map +1 -0
- package/dist/esm/internal/RunListingError.js +27 -0
- package/dist/esm/internal/RunListingError.js.map +1 -0
- package/dist/esm/internal/RuntimeGraph.d.ts +73 -0
- package/dist/esm/internal/RuntimeGraph.d.ts.map +1 -0
- package/dist/esm/internal/RuntimeGraph.js +182 -0
- package/dist/esm/internal/RuntimeGraph.js.map +1 -0
- package/dist/esm/internal/SandboxedExecution.d.ts +80 -0
- package/dist/esm/internal/SandboxedExecution.d.ts.map +1 -0
- package/dist/esm/internal/SandboxedExecution.js +107 -0
- package/dist/esm/internal/SandboxedExecution.js.map +1 -0
- package/dist/esm/internal/StateTransaction.d.ts +44 -0
- package/dist/esm/internal/StateTransaction.d.ts.map +1 -0
- package/dist/esm/internal/StateTransaction.js +54 -0
- package/dist/esm/internal/StateTransaction.js.map +1 -0
- package/dist/esm/internal/StepFacts.d.ts +14 -0
- package/dist/esm/internal/StepFacts.d.ts.map +1 -0
- package/dist/esm/internal/StepFacts.js +35 -0
- package/dist/esm/internal/StepFacts.js.map +1 -0
- package/dist/esm/internal/TypedEvents.d.ts +14 -0
- package/dist/esm/internal/TypedEvents.d.ts.map +1 -0
- package/dist/esm/internal/TypedEvents.js +14 -0
- package/dist/esm/internal/TypedEvents.js.map +1 -0
- package/dist/esm/migrations/0001_initial.d.ts +17 -0
- package/dist/esm/migrations/0001_initial.d.ts.map +1 -0
- package/dist/esm/migrations/0001_initial.js +41 -0
- package/dist/esm/migrations/0001_initial.js.map +1 -0
- package/dist/esm/migrations/0002_selection_store.d.ts +15 -0
- package/dist/esm/migrations/0002_selection_store.d.ts.map +1 -0
- package/dist/esm/migrations/0002_selection_store.js +34 -0
- package/dist/esm/migrations/0002_selection_store.js.map +1 -0
- package/dist/esm/migrations/0003_plan_inputs.d.ts +13 -0
- package/dist/esm/migrations/0003_plan_inputs.d.ts.map +1 -0
- package/dist/esm/migrations/0003_plan_inputs.js +70 -0
- package/dist/esm/migrations/0003_plan_inputs.js.map +1 -0
- package/dist/esm/migrations/0004_plan_environment.d.ts +14 -0
- package/dist/esm/migrations/0004_plan_environment.d.ts.map +1 -0
- package/dist/esm/migrations/0004_plan_environment.js +33 -0
- package/dist/esm/migrations/0004_plan_environment.js.map +1 -0
- package/dist/esm/migrations/0005_plan_merges.d.ts +14 -0
- package/dist/esm/migrations/0005_plan_merges.d.ts.map +1 -0
- package/dist/esm/migrations/0005_plan_merges.js +59 -0
- package/dist/esm/migrations/0005_plan_merges.js.map +1 -0
- package/dist/esm/migrations/0006_execution_listing.d.ts +15 -0
- package/dist/esm/migrations/0006_execution_listing.d.ts.map +1 -0
- package/dist/esm/migrations/0006_execution_listing.js +81 -0
- package/dist/esm/migrations/0006_execution_listing.js.map +1 -0
- package/dist/esm/migrations/0007_run_parent_sequence.d.ts +15 -0
- package/dist/esm/migrations/0007_run_parent_sequence.d.ts.map +1 -0
- package/dist/esm/migrations/0007_run_parent_sequence.js +18 -0
- package/dist/esm/migrations/0007_run_parent_sequence.js.map +1 -0
- package/dist/esm/migrations/0008_deferred_consumption.d.ts +16 -0
- package/dist/esm/migrations/0008_deferred_consumption.d.ts.map +1 -0
- package/dist/esm/migrations/0008_deferred_consumption.js +24 -0
- package/dist/esm/migrations/0008_deferred_consumption.js.map +1 -0
- package/dist/esm/migrations/0009_deferred_clock_facts.d.ts +24 -0
- package/dist/esm/migrations/0009_deferred_clock_facts.d.ts.map +1 -0
- package/dist/esm/migrations/0009_deferred_clock_facts.js +127 -0
- package/dist/esm/migrations/0009_deferred_clock_facts.js.map +1 -0
- package/dist/esm/migrations/0010_pending_cancellation.d.ts +15 -0
- package/dist/esm/migrations/0010_pending_cancellation.d.ts.map +1 -0
- package/dist/esm/migrations/0010_pending_cancellation.js +19 -0
- package/dist/esm/migrations/0010_pending_cancellation.js.map +1 -0
- package/dist/esm/test/TestStores.d.ts +89 -0
- package/dist/esm/test/TestStores.d.ts.map +1 -0
- package/dist/esm/test/TestStores.js +103 -0
- package/dist/esm/test/TestStores.js.map +1 -0
- package/docs/README.md +113 -0
- package/docs/api.md +1494 -0
- package/docs/concepts/attempts-and-replay.md +149 -0
- package/docs/concepts/cache-admission.md +265 -0
- package/docs/concepts/call-facts.md +86 -0
- package/docs/concepts/durable-waits.md +175 -0
- package/docs/concepts/execution-facts.md +90 -0
- package/docs/concepts/ownership-and-fencing.md +128 -0
- package/docs/concepts/step-boundaries.md +148 -0
- package/docs/concepts/workspace-transactions.md +199 -0
- package/docs/event-types.md +14 -0
- package/docs/guides/back-up-and-restore.md +164 -0
- package/docs/guides/collect-unreferenced-artifacts.md +128 -0
- package/docs/guides/compose-a-durable-engine.md +146 -0
- package/docs/guides/coordinate-two-processes.md +120 -0
- package/docs/guides/defer-work-with-selection.md +171 -0
- package/docs/guides/delete-old-run-history.md +154 -0
- package/docs/guides/drive-a-plan.md +314 -0
- package/docs/guides/observe-engine-metrics.md +98 -0
- package/docs/guides/observe-executions.md +187 -0
- package/docs/guides/reclaim-runs-from-a-dead-host.md +133 -0
- package/docs/guides/share-a-cache-across-machines.md +134 -0
- package/docs/guides/testing.md +123 -0
- package/docs/installation.md +102 -0
- package/docs/quickstart.md +215 -0
- package/docs/troubleshooting.md +347 -0
- package/package.json +438 -3
- package/src/ArtifactGc.ts +408 -0
- package/src/ArtifactSync.ts +278 -0
- package/src/CacheSync.ts +131 -0
- package/src/DeferredClockFold.ts +586 -0
- package/src/DisasterRecovery.ts +888 -0
- package/src/DurableEngineState.ts +2656 -0
- package/src/EngineStore.ts +656 -0
- package/src/EngineStoreMetrics.ts +331 -0
- package/src/Errors.ts +28 -0
- package/src/EventTypes.ts +27 -0
- package/src/ExecutionFacts.ts +125 -0
- package/src/ExecutionSnapshot.ts +186 -0
- package/src/Inconsistency.ts +253 -0
- package/src/Migrations.ts +95 -0
- package/src/OwnerIdentity.ts +125 -0
- package/src/PlanInputStore.ts +292 -0
- package/src/PlanMergeStore.ts +330 -0
- package/src/PlanScheduler.ts +1806 -0
- package/src/Reconciliation.ts +224 -0
- package/src/ReplayOnly.ts +95 -0
- package/src/Retention.ts +214 -0
- package/src/RunCatalogRead.ts +27 -0
- package/src/RunChangeFeed.ts +125 -0
- package/src/RunState.ts +137 -0
- package/src/Selection.ts +683 -0
- package/src/SelectionStore.ts +353 -0
- package/src/StepBoundary.ts +1165 -0
- package/src/StepCacheFold.ts +244 -0
- package/src/StepSandbox.ts +110 -0
- package/src/WakeBus.ts +167 -0
- package/src/WorkspaceSandbox.ts +1604 -0
- package/src/index.ts +185 -0
- package/src/internal/ActionPersistence.ts +2687 -0
- package/src/internal/ArtifactRoots.ts +92 -0
- package/src/internal/AttemptAdmission.ts +76 -0
- package/src/internal/AttemptLifecycle.ts +163 -0
- package/src/internal/AttemptProbe.ts +90 -0
- package/src/internal/CacheAdmission.ts +133 -0
- package/src/internal/CacheAgeHistory.ts +58 -0
- package/src/internal/CacheAgeVerdicts.ts +61 -0
- package/src/internal/CacheOutputPolicy.ts +82 -0
- package/src/internal/CachePublication.ts +153 -0
- package/src/internal/CallFacts.ts +87 -0
- package/src/internal/CopiedRecord.ts +201 -0
- package/src/internal/DeferredPersistence.ts +459 -0
- package/src/internal/EffectRecords.ts +136 -0
- package/src/internal/EngineJj.ts +30 -0
- package/src/internal/EngineStateSchema.ts +92 -0
- package/src/internal/ExecutionSnapshotRead.ts +298 -0
- package/src/internal/ExecutionSnapshotRelations.ts +121 -0
- package/src/internal/ExitEncoding.ts +453 -0
- package/src/internal/FileBoundarySnapshot.ts +39 -0
- package/src/internal/FileEnumeration.ts +334 -0
- package/src/internal/HostReflection.ts +128 -0
- package/src/internal/JournalRecords.ts +396 -0
- package/src/internal/NodeJournal.ts +340 -0
- package/src/internal/Ordering.ts +14 -0
- package/src/internal/PlanInputs.ts +62 -0
- package/src/internal/PlanMerges.ts +123 -0
- package/src/internal/ProvenanceSlot.ts +52 -0
- package/src/internal/ResultEnvelope.ts +118 -0
- package/src/internal/RetentionOps.ts +865 -0
- package/src/internal/RunCatalogOps.ts +174 -0
- package/src/internal/RunCoordinator.ts +215 -0
- package/src/internal/RunDriver.ts +3152 -0
- package/src/internal/RunLifecycle.ts +53 -0
- package/src/internal/RunListing.ts +210 -0
- package/src/internal/RunListingError.ts +37 -0
- package/src/internal/RuntimeGraph.ts +253 -0
- package/src/internal/SandboxedExecution.ts +165 -0
- package/src/internal/StateTransaction.ts +71 -0
- package/src/internal/StepFacts.ts +36 -0
- package/src/internal/TypedEvents.ts +29 -0
- package/src/migrations/0001_initial.ts +51 -0
- package/src/migrations/0002_selection_store.ts +38 -0
- package/src/migrations/0003_plan_inputs.ts +75 -0
- package/src/migrations/0004_plan_environment.ts +34 -0
- package/src/migrations/0005_plan_merges.ts +60 -0
- package/src/migrations/0006_execution_listing.ts +86 -0
- package/src/migrations/0007_run_parent_sequence.ts +19 -0
- package/src/migrations/0008_deferred_consumption.ts +27 -0
- package/src/migrations/0009_deferred_clock_facts.ts +163 -0
- package/src/migrations/0010_pending_cancellation.ts +20 -0
- package/src/test/TestStores.ts +145 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reclaim runs from a dead host"
|
|
3
|
+
description: "Choose an isAlive check for your deployment, understand what evidence each takeover records, and read the journal to see why a steal was admitted or refused."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A process that is killed with SIGKILL leaves its runs `running` with a frozen
|
|
9
|
+
heartbeat. Nothing else revisits such a run on its own: it has no waiting row,
|
|
10
|
+
no pending clock, and no future deferred completion. This guide is about
|
|
11
|
+
choosing how aggressively another process may take those runs over.
|
|
12
|
+
|
|
13
|
+
## Choose an isAlive check
|
|
14
|
+
|
|
15
|
+
`isAlive` on `EngineStore.Options` is consulted before this store steals a run
|
|
16
|
+
whose lease has expired. Answering `true` refuses the takeover.
|
|
17
|
+
|
|
18
|
+
**Take the default when you have no better evidence.** Omit the option and the
|
|
19
|
+
store uses `Ownership.leaseLiveness(Ownership.heartbeatStaleAfter)`: the owner
|
|
20
|
+
is alive while its persisted heartbeat is younger than the staleness cutoff,
|
|
21
|
+
and gone once it is not.
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { EngineStore } from "@smthrs/engine-store"
|
|
25
|
+
|
|
26
|
+
const engine = EngineStore.layer({
|
|
27
|
+
owner: { hostId: "worker-a" },
|
|
28
|
+
journalSource: "worker-a-engine"
|
|
29
|
+
})
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
This is enough to reclaim from a hard kill without any application code, and
|
|
33
|
+
the steal it admits carries `lease-expired` evidence, which `RunStore.steal`
|
|
34
|
+
re-checks against the row inside the same write. A claimant that lies about the
|
|
35
|
+
lease loses the compare-and-swap.
|
|
36
|
+
|
|
37
|
+
**Probe the process table on a single machine.** When every engine over a
|
|
38
|
+
database runs on one host, ask that host:
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { Ownership } from "@smthrs/run-store"
|
|
42
|
+
|
|
43
|
+
const engine = EngineStore.layer({
|
|
44
|
+
owner: { hostId: "worker-a" },
|
|
45
|
+
journalSource: "worker-a-engine",
|
|
46
|
+
isAlive: Ownership.sameHostPidProbe
|
|
47
|
+
})
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
A second process over the same file then cannot take a run out of a live one,
|
|
51
|
+
even while that process is busy enough to miss a heartbeat.
|
|
52
|
+
|
|
53
|
+
**Write your own for a multi-host deployment.** A supplied check receives the
|
|
54
|
+
recorded owner and a `LivenessContext` of `{ claimant, heartbeatAtMs, nowMs }`.
|
|
55
|
+
Guard any pid read with `Ownership.sameHostIncarnation(owner, claimant)`,
|
|
56
|
+
because a pid names a process only inside its own host's namespace. An
|
|
57
|
+
orchestrator that reports pod liveness is the other shape this takes.
|
|
58
|
+
|
|
59
|
+
Do not write a check that returns `false` without asking anything. That says
|
|
60
|
+
"the owner is gone" about an owner it never looked at, and the engine steals
|
|
61
|
+
runs out of live processes on the strength of it.
|
|
62
|
+
|
|
63
|
+
## Read the journal to see what happened
|
|
64
|
+
|
|
65
|
+
Every arbitration is recorded. Query the run's entries and look for two event
|
|
66
|
+
types:
|
|
67
|
+
|
|
68
|
+
| Record | `evidence` | Meaning |
|
|
69
|
+
| --------------------------- | ------------------------------ | -------------------------------------------------------------- |
|
|
70
|
+
| `steal-refused-owner-alive` | `lease-fresh` | The lease was still inside the window; no probe was consulted. |
|
|
71
|
+
| `steal-refused-owner-alive` | `probe` | Your `isAlive` check answered for the owner. |
|
|
72
|
+
| `stolen-and-activated` | `lease-expired` | The lease expired and nothing refused it. |
|
|
73
|
+
| `stolen-and-activated` | `same-host-pid-dead` | A same-host probe found the process gone. |
|
|
74
|
+
| `stolen-and-activated` | `cross-host-unreachable-stale` | The owner was on another host and unreachable past the window. |
|
|
75
|
+
|
|
76
|
+
Refusals are deduplicated by run, refused owner, lease, and evidence, so a run
|
|
77
|
+
refused every second for an hour produces one record per distinct reason, not
|
|
78
|
+
thousands. Seeing both a `lease-fresh` and a `probe` refusal for one lease is
|
|
79
|
+
normal: the first is a wake arriving while the owner still pulses, the second
|
|
80
|
+
is the same owner alive but stalled past the window.
|
|
81
|
+
|
|
82
|
+
## What the sweep does with a stale run
|
|
83
|
+
|
|
84
|
+
The driver's periodic sweep runs on the heartbeat cadence and re-drives three
|
|
85
|
+
shapes through the ordinary claim, steal, and activate path: parked runs whose
|
|
86
|
+
cancellation was durably requested, runs parked with reason `released` by a
|
|
87
|
+
shutdown, and stale `running` rows left by a hard-killed owner.
|
|
88
|
+
|
|
89
|
+
The stale sweep reads a batch of 64 rows, oldest heartbeat first, and reads past
|
|
90
|
+
exactly the rows it is going to skip. Each refusal defers that run for two
|
|
91
|
+
heartbeat ticks, doubling per consecutive refusal against the same lease, capped
|
|
92
|
+
at the staleness cutoff. A deferral is forgotten as soon as the row leaves the
|
|
93
|
+
stale window, so a fresh stall under a new lease is probed on the first tick
|
|
94
|
+
that sees it.
|
|
95
|
+
|
|
96
|
+
## Check a run's own view
|
|
97
|
+
|
|
98
|
+
`DurableEngineState` answers directly, which is useful in a diagnostic tool:
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
import { DurableEngineState } from "@smthrs/engine-store"
|
|
102
|
+
import * as Effect from "effect/Effect"
|
|
103
|
+
|
|
104
|
+
const stalled = (staleBeforeMs: number) =>
|
|
105
|
+
Effect.gen(function*() {
|
|
106
|
+
const state = yield* DurableEngineState.DurableEngineState
|
|
107
|
+
const stale = yield* state.staleRunningRuns(staleBeforeMs, 64)
|
|
108
|
+
const parked = yield* state.waitingRuns({ reason: "released" })
|
|
109
|
+
return { stale, parked }
|
|
110
|
+
})
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`staleRunningRuns` returns runs still `running` whose heartbeat froze before
|
|
114
|
+
the horizon, each with that heartbeat. `waitingRuns(filter)` returns parked runs matching a reason, a
|
|
115
|
+
`dueBeforeMs` bound, or a `cancelRequested` predicate. Results sort by ascending
|
|
116
|
+
`wakeAt`, with untimed waits (`wakeAt: null`) after every timed wait and ties
|
|
117
|
+
broken by `runId`. A `dueBeforeMs` bound includes matching deadlines and excludes
|
|
118
|
+
untimed waits.
|
|
119
|
+
|
|
120
|
+
## A restored backup needs an explicit fence
|
|
121
|
+
|
|
122
|
+
Restoring does not clear ownership: a restored database still carries the owner
|
|
123
|
+
tokens that were live when the backup was taken. Run
|
|
124
|
+
`DisasterRecovery.fence(manifest)` against the restored file before any engine
|
|
125
|
+
adopts it, or use `restoreAndFence`, which does both. See
|
|
126
|
+
[Back up and restore the store](./back-up-and-restore.md).
|
|
127
|
+
|
|
128
|
+
## Related
|
|
129
|
+
|
|
130
|
+
- [Ownership and fencing](../concepts/ownership-and-fencing.md): the model
|
|
131
|
+
behind this task.
|
|
132
|
+
- [Ownership](/docs/concepts/ownership/) on smithers.sh: the same story from
|
|
133
|
+
the run store's side.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Share a step cache across machines"
|
|
3
|
+
description: "Wire ArtifactSync and CacheSync onto a shared tier so one machine's sealed result serves another, and choose how eagerly a replay downloads the artifacts it references."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 4
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
By default a recorded step result is local. Two seams turn it into a shared one:
|
|
9
|
+
`ArtifactSync` publishes the blobs the result references, and `CacheSync`
|
|
10
|
+
publishes the result entry itself. Both are absent by default, which is what
|
|
11
|
+
keeps a purely local engine free of any remote-cache machinery.
|
|
12
|
+
|
|
13
|
+
## Trust every writer of the shared tier
|
|
14
|
+
|
|
15
|
+
A shared step-result tier is trusted to write into your workspace. A hit
|
|
16
|
+
replays the entry's boundary evidence through `StepBoundary.replayOutputs`: it
|
|
17
|
+
writes each recorded output, deletes each path recorded with `digest: null`,
|
|
18
|
+
and prunes files under a recorded tree that the entry does not list. The
|
|
19
|
+
integrity checks are self-consistent, not authenticating: inline bytes are
|
|
20
|
+
checked against the digest recorded in the same entry, and blobs against their
|
|
21
|
+
own address. Replay refuses paths outside the workspace, but inside it an entry
|
|
22
|
+
chooses both the path and the content that lands on every machine that hits it.
|
|
23
|
+
|
|
24
|
+
Only producers you trust as much as your own machines may write to the tier.
|
|
25
|
+
This is the trust model of Bazel's remote cache.
|
|
26
|
+
|
|
27
|
+
- Give consumers read-only credentials, and grant write access only to the
|
|
28
|
+
machines whose results you would run anyway, such as CI.
|
|
29
|
+
- Use a separate tier per tenant or trust level rather than one tier shared
|
|
30
|
+
across them.
|
|
31
|
+
|
|
32
|
+
A stronger property, accepting entries only from named producers, needs signed
|
|
33
|
+
provenance on the entry. Another digest check cannot provide it.
|
|
34
|
+
|
|
35
|
+
## Publish artifacts before entries
|
|
36
|
+
|
|
37
|
+
Provide `ArtifactSync` with a shared `ArtifactStore`. The two tiers cannot both
|
|
38
|
+
be layers, because they inhabit the same tag and composing both would shadow
|
|
39
|
+
one, so the shared tier arrives as an effect:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { ArtifactSync } from "@smthrs/engine-store"
|
|
43
|
+
|
|
44
|
+
const artifacts = ArtifactSync.layer(remoteArtifactStore, { downloadPolicy: "all" })
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`layer` takes the local tier from the `ArtifactStore` tag and the shared tier
|
|
48
|
+
from the effect. `ArtifactSync.make({ local, remote, downloadPolicy })` is the
|
|
49
|
+
same thing without the layer.
|
|
50
|
+
|
|
51
|
+
`publish(digests)` runs `findMissing` on the shared tier, uploads what is
|
|
52
|
+
missing, and re-probes to confirm. It is called immediately before the
|
|
53
|
+
transaction that records the cache entry, and never inside it. A publication
|
|
54
|
+
that cannot make the artifacts durable fails with `ArtifactPublicationFailed`
|
|
55
|
+
and the shared entry is withheld.
|
|
56
|
+
|
|
57
|
+
## Publish entries after they are durable
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { CacheSync } from "@smthrs/engine-store"
|
|
61
|
+
|
|
62
|
+
const entries = CacheSync.layer(remoteCacheStore)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`publishEntry(entry)` reports a refusal rather than failing: `Option.none()`
|
|
66
|
+
means the entry is now shared, and `Option.some(error)` means it is not, and
|
|
67
|
+
why. A `Conflict` from the shared tier is not reported at all, because it means
|
|
68
|
+
another machine recorded the key first, which is exactly the first-writer-wins
|
|
69
|
+
outcome a shared tier exists to arbitrate.
|
|
70
|
+
|
|
71
|
+
Compose it with `CombinedCacheStore` in `"deferred"` publication mode, which is
|
|
72
|
+
the mode that leaves the shared write to this seam. Lookups stay read-through
|
|
73
|
+
either way.
|
|
74
|
+
|
|
75
|
+
## Neither seam can fail a run
|
|
76
|
+
|
|
77
|
+
Both run after `attempts.finish`, so the result is already durably recorded on
|
|
78
|
+
this host. A refusal withholds the shared copy, never the local row, and
|
|
79
|
+
journals a `cache-provenance` record with `action: "unpublished"` carrying the
|
|
80
|
+
stage (`artifacts` or `entry`) and the reason. A missing shared entry is
|
|
81
|
+
therefore explainable from the journal rather than inferred from its absence.
|
|
82
|
+
|
|
83
|
+
## Choose a download policy
|
|
84
|
+
|
|
85
|
+
`hydrate(digests)` establishes that this host can resolve every referenced
|
|
86
|
+
artifact and reports whether the replay is now worth retrying. It never fails a
|
|
87
|
+
run: a shared tier that is down must not stop work that can simply be done.
|
|
88
|
+
|
|
89
|
+
How eagerly it materializes is `downloadPolicy`. Declare it once on the shared
|
|
90
|
+
tier as `RemoteArtifacts.Options.downloadPolicy` and both seams read it; pass it
|
|
91
|
+
explicitly to `make` or `layer` to override.
|
|
92
|
+
|
|
93
|
+
| Policy | Choose it when |
|
|
94
|
+
| --------------- | -------------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| `all` (default) | You want every later read to be local and want a shared tier outage after admission to cost nothing. |
|
|
96
|
+
| `toplevel` | You read a small subset of a large output set and compose `CombinedArtifacts` over the same remote tier. |
|
|
97
|
+
| `minimal` | The same, and you do not want this host accumulating other machines' artifacts. |
|
|
98
|
+
|
|
99
|
+
The two lazy policies are sound only when the store the replay reads through can
|
|
100
|
+
reach the shared tier, which means `CombinedArtifacts` with the same remote
|
|
101
|
+
tier. Under a purely local `ArtifactStore` an admitted lazy replay would later
|
|
102
|
+
read an artifact this host never fetched.
|
|
103
|
+
|
|
104
|
+
## Fall back to local explicitly
|
|
105
|
+
|
|
106
|
+
`ArtifactSync.layerLocal` and `CacheSync.layerLocal` are the single-tier
|
|
107
|
+
implementations: publish is a no-op and hydrate reports nothing arrived. They
|
|
108
|
+
are what the engine falls back to when the tags are absent, and providing them
|
|
109
|
+
explicitly says "this composition is local on purpose".
|
|
110
|
+
|
|
111
|
+
## Make sure the results are shareable at all
|
|
112
|
+
|
|
113
|
+
Publishing does nothing for a result that was never admitted to the cache. A
|
|
114
|
+
record is admitted only when the action is sealed, the boundary is hard, no
|
|
115
|
+
deviation occurred, and the evidence carries `wholeTreeWritesVerified: true`.
|
|
116
|
+
Under the production composition that flag comes from
|
|
117
|
+
`WorkspaceSandbox.layerFileSystem()`, so a composition with `StepBoundary.layer`
|
|
118
|
+
and no sandbox produces run-local results however the sync seams are wired. See
|
|
119
|
+
[Cache admission](../concepts/cache-admission.md).
|
|
120
|
+
|
|
121
|
+
## What a replay does when the bytes are missing
|
|
122
|
+
|
|
123
|
+
A verified hit calls `replayOutputs` before returning the stored result. When
|
|
124
|
+
that refuses with `MissingArtifact`, the normal first answer for a row recorded
|
|
125
|
+
on a machine whose artifacts this one has never seen, the dispatch hydrates from
|
|
126
|
+
the shared tier and retries the replay exactly once before falling through to a
|
|
127
|
+
real execution.
|
|
128
|
+
|
|
129
|
+
## Related
|
|
130
|
+
|
|
131
|
+
- [Cache admission](../concepts/cache-admission.md): the ordering argument and
|
|
132
|
+
the verification that runs before a hit is served.
|
|
133
|
+
- [Artifacts and the cache](/docs/guides/artifacts-cache/) on smithers.sh: the
|
|
134
|
+
operator-facing version.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Test against a durable store"
|
|
3
|
+
description: "Build every durable engine service over one migrated database, choose between the in-memory and file-backed bundles, and use the deterministic layers each seam ships."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 11
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Everything nondeterministic in this package is a service, so a test swaps the
|
|
9
|
+
service rather than the code. This guide is the checklist.
|
|
10
|
+
|
|
11
|
+
## Start from TestStores
|
|
12
|
+
|
|
13
|
+
`@smthrs/engine-store/test/TestStores` builds every durable engine service over
|
|
14
|
+
one database, with this package's composed migration set already installed:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import * as TestStores from "@smthrs/engine-store/test/TestStores"
|
|
18
|
+
|
|
19
|
+
const stores = TestStores.layer()
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`layer(options?)` uses a private in-memory database and keeps `SqlClient` to
|
|
23
|
+
itself, which is what a case that only needs an engine wants. It provides the
|
|
24
|
+
SQL journal, the run store, the attempt store, the cache store, the plan store,
|
|
25
|
+
and `OwnerIdentity.layer`.
|
|
26
|
+
|
|
27
|
+
`OwnerIdentity.layer` rides along rather than a pinned identity, so a test
|
|
28
|
+
observes the same fresh-per-incarnation owner the production composition mints.
|
|
29
|
+
Pin it with `OwnerIdentity.layerConstant(owner)` when a test needs to assert on
|
|
30
|
+
the token itself.
|
|
31
|
+
|
|
32
|
+
`TestStoresOptions` forwards `capacity`, `overflow`, and `batchSize` to the
|
|
33
|
+
journal, for a test that wants to observe a saturated queue.
|
|
34
|
+
|
|
35
|
+
## Take the connection when you need it
|
|
36
|
+
|
|
37
|
+
`TestStores.databaseAt(filename)` is the migrated database alone, and
|
|
38
|
+
`TestStores.layerAt(filename, options?)` is the full bundle with the `SqlClient`
|
|
39
|
+
connection and `DurableEngineState` re-exported. Two shapes need it:
|
|
40
|
+
|
|
41
|
+
- Adding another SQL-backed service, a control runtime for instance, over the
|
|
42
|
+
same database as the engine.
|
|
43
|
+
- Pointing two independently constructed bundles at one file, which gives two
|
|
44
|
+
connections, two engines, and no shared object graph. That is what a second
|
|
45
|
+
process actually has.
|
|
46
|
+
|
|
47
|
+
Use a real file for the second case. `:memory:` gives each connection its own
|
|
48
|
+
private database, so it cannot prove anything durable across compositions. Pass
|
|
49
|
+
`:memory:` to `layerAt` only when you want the cheap variant and still need the
|
|
50
|
+
connection.
|
|
51
|
+
|
|
52
|
+
`TestStores.database` is the in-memory migrated database exposed as `SqlClient`
|
|
53
|
+
and `DurableWriter`.
|
|
54
|
+
|
|
55
|
+
## The deterministic layer for each seam
|
|
56
|
+
|
|
57
|
+
| Seam | Deterministic layer | What it does |
|
|
58
|
+
| -------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
+
| `DurableEngineState` | `layerMemory` | An in-memory implementation that, given a `runs` lookup, enforces the same park, wake, and clock ownership fences as the SQL layer. |
|
|
60
|
+
| `StepBoundary` | `layerTest(options)` | Supports explicit `failure` or `deviation` fixtures, replay, and `readSnapshot` assertions. |
|
|
61
|
+
| `WorkspaceSandbox` | `makeMemory(initialFiles)` | Deterministic and browser-safe, and the conformance implementation. |
|
|
62
|
+
| `StepSandbox` | `layerTest(initialFiles)` | The same transaction behind the scope-safe front door. |
|
|
63
|
+
| `StepSandbox` | `layerNoop` | Fails closed with `UnsupportedBoundary`, which models a host that cannot sandbox. |
|
|
64
|
+
| `WakeBus` | `layerNoop(overrides?)` | Drops every wake, so every resume travels the polling fallback. |
|
|
65
|
+
| `Inconsistency` | `layerNoop(overrides?)` | Journals nothing and tolerates everything. |
|
|
66
|
+
| `Selection` | `layerNoop` | Admits every candidate. |
|
|
67
|
+
| `Reconciliation` | `layerDefault` | The deterministic verdict function. |
|
|
68
|
+
| `ArtifactSync` | `layerLocal` | Publish is a no-op; hydrate reports nothing arrived. |
|
|
69
|
+
| `CacheSync` | `layerLocal` | A recorded entry is already everywhere it will be. |
|
|
70
|
+
| `OwnerIdentity` | `layerConstant(owner)` | Pins the whole owner token. |
|
|
71
|
+
|
|
72
|
+
Both `DurableEngineState` implementations answer one behavior contract, so the
|
|
73
|
+
memory twin cannot drift from the SQL one and a test written against the twin
|
|
74
|
+
holds for the SQL store. The suite that pins them,
|
|
75
|
+
[`DurableEngineStateContract.ts`](https://github.com/smithersai/smithers/blob/main/packages/smithers/flows/engine-store/test/contract/DurableEngineStateContract.ts),
|
|
76
|
+
is not part of the published package. Copy it into your own project to run it
|
|
77
|
+
against a third implementation you write.
|
|
78
|
+
|
|
79
|
+
## What not to stub
|
|
80
|
+
|
|
81
|
+
Do not replace `StepBoundary.layer` with `layerTest` and then assert on cache
|
|
82
|
+
sharing. `layerTest` defaults `wholeTreeWriteDetection` to `true`, which is a
|
|
83
|
+
fixture claim rather than a proof, and nothing composed that way ever proves the
|
|
84
|
+
cross-run admission path. Use `StepBoundary.layer` with
|
|
85
|
+
`WorkspaceSandbox.layerFileSystem()` when the cache behavior is what you are
|
|
86
|
+
testing.
|
|
87
|
+
|
|
88
|
+
Do not stub the liveness check with a function that returns `false` without
|
|
89
|
+
asking. That is not a test double, it is a different, wrong policy: it says the
|
|
90
|
+
owner is gone about an owner it never looked at.
|
|
91
|
+
|
|
92
|
+
## Assert on the durable evidence
|
|
93
|
+
|
|
94
|
+
The journal is the record, so most assertions read it back:
|
|
95
|
+
|
|
96
|
+
- Claim arbitration writes `steal-refused-owner-alive` or
|
|
97
|
+
`stolen-and-activated`, each with its `evidence` kind.
|
|
98
|
+
- A refused cache hit writes `cache-provenance` with
|
|
99
|
+
`action: "stale_read_set"`; a withheld shared entry writes the same record
|
|
100
|
+
with `action: "unpublished"` and the stage that refused.
|
|
101
|
+
- The scheduler writes `plan-recorded`, `subgraph-appended`, `node-scheduled`,
|
|
102
|
+
`node-settled`, `node-invalidated`, and `selection-deferred`. A node record
|
|
103
|
+
names the tag its node dispatches under `action`, and a plan record carries
|
|
104
|
+
the graph under `graph.nodes`.
|
|
105
|
+
- An interpreted flow writes the same records through `FlowRuntime.recordNode`,
|
|
106
|
+
addressed by a replay-stable `sourceId`, so a resumed walk holds one row per
|
|
107
|
+
node instead of one per observation. `@smthrs/journal`'s `EngineEvent` module
|
|
108
|
+
publishes the payload schema for every one of them.
|
|
109
|
+
- A workspace transaction writes `diff-bundle-captured` and
|
|
110
|
+
`copy-back-settled`.
|
|
111
|
+
|
|
112
|
+
`EngineStoreMetrics` is the other observable surface, and its counters are
|
|
113
|
+
attributed by outcome, so a test can assert that a dispatch settled as a
|
|
114
|
+
`VerifiedHit` rather than inferring it from timing.
|
|
115
|
+
|
|
116
|
+
## Related
|
|
117
|
+
|
|
118
|
+
- [Coordinate two processes](./coordinate-two-processes.md): the two-connection
|
|
119
|
+
pattern in full.
|
|
120
|
+
- [Compose a durable engine](./compose-a-durable-engine.md): the production
|
|
121
|
+
composition these layers substitute into.
|
|
122
|
+
|
|
123
|
+
Test filesystem classification with `StepBoundary.layer` over an in-memory `FileSystem` and `ArtifactStore`. `layerTest` returns supplied settlement evidence or failure verbatim; it does not classify changed paths, missing outputs, or surviving removals.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Installation"
|
|
3
|
+
description: "Install @smthrs/engine-store, its runtime requirements and import forms, the storage packages a runnable composition adds, and the browser boundary."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Install the package
|
|
9
|
+
|
|
10
|
+
Not on npm yet; see [Installation](https://github.com/smithersai/smithers/blob/main/packages/smithers/flows/flow/docs/installation.md#use-the-libraries).
|
|
11
|
+
|
|
12
|
+
The package requires Node.js 26.4.0 or later and ships as both ESM and
|
|
13
|
+
CommonJS with TypeScript declarations. Its runtime dependencies, including
|
|
14
|
+
[`effect`](https://effect.website) and the `@smthrs/*` storage packages it
|
|
15
|
+
composes, install with it. Every surface on this site is an Effect service:
|
|
16
|
+
`layer` values you compose and `Effect` values you run.
|
|
17
|
+
|
|
18
|
+
## Import forms
|
|
19
|
+
|
|
20
|
+
The root entry point re-exports every module as a namespace:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { DurableEngineState, EngineStore, Migrations, StepBoundary, WorkspaceSandbox } from "@smthrs/engine-store"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Each module is also importable from its own subpath, which is the form the API
|
|
27
|
+
reference uses:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import * as EngineStore from "@smthrs/engine-store/EngineStore"
|
|
31
|
+
import * as Retention from "@smthrs/engine-store/Retention"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Three subpath forms are not public and are blocked in the export map:
|
|
35
|
+
`@smthrs/engine-store/internal/*`, `@smthrs/engine-store/migrations/*`, and
|
|
36
|
+
`@smthrs/engine-store/*/index`. `@smthrs/engine-store/package.json` is exported.
|
|
37
|
+
|
|
38
|
+
The deterministic store bundle for tests lives at
|
|
39
|
+
`@smthrs/engine-store/test/TestStores`. See
|
|
40
|
+
[Test against a durable store](./guides/testing.md).
|
|
41
|
+
|
|
42
|
+
## What a runnable composition adds
|
|
43
|
+
|
|
44
|
+
This package composes storage rather than providing it. A composition that
|
|
45
|
+
executes a flow supplies the four stores, a database, an artifact store, a
|
|
46
|
+
workspace root, and a platform.
|
|
47
|
+
|
|
48
|
+
| Package | What it supplies |
|
|
49
|
+
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| [`@smthrs/journal`](/api/journal) | `Journal`, the durable event log every engine decision is written to. |
|
|
51
|
+
| [`@smthrs/run-store`](/api/run-store) | `RunStore` and `AttemptStore`, the run rows and attempt rows ownership is fenced on, plus the `Ownership` liveness helpers. |
|
|
52
|
+
| [`@smthrs/step-cache`](/api/step-cache) | `CacheStore`, the content-addressed step result cache. |
|
|
53
|
+
| [`@smthrs/database`](/api/database) | `SqlClient` and `DurableWriter`, and the `Migrations` runner the schema installs through. |
|
|
54
|
+
| [`@smthrs/artifacts`](/api/artifacts) | `ArtifactStore`, where outputs too large to inline are spilled by digest. |
|
|
55
|
+
| [`@smthrs/kernel`](/api/kernel) | `Jj` for snapshot boundaries and `Workspace` for the workspace root. |
|
|
56
|
+
| [`@smthrs/plan`](/api/plan) | `PlanStore`, required only when you drive plans with `PlanScheduler`. |
|
|
57
|
+
|
|
58
|
+
[`@smthrs/flows`](/api/flows) ships `NodeRuntime`, which wires all of the above
|
|
59
|
+
over one SQLite file. Reach for it when you want the composition rather than
|
|
60
|
+
control over it; reach for `EngineStore.layer` when you are building a host.
|
|
61
|
+
|
|
62
|
+
## Install the schema before anything reads it
|
|
63
|
+
|
|
64
|
+
`Migrations.sets` is the complete durable engine schema in dependency order
|
|
65
|
+
(journal, run store, step cache, this package's own tables, then the plan
|
|
66
|
+
store), and `Migrations.layer` installs it:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { DurableWriter } from "@smthrs/database"
|
|
70
|
+
import * as NodeDatabase from "@smthrs/database/node/NodeDatabase"
|
|
71
|
+
import { Migrations } from "@smthrs/engine-store"
|
|
72
|
+
import * as Layer from "effect/Layer"
|
|
73
|
+
|
|
74
|
+
const database = (filename: string) =>
|
|
75
|
+
Layer.provideMerge(
|
|
76
|
+
Migrations.layer,
|
|
77
|
+
Layer.provideMerge(DurableWriter.layer(), NodeDatabase.layer({ filename }))
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Provide the stores over that layer, never beside it: a store built before the
|
|
82
|
+
migration runs reads a table that does not exist yet.
|
|
83
|
+
|
|
84
|
+
## The browser boundary
|
|
85
|
+
|
|
86
|
+
This entry point bundles for a browser. The two host reads it once made
|
|
87
|
+
directly, `process.pid` and `randomUUID` from `node:crypto`, enter through the
|
|
88
|
+
injectable `OwnerIdentity` service, and every package it composes is
|
|
89
|
+
browser-bundleable. A release that broke the bundle would fail the build before
|
|
90
|
+
it shipped.
|
|
91
|
+
|
|
92
|
+
Bundling is not running. The only durable backing shipped here is local SQLite
|
|
93
|
+
through Node.js `node:sqlite` and `@effect/sql-sqlite-node`. A browser or edge
|
|
94
|
+
deployment can import the types and the browser-safe in-memory helpers
|
|
95
|
+
(`DurableEngineState.layerMemory`, `WorkspaceSandbox.makeMemory`,
|
|
96
|
+
`StepSandbox.layerNoop`), but cannot execute durable flows. Supplying an
|
|
97
|
+
alternative browser SQL client is not a supported runtime.
|
|
98
|
+
|
|
99
|
+
## Next step
|
|
100
|
+
|
|
101
|
+
Compose the engine and run a flow twice over one file in the
|
|
102
|
+
[Quickstart](./quickstart.md).
|