@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,314 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Drive a plan to completion"
|
|
3
|
+
description: "Record a plan, supply a node executor, run the graph, and read every node's outcome: admission caps, rebase budgets, conflict strategies, and reconciliation verdicts."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 3
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
`PlanScheduler` drives a persisted [`@smthrs/plan`](/api/plan) plan. It owns
|
|
9
|
+
identity, admission, caching, and journaling, and deliberately owns nothing
|
|
10
|
+
about what a node means: turning a node into work is the one seam you supply.
|
|
11
|
+
|
|
12
|
+
## Supply an executor
|
|
13
|
+
|
|
14
|
+
`NodeExecutor` is that seam. It receives a `NodeInput` and returns whatever the
|
|
15
|
+
node produces:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { PlanScheduler } from "@smthrs/engine-store"
|
|
19
|
+
import * as Effect from "effect/Effect"
|
|
20
|
+
|
|
21
|
+
const executor = PlanScheduler.layerExecutor({
|
|
22
|
+
execute: (input) =>
|
|
23
|
+
Effect.succeed({
|
|
24
|
+
node: input.node.id,
|
|
25
|
+
attempt: input.attempt,
|
|
26
|
+
inputs: input.inputs.map((resolved) => resolved.value)
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`NodeInput` carries the `PlanNode`, the `attempt` number, the `boundary` this
|
|
32
|
+
dispatch was keyed under, and the node's material `Ref` inputs already resolved
|
|
33
|
+
through the same projection the key digests. Ordering dependencies and
|
|
34
|
+
unprojected sibling fields are deliberately absent: an executor may only see
|
|
35
|
+
data the key folds, or a cached settlement could be served for an execution that
|
|
36
|
+
consumed something else.
|
|
37
|
+
|
|
38
|
+
## Build the scheduler and run the plan
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
const scheduler = PlanScheduler.layer({
|
|
42
|
+
runId: "plan-1",
|
|
43
|
+
owner,
|
|
44
|
+
sourceId: "planner",
|
|
45
|
+
concurrency: { steps: 8, agents: 2 },
|
|
46
|
+
rebaseLimit: 3
|
|
47
|
+
})
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`concurrency.steps` caps leaf execution and `concurrency.agents` caps the agent
|
|
51
|
+
subset within it. Both default to unbounded and both reject zero, because a cap
|
|
52
|
+
of zero admits nothing and a round that admits nothing settles nothing. Invalid
|
|
53
|
+
bounds are rejected at construction: both must be positive safe integers, and
|
|
54
|
+
`rebaseLimit` a non-negative one.
|
|
55
|
+
|
|
56
|
+
The service has three members:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
interface Service {
|
|
60
|
+
readonly record: (plan: Plan) => Effect<RecordResult, SchedulerError, PlanStore | Journal | Crypto>
|
|
61
|
+
readonly append: (plan: Plan) => Effect<void, SchedulerError, PlanStore | Journal | Crypto>
|
|
62
|
+
readonly run: (plan: Plan) => Effect<Report, SchedulerError, Requirements>
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`record` persists generation 0 and journals `plan-recorded`. `append` persists
|
|
67
|
+
the newest generation and journals `subgraph-appended`. `run` walks the graph
|
|
68
|
+
and returns a `Report`.
|
|
69
|
+
|
|
70
|
+
Both plan records carry the graph itself under `graph.nodes`, beside the node
|
|
71
|
+
count `nodes` has always been, and each node names the tag it dispatches. They
|
|
72
|
+
carry no edges: a plan names its edges through each node's `dependsOn`, and the
|
|
73
|
+
reason for an edge is something only an interpreted graph knows.
|
|
74
|
+
|
|
75
|
+
The runtime requirements include `PlanInputStore.layer` and `PlanMergeStore.layer`. Compose them over the
|
|
76
|
+
same database and durable writer as the other stores, with `Crypto`, after
|
|
77
|
+
`Migrations.layer` has installed the schema. `TestStores.layer` and `layerAt`
|
|
78
|
+
already provide both. There is no volatile fallback: missing durable observations
|
|
79
|
+
must not authorize fresh execution of an old action.
|
|
80
|
+
|
|
81
|
+
## Read the report
|
|
82
|
+
|
|
83
|
+
`Report` carries the `planId`, its `digest`, one `Settlement` per node, the
|
|
84
|
+
`results` by node id, the reconciliation `verdicts`, and the ids of any merge
|
|
85
|
+
nodes a `stop-merge` conflict appended.
|
|
86
|
+
|
|
87
|
+
Each `Settlement` names the `planKey` (a pure function of declarations), the
|
|
88
|
+
`dispatchKey` actually dispatched under, the `attempts` and `rebases` spent,
|
|
89
|
+
and one of five outcomes:
|
|
90
|
+
|
|
91
|
+
| Outcome | Meaning |
|
|
92
|
+
| ---------- | --------------------------------------------------------------------------------- |
|
|
93
|
+
| `built` | The node executed and succeeded. |
|
|
94
|
+
| `clean` | A durable attempt replay or eligible shared-cache hit served it; no executor ran. |
|
|
95
|
+
| `failed` | The node executed and failed, or reconciliation failed it. |
|
|
96
|
+
| `skipped` | A dependency prevented dispatch, or `stop-merge` stopped a dispatched attempt. |
|
|
97
|
+
| `deferred` | A selection guess postponed it. It never dispatched and wrote no cache row. |
|
|
98
|
+
|
|
99
|
+
Every settlement is journaled as `node-settled`. A `stop-merge` decision writes
|
|
100
|
+
one `skipped` settlement for the stopped node. Reopening the run preserves that
|
|
101
|
+
record; recovery writes it only if it was missing. A `deferred` node is never
|
|
102
|
+
reported as passed, and is a debt a later guess-free pass repays.
|
|
103
|
+
|
|
104
|
+
## Why the dispatch key is not the plan key
|
|
105
|
+
|
|
106
|
+
All effect tiers can be planned. Sealed work uses the content-derived dispatch
|
|
107
|
+
key described below. Compensable and irreversible work instead uses a run-local
|
|
108
|
+
key scoped by the plan, structural node address, and declaration fingerprint.
|
|
109
|
+
Its successful attempt can replay after a restart in that run; it cannot serve
|
|
110
|
+
a different invocation or publish to the shared cache. Repeated identical
|
|
111
|
+
non-sealed nodes are distinct invocations.
|
|
112
|
+
|
|
113
|
+
Compensable attempts use the supplied `Jj` pre-image and restore it before a
|
|
114
|
+
retry. That promise covers only state the snapshot actually captures. The
|
|
115
|
+
generic node executor does not supply an irreversible idempotency contract, so
|
|
116
|
+
uncertain recovery and retries of irreversible work are refused, including
|
|
117
|
+
automatic conflict rebases or merge elaboration. No tier turns approval into authority or makes an
|
|
118
|
+
unenforced boundary hermetic.
|
|
119
|
+
|
|
120
|
+
The sealed dispatch key folds the node's own declaration with measured file
|
|
121
|
+
digests and the projected values of its material `Ref` inputs. It does not fold
|
|
122
|
+
upstream plan keys: unchanged consumed content can reuse a result even when an
|
|
123
|
+
upstream declaration changed. Ordering dependencies do not expose their values
|
|
124
|
+
to the executor. Two runs whose input files differ can declare the same graph,
|
|
125
|
+
so a plan key alone cannot establish reuse.
|
|
126
|
+
|
|
127
|
+
Source inputs have no writer preceding their reader. They include reads before
|
|
128
|
+
an explicitly later writer and reads of a node's own future writes. Their bytes
|
|
129
|
+
and glob membership are pinned before the first dispatch; new generations are
|
|
130
|
+
observed at append time. Produced inputs are measured after preceding writers
|
|
131
|
+
settle. A rebase re-observes those outputs, never source inputs.
|
|
132
|
+
|
|
133
|
+
`PlanInputStore` persists these observations before any affected dispatch.
|
|
134
|
+
Reopening the same run recovers them without measuring source files or expanding
|
|
135
|
+
source globs again. Each generation keeps earlier pins and records only new
|
|
136
|
+
sources. The same run cannot silently switch plan IDs or approved base graphs;
|
|
137
|
+
start a new run for changed work. A new run observes the current inputs.
|
|
138
|
+
|
|
139
|
+
The scheduler copies `Options.environment` at construction and persists its
|
|
140
|
+
normalized fingerprint with the first input generation. Same-run recovery
|
|
141
|
+
refuses changed identity before execution, for sealed, compensable, and
|
|
142
|
+
irreversible work. Equivalent capability-pattern sets recover normally; layer
|
|
143
|
+
order matters. Omission is a distinct identity, not a wildcard. Use the original
|
|
144
|
+
runtime to recover, or reconcile unfinished effects before starting a new run.
|
|
145
|
+
This cannot detect behavior changes a host omits from its declared identity.
|
|
146
|
+
|
|
147
|
+
Upgrade boundary: runs with attempts predating migration `3003` have no reliable
|
|
148
|
+
source snapshot and are refused by this scheduler. Finish them on the prior
|
|
149
|
+
runtime before upgrading, or explicitly decide how to recover their effects
|
|
150
|
+
before starting new work. Deleting the compatibility marker is not recovery.
|
|
151
|
+
Migration `3004` likewise refuses existing input heads with no recorded
|
|
152
|
+
environment. It preserves their unknown state instead of guessing a binding.
|
|
153
|
+
|
|
154
|
+
## Readiness, ordering and recovery
|
|
155
|
+
|
|
156
|
+
Each run or resume builds a private `RuntimeGraph` from the verified plan and
|
|
157
|
+
recovered merge settlements. Stable plan positions, forward and reverse edges,
|
|
158
|
+
unresolved and blocking dependency counts, and an explicit remaining count
|
|
159
|
+
replace repeated whole-plan readiness scans. State and admission membership use
|
|
160
|
+
maps and sets. The indexes are not persisted or included in any key.
|
|
161
|
+
|
|
162
|
+
A dispatch result stays provisional while the coordinator drains and reconciles
|
|
163
|
+
its durable deviations. Only the reconciled settlement updates affected
|
|
164
|
+
dependents. Retry attempts and rebases hold the same node in flight; they do not
|
|
165
|
+
decrement its dependents' counts again. Skips propagate in dependency order
|
|
166
|
+
before more work is admitted. A failed cone does not stop unrelated work. A
|
|
167
|
+
selected sink becomes deferred only if its dependencies succeeded; a failed
|
|
168
|
+
cone produces skipped work rather than selection debt.
|
|
169
|
+
|
|
170
|
+
Ready work is ordered by declared `priority` plus one point for each admission
|
|
171
|
+
pass in which capacity left it waiting. Ties retain compiled plan order, and
|
|
172
|
+
priority arithmetic stays exact even at the safe-integer boundary. Every
|
|
173
|
+
admission re-ranks the current frontier, accounting for its updated ages. A
|
|
174
|
+
blocked agent does not prevent ordinary steps from using spare step permits.
|
|
175
|
+
This preserves fairness; a wide frontier can still cost proportional to its
|
|
176
|
+
size, plus sorting, on each admission.
|
|
177
|
+
|
|
178
|
+
An appended generation enters the indexes synchronously after the plan, input
|
|
179
|
+
observations and merge completion commit together. Earlier positions, states
|
|
180
|
+
and observations remain intact. Discovered reconciliation edges change only
|
|
181
|
+
readiness; declared predecessors still determine file versions. Ancestor
|
|
182
|
+
queries visit each reachable predecessor once per reader and release their
|
|
183
|
+
temporary set, rather than retaining a transitive-closure matrix.
|
|
184
|
+
|
|
185
|
+
Reverse indexes govern readiness and propagation of settled outcomes only.
|
|
186
|
+
Content addressing and the existing cache-admission checks still govern reuse.
|
|
187
|
+
There is no separate dirty-bit propagation or cache-invalidation visitor.
|
|
188
|
+
|
|
189
|
+
The scheduler's differential tests retain the pre-index coordinator in
|
|
190
|
+
`test/PlanSchedulerReference.ts`. Generated DAGs compare complete reports,
|
|
191
|
+
dispatch and settlement records, input projections, plan generations and cache
|
|
192
|
+
keys. Separate cases control concurrent completions, reopen real SQLite
|
|
193
|
+
connections, and compare exact, tree and glob file scopes against independently
|
|
194
|
+
specified source and producer measurements. `RuntimeGraph.test.ts` also compares
|
|
195
|
+
each frontier with an exhaustive state model.
|
|
196
|
+
|
|
197
|
+
Private work counters separate index updates, settlements, frontier snapshots,
|
|
198
|
+
admission preparation and ancestor queries. Allocation counts cover explicit
|
|
199
|
+
graph containers and records, not VM backing storage, closures, the shared
|
|
200
|
+
admission policy, or persistence and filesystem work. Chain and wide-frontier
|
|
201
|
+
tests assert operation counts instead of elapsed time. The optional
|
|
202
|
+
`node test/RuntimeGraphBenchmark.ts` measures only graph mechanics locally,
|
|
203
|
+
checks equal admission order before timing, and is not an end-to-end scheduler
|
|
204
|
+
throughput claim.
|
|
205
|
+
|
|
206
|
+
## Handle a conflict
|
|
207
|
+
|
|
208
|
+
The runtime conflict strategies ride the plan's pair annotations:
|
|
209
|
+
|
|
210
|
+
- **delay and rebase** holds the dependents and re-executes against the newly
|
|
211
|
+
recorded base. The re-measure re-keys, so it is a new attempt rather than a
|
|
212
|
+
retry of one identity. It is journaled as `node-invalidated` and bounded by
|
|
213
|
+
`rebaseLimit`, because an unbounded rebase loop is a livelock with good
|
|
214
|
+
manners.
|
|
215
|
+
- **stop and merge** stops the loser and appends a merge node to the same plan
|
|
216
|
+
as an ordinary elaboration, with no rebase budget of its own: a lane that
|
|
217
|
+
loses a landing race restarts or fails rather than rebasing.
|
|
218
|
+
|
|
219
|
+
A conflict neither strategy absorbs goes to `Reconciliation`.
|
|
220
|
+
|
|
221
|
+
The scheduler persists the stopped-attempt decision independently of the
|
|
222
|
+
action's failure and redacted journal. Recovery preserves that node as `skipped`
|
|
223
|
+
and reuses completed work instead of re-executing it. It accepts either the
|
|
224
|
+
original approved base or a loaded grown plan, but validates the recorded
|
|
225
|
+
parent digest, generated node identity and intervening approved generations.
|
|
226
|
+
Missing or inconsistent recovery data is an error, not permission to invent
|
|
227
|
+
an extension.
|
|
228
|
+
|
|
229
|
+
Generated display IDs start at `${nodeId}+merge` and use a free numeric suffix
|
|
230
|
+
when user-defined nodes occupy that name. A name or merge-shaped body alone
|
|
231
|
+
does not establish generated ownership: the durable decision does. The input
|
|
232
|
+
generation, plan append, journal publication and merge completion commit
|
|
233
|
+
together. A failed append leaves a recoverable intent, not a partial extension.
|
|
234
|
+
|
|
235
|
+
Generated merges count toward `Plan.maximumPlanNodes`. If an extension would
|
|
236
|
+
exceed that limit, the scheduler returns `elaboration_failed` without committing
|
|
237
|
+
a new generation. Leave capacity for possible merge nodes in very large plans.
|
|
238
|
+
|
|
239
|
+
Migration `3005` preserves unknown merge state for pre-existing input heads;
|
|
240
|
+
the scheduler refuses them rather than guessing which failures were absorbed.
|
|
241
|
+
Recover those runs with their original runtime, or reconcile their effects
|
|
242
|
+
before starting new work. These scheduler guarantees do not establish native
|
|
243
|
+
filesystem merge correctness or make arbitrary external effects reversible.
|
|
244
|
+
|
|
245
|
+
## Install a reconciler
|
|
246
|
+
|
|
247
|
+
`Reconciliation` answers a `Deviation` or a `Conflict` with a `Verdict`:
|
|
248
|
+
|
|
249
|
+
```ts
|
|
250
|
+
import { Reconciliation } from "@smthrs/engine-store"
|
|
251
|
+
|
|
252
|
+
const reconciler = Reconciliation.layerDefault
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
`layerDefault` is deterministic, in this order of preference:
|
|
256
|
+
|
|
257
|
+
- `Reorder` when every undeclared path is one another plan node declares it
|
|
258
|
+
writes. That is a real dependency the declaration missed, made explicit.
|
|
259
|
+
- `FactorOut` when another node in the same run deviated on exactly the same
|
|
260
|
+
paths. Content addressing collapses two identical extracted steps to one key
|
|
261
|
+
by itself, so the verdict is a record and a hint.
|
|
262
|
+
- `Fail` otherwise, because a deviation nothing explains is genuinely wrong. A
|
|
263
|
+
conflict the runtime strategy could not absorb always fails here: choosing a
|
|
264
|
+
winner between two landings is a semantic judgement this default does not
|
|
265
|
+
have the material to make.
|
|
266
|
+
|
|
267
|
+
The scheduler attributes every deviation on a journal page before judging any of
|
|
268
|
+
it, so two steps that produced the same undeclared paths both see each other.
|
|
269
|
+
Deviating identically is a symmetric fact, and which of the pair the journal
|
|
270
|
+
happened to list first must not decide the verdict.
|
|
271
|
+
|
|
272
|
+
`Reconciliation.layer(service)` installs your own. Pluggability here is
|
|
273
|
+
dependency injection at the owning seam; there is no hook kernel. A model-backed
|
|
274
|
+
reconciler is a different `Layer` and lives in the agent packages, because this
|
|
275
|
+
package carries no model dependency.
|
|
276
|
+
|
|
277
|
+
## What a SchedulerError is, and is not
|
|
278
|
+
|
|
279
|
+
`SchedulerError` is a refusal the scheduler itself raises, with a `code` of
|
|
280
|
+
`invalid_plan`, `boundary_unavailable`, `key_uncomputable`, `elaboration_failed`, or
|
|
281
|
+
`store_failed`. A node's own failure is not one of these: the run continues and
|
|
282
|
+
the report says `failed`.
|
|
283
|
+
|
|
284
|
+
## Related
|
|
285
|
+
|
|
286
|
+
- [Defer work with selection](./defer-work-with-selection.md): what a
|
|
287
|
+
`deferred` outcome means and how the debt is repaid.
|
|
288
|
+
- [Cache admission](../concepts/cache-admission.md): why a node settles `clean`.
|
|
289
|
+
|
|
290
|
+
### Plan admission and filesystem failure cleanup
|
|
291
|
+
|
|
292
|
+
`record`, `append`, and `run` verify the complete plan before using it. They
|
|
293
|
+
recompute keys, graph annotations and approval digests through `Plan.verify`,
|
|
294
|
+
then use its immutable snapshot. Each operation requires `Crypto`; invalid
|
|
295
|
+
input fails with `invalid_plan` before store calls, journal writes, filesystem
|
|
296
|
+
measurement or dispatch. Caller mutation cannot change an admitted plan.
|
|
297
|
+
|
|
298
|
+
A source or produced-file enumeration failure carries `boundary_unavailable`
|
|
299
|
+
and its original cause. Consumers whose inputs cannot be measured never get
|
|
300
|
+
an attempt or cache entry. A typed scheduler failure interrupts siblings and
|
|
301
|
+
atomically marks their still-owned running attempts failed with matching
|
|
302
|
+
`attempt-finished` journal records. Completed producer evidence remains valid.
|
|
303
|
+
A terminal row or lost owner fence is never overwritten.
|
|
304
|
+
|
|
305
|
+
If cleanup itself cannot commit, the original scheduler error remains primary
|
|
306
|
+
and its `cleanupErrors` records those failures. Journal failure rolls back the
|
|
307
|
+
attempt transition. Such an unresolved attempt needs recovery; the scheduler
|
|
308
|
+
does not claim that failed persistence succeeded. Ordinary parking, external
|
|
309
|
+
interruption and ownership-loss semantics are unchanged.
|
|
310
|
+
|
|
311
|
+
The run driver owns the RunStore lifecycle transition when `run` fails; this
|
|
312
|
+
scheduler does not terminalize the run itself. Missing glob roots and absent
|
|
313
|
+
exact producer paths intentionally mean zero matches (including removals);
|
|
314
|
+
disappearance of a subtree that enumeration already discovered is an error.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Observe engine metrics"
|
|
3
|
+
description: "The counters and timers this package records on its hot paths, the outcome dimension every counter carries, and how to instrument your own effect with the same shape."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 10
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
`EngineStoreMetrics` exposes the metric handles the engine updates and the
|
|
9
|
+
combinator it updates them with. It exports no exporter: wiring metrics to a
|
|
10
|
+
backend is the host's job, and belongs to
|
|
11
|
+
[`@smthrs/observability`](/api/observability).
|
|
12
|
+
|
|
13
|
+
## What is recorded
|
|
14
|
+
|
|
15
|
+
Every counter is dimensioned by an `outcome` attribute, and every hot path has a
|
|
16
|
+
matching duration timer.
|
|
17
|
+
|
|
18
|
+
| Metric | What it counts or times |
|
|
19
|
+
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
20
|
+
| `flows_engine_dispatches` | Durable action dispatches. A cache-served replay and a fresh execution both count: the dispatch is the unit the engine retries and fences. |
|
|
21
|
+
| `flows_engine_dispatch_duration` | One dispatch, from admission through settlement, including cache verification, execution, copy-back, and the terminal row. |
|
|
22
|
+
| `flows_engine_scheduler_admissions` | Plan-scheduler admissions. |
|
|
23
|
+
| `flows_engine_scheduler_dispatch_duration` | One scheduler node dispatch. |
|
|
24
|
+
| `flows_engine_scheduler_nodes` | Node settlements, dimensioned by outcome. |
|
|
25
|
+
| `flows_engine_sandbox_executions` | Workspace transaction executions. |
|
|
26
|
+
| `flows_engine_sandbox_execution_duration` | One workspace transaction. |
|
|
27
|
+
| `flows_engine_sandbox_materializations` | Copy-back attempts. |
|
|
28
|
+
| `flows_engine_sandbox_materialization_duration` | One copy-back. |
|
|
29
|
+
| `flows_engine_sandbox_conflicts` | Materialization conflicts, the refusals a rebase answers. |
|
|
30
|
+
| `flows_engine_boundary_settlements` | Step boundary settlements. |
|
|
31
|
+
| `flows_engine_step_cache_decisions` | What a dispatch actually did with a cache row, after read-set verification and output materialization. |
|
|
32
|
+
| `flows_engine_claims` | The run driver's claim-and-activate decisions. |
|
|
33
|
+
|
|
34
|
+
Each counter also has a tag-keyed record of attributed views, so a caller
|
|
35
|
+
updates the right dimension by name rather than by re-attributing:
|
|
36
|
+
|
|
37
|
+
| View | Keys |
|
|
38
|
+
| -------------------- | -------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| `dispatch` | `Success`, `Failure`, `Interrupt` |
|
|
40
|
+
| `sandboxExecution` | `Success`, `Failure`, `Interrupt` |
|
|
41
|
+
| `materialization` | `Success`, `Failure`, `Interrupt` |
|
|
42
|
+
| `node` | `built`, `clean`, `failed`, `skipped`, `deferred` |
|
|
43
|
+
| `boundarySettlement` | `Clean`, `Deviation`, `Violation`, `Refused` |
|
|
44
|
+
| `stepCacheDecision` | `VerifiedHit`, `Miss`, `UnverifiableEvidence`, `Unmeasurable`, `StaleReadSet`, `ReplayFailed` |
|
|
45
|
+
| `claim` | `Activated`, `Terminal`, `HeartbeatFresh`, `StealRefusedOwnerAlive`, `ClaimLost`, `ActivationLost` |
|
|
46
|
+
|
|
47
|
+
`stepCacheDecisions` is the series to read when you are asking why a step ran.
|
|
48
|
+
`VerifiedHit` served the cached result; every other value fell through to a real
|
|
49
|
+
execution. `Miss` is no row at all, `UnverifiableEvidence` a row whose recorded
|
|
50
|
+
evidence cannot justify reuse, `Unmeasurable` a host that could not re-measure
|
|
51
|
+
the read set, `StaleReadSet` a measured mismatch, and `ReplayFailed` verified
|
|
52
|
+
evidence the host could not re-materialize. At most one decision is counted per
|
|
53
|
+
cache-consulting dispatch, so a dispatch that fails or is fenced out
|
|
54
|
+
mid-decision records none and shows up in `flows_engine_dispatches` instead.
|
|
55
|
+
|
|
56
|
+
An `Invalidated` workspace verdict counts as a `Success` exit on
|
|
57
|
+
`sandboxExecution`: the transaction ran and answered, and the verdict itself is
|
|
58
|
+
journaled.
|
|
59
|
+
|
|
60
|
+
## Classify an exit
|
|
61
|
+
|
|
62
|
+
`ExitTag` is `"Success"`, `"Failure"` (any non-interrupt cause), or
|
|
63
|
+
`"Interrupt"` (an interrupt-only cause, which in this store covers the fencing
|
|
64
|
+
self-interruption as well as caller cancellation).
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
import { EngineStoreMetrics } from "@smthrs/engine-store"
|
|
68
|
+
import * as Effect from "effect/Effect"
|
|
69
|
+
|
|
70
|
+
const tag = Effect.map(Effect.exit(someEffect), EngineStoreMetrics.exitTag)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Outcome tags are rewritten as snake case attribute values, so `HeartbeatFresh`
|
|
74
|
+
is recorded as `heartbeat_fresh`.
|
|
75
|
+
|
|
76
|
+
## Instrument your own effect the same way
|
|
77
|
+
|
|
78
|
+
`observe` composes a duration timer with an exit-outcome counter and a span
|
|
79
|
+
annotation, and propagates the instrumented effect's exit byte-identically,
|
|
80
|
+
value, cause, and interruption alike:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
const instrumented = someEffect.pipe(
|
|
84
|
+
EngineStoreMetrics.observe({
|
|
85
|
+
timer: EngineStoreMetrics.dispatchDuration,
|
|
86
|
+
counter: EngineStoreMetrics.dispatch
|
|
87
|
+
})
|
|
88
|
+
)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
It is built on Effect's own `Effect.trackDuration`, which uses the monotonic
|
|
92
|
+
clock and records on success, failure, and interruption alike.
|
|
93
|
+
|
|
94
|
+
## Export them
|
|
95
|
+
|
|
96
|
+
Provide an exporter from your host composition. See
|
|
97
|
+
[Observability](/docs/guides/observability/) on smithers.sh for the OTLP wiring
|
|
98
|
+
the CLI uses.
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Observe executions and page runs"
|
|
3
|
+
description: "Coherent engine snapshots, bounded filtered pages, revisioned catch-up, cancellation acknowledgement and durable child catalogs."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`ExecutionSnapshot`, `RunChangeFeed`, and `RunCatalogRead` read the engine's
|
|
7
|
+
database. Each has a `layer` requiring `SqlClient`; apply `Migrations.layer`
|
|
8
|
+
before constructing it. They start no polling fibers and read no control tables.
|
|
9
|
+
|
|
10
|
+
## Observe one execution or a batch
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { ExecutionSnapshot } from "@smthrs/engine-store"
|
|
14
|
+
import * as Effect from "effect/Effect"
|
|
15
|
+
|
|
16
|
+
const observe = Effect.gen(function*() {
|
|
17
|
+
const executions = yield* ExecutionSnapshot.ExecutionSnapshot
|
|
18
|
+
return yield* executions.read(["build-42", "build-42/round-1"])
|
|
19
|
+
})
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`read` accepts at most 200 IDs and returns observations in request order,
|
|
23
|
+
including duplicates. An empty batch still reads the source and watermark.
|
|
24
|
+
Every batch carries the database `source` and the global `revision` observed by
|
|
25
|
+
one read transaction. Each `Observed` entry carries its own run revision,
|
|
26
|
+
lifecycle, flow, creation/start/finish timestamps, effective parent, lineage and
|
|
27
|
+
round ordinal, structured wait, cancellation intent, and acknowledgement.
|
|
28
|
+
|
|
29
|
+
Observations describe the requested execution row. A completed predecessor
|
|
30
|
+
remains completed after a trampoline handoff. `related({ runId, kind: "rounds" })`
|
|
31
|
+
enumerates that logical job's rounds from any member; a consumer implementing
|
|
32
|
+
latest-round job status must select that round explicitly. The requested root's
|
|
33
|
+
identity and parent do not become the successor's identity and parent.
|
|
34
|
+
|
|
35
|
+
`Missing` is a separate variant. `deleted: true` means the database retains a
|
|
36
|
+
tombstone; `false` means no tracked row or deletion was observed. Neither is a
|
|
37
|
+
pending, running or terminal lifecycle. Absence without a tombstone carries the
|
|
38
|
+
batch watermark, so a later creation has a greater revision.
|
|
39
|
+
|
|
40
|
+
Waiting conditions have `kind` equal to `timer`, `signal`, `approval`, `quota`,
|
|
41
|
+
`human`, or `other`, and preserve `reason` and `wakeAtMs`. The opaque wake
|
|
42
|
+
token resolves the wait, so snapshots and run listings carry only
|
|
43
|
+
`tokenDigest`, its SHA-256, the same digest `ExecutionFacts` records. The
|
|
44
|
+
durable `event` reason maps to `signal`. Unknown plugin reasons remain `other`;
|
|
45
|
+
they never imply approval. Nullable fields preserve old records that did not
|
|
46
|
+
supply a deadline or token. Opaque wait reasons and tokens keep the engine
|
|
47
|
+
writer's existing non-empty string contract; observing them does not impose
|
|
48
|
+
the run-ID length limit.
|
|
49
|
+
|
|
50
|
+
The effective parent is `parent_run_id` when present, otherwise the durable
|
|
51
|
+
spawn edge with lowest sequence, breaking sequence ties by parent ID. Fork
|
|
52
|
+
parents and trampoline predecessors do not themselves create spawn ownership
|
|
53
|
+
edges. An old root with null lineage columns is round zero of its own lineage.
|
|
54
|
+
|
|
55
|
+
Malformed stored lifecycle, wait, identity, ancestry or revision data fails
|
|
56
|
+
closed with `RunStoreError`; schema failures use `decode_failed`. SQL failures
|
|
57
|
+
and defects use `persistence_failed` with the original cause. Interruption
|
|
58
|
+
remains interruption and releases the reserved connection and transaction.
|
|
59
|
+
|
|
60
|
+
The read uses a deferred SQLite transaction, allowing a WAL writer to commit
|
|
61
|
+
while it reads. All fields still describe the same database snapshot. A read
|
|
62
|
+
inside an existing transaction joins that transaction and can see its writes;
|
|
63
|
+
publish such observations only after that transaction commits.
|
|
64
|
+
|
|
65
|
+
## Cancellation intent and acknowledgement
|
|
66
|
+
|
|
67
|
+
`cancellation.requestedAtMs` is the recorded request. Its separate
|
|
68
|
+
`acknowledgement` contains the first observing owner's `{ hostId, pid, nonce }`
|
|
69
|
+
and `observedAtMs`. The owning driver records it under its running fence before
|
|
70
|
+
the cancel poll interrupts the body, and in its cancellation settlement path.
|
|
71
|
+
Other processes can record intent but cannot acknowledge as that owner.
|
|
72
|
+
|
|
73
|
+
Acknowledgement means the driver observed intent. It does not prove user
|
|
74
|
+
cleanup finished or that an external effect was undone. Cancellation terminality
|
|
75
|
+
comes from lifecycle status. Old rows have an unknown, null acknowledgement;
|
|
76
|
+
migration does not invent an observation or change control receipt shapes.
|
|
77
|
+
|
|
78
|
+
## Filter before pagination
|
|
79
|
+
|
|
80
|
+
`RunCatalogRead.listRuns({ filters, cursor, limit })` returns `runs`, an optional
|
|
81
|
+
next `cursor` (null at exhaustion), and the transaction's `source` and `revision`.
|
|
82
|
+
The default page is 100 and the allowed limit is 1 through 200. It computes no
|
|
83
|
+
total count. All filters apply in SQL before the limit:
|
|
84
|
+
|
|
85
|
+
| Filter | Meaning |
|
|
86
|
+
| ----------------- | ----------------------------------------------------------- |
|
|
87
|
+
| `status` | One engine lifecycle status. |
|
|
88
|
+
| `flowName` | Exact engine flow name. |
|
|
89
|
+
| `parentRunId` | Exact effective parent; null selects rows without a parent. |
|
|
90
|
+
| `lineageId` | Exact trampoline lineage, including its original root. |
|
|
91
|
+
| `waitingReason` | Exact durable reason; null selects no stored wait. |
|
|
92
|
+
| `createdAfterMs` | Inclusive minimum creation time. |
|
|
93
|
+
| `createdBeforeMs` | Inclusive maximum creation time. |
|
|
94
|
+
|
|
95
|
+
Omitted filters are unconstrained. Pages order ascending by immutable
|
|
96
|
+
`(created_at_ms, run_id)`, using SQLite's binary string order for ties. The
|
|
97
|
+
version-1 cursor binds that last key to the canonical filter tuple and source
|
|
98
|
+
identity. Changing the limit is allowed; changing filters or source is not.
|
|
99
|
+
Malformed cursors fail with `invalid_cursor`, foreign sources with
|
|
100
|
+
`source_changed`, and unsupported options with `invalid_options`. Numeric
|
|
101
|
+
offsets are not accepted or reinterpreted. Cursors are opaque continuation
|
|
102
|
+
values, not authorization tokens.
|
|
103
|
+
|
|
104
|
+
Run IDs and text equality-filter inputs use durable, non-empty text of at most
|
|
105
|
+
1,024 UTF-16 code units, without NUL or lone surrogates. Cursor input is bounded
|
|
106
|
+
at 65,536 UTF-16 code units, including JSON escaping. This admits every generated
|
|
107
|
+
cursor even when all maximum-length filter values need escaping. Observations
|
|
108
|
+
preserve longer existing flow names and opaque waits; the filter input bound is
|
|
109
|
+
an explicit admission limit of this new query API.
|
|
110
|
+
|
|
111
|
+
Each page is coherent at its own revision. Successive pages are live reads:
|
|
112
|
+
an insert after the last key can appear, an insert before it is not revisited,
|
|
113
|
+
and a deletion or status change can remove a later match. Equal creation times
|
|
114
|
+
are safe because the run ID breaks ties. Exhaustion is exact for an unchanged
|
|
115
|
+
query result; it does not freeze future history. Use change-feed reconciliation
|
|
116
|
+
when a consumer must account for changes behind an issued cursor.
|
|
117
|
+
|
|
118
|
+
Migration 0006 creates creation-order indexes for all 32 subsets of the five
|
|
119
|
+
equality predicates. This trades index storage and write work for ordered
|
|
120
|
+
bounded queries, including rare combined filters. Reads decode only the page
|
|
121
|
+
plus one lookahead. Earliest-parent subqueries are indexed and scoped to those
|
|
122
|
+
rows. No whole-history ancillary map or temporary page sort is required.
|
|
123
|
+
|
|
124
|
+
`listRunIds` retains its existing sync-polling behavior: newest rows by physical
|
|
125
|
+
row order, returned oldest first, default bound 10,000, with zero returning an
|
|
126
|
+
empty set. Its ordering and numeric limit contract have not changed.
|
|
127
|
+
|
|
128
|
+
## Enumerate engine-created children and rounds
|
|
129
|
+
|
|
130
|
+
`ExecutionSnapshot.related({ runId, kind, cursor, limit })` returns the requested
|
|
131
|
+
`anchor` (including explicit Missing), a batch of related snapshots, and a
|
|
132
|
+
continuation cursor, all in the same engine read transaction. `kind: "children"`
|
|
133
|
+
walks durable spawn edges in `(seq, child_id)` order. `kind: "rounds"` reads
|
|
134
|
+
lineage columns in `(round_ordinal, run_id)` order, including legacy round zero.
|
|
135
|
+
Both use a default limit of 100 and maximum of 200. Cursors are bound to source,
|
|
136
|
+
anchor ID and relation kind. Missing child rows remain explicit observations.
|
|
137
|
+
|
|
138
|
+
This catalog includes children with no control admission row. It reads direct
|
|
139
|
+
children, not a recursive descendant tree, and does not treat a fork as a spawn.
|
|
140
|
+
|
|
141
|
+
## Catch up without losing deletions
|
|
142
|
+
|
|
143
|
+
`RunChangeFeed.current` returns the source and current revision.
|
|
144
|
+
`changesSince({ source, revision, limit })` returns changes in revision order,
|
|
145
|
+
the current source watermark, `nextRevision`, and `hasMore`. Limits are 1 through
|
|
146
|
+
1,000. Each change carries `runId`, `source`, its latest `revision`, and `deleted`.
|
|
147
|
+
Use `nextRevision` for the next page, including when coalescing creates gaps.
|
|
148
|
+
|
|
149
|
+
This is a coalesced state feed, not a lifecycle event log. Several writes to one
|
|
150
|
+
run may become one newer entry. Revisions are global per database, durable,
|
|
151
|
+
monotonic integers; timestamps and journal sequence numbers are not substitutes.
|
|
152
|
+
Every run-row mutation, including heartbeat and wait updates, advances the
|
|
153
|
+
revision in the same transaction. Spawn-edge changes refresh the affected
|
|
154
|
+
existing child's parent and revision. A mutation can advance multiple times;
|
|
155
|
+
consumers must not expect contiguous per-run revisions.
|
|
156
|
+
|
|
157
|
+
Tombstones are retained indefinitely, one entry per deleted run ID. Ordinary
|
|
158
|
+
run retention, journal compaction, and acknowledgement do not remove them.
|
|
159
|
+
There is no consumer-expiration or compaction API, so even an indefinitely
|
|
160
|
+
offline registered consumer cannot lose required deletion evidence. Recreating
|
|
161
|
+
the same ID replaces absence with a strictly newer live revision. Storage grows
|
|
162
|
+
with distinct run IDs, including deleted IDs. Any future tombstone compaction
|
|
163
|
+
requires a separate registered-consumer retention and rebuild protocol.
|
|
164
|
+
|
|
165
|
+
A consumer can start at revision zero and exhaust bounded feed pages. Apply each
|
|
166
|
+
live snapshot or tombstone only if `ExecutionSnapshot.isNewer(incoming, stored)`
|
|
167
|
+
returns true. Advance its durable applied watermark in the same local transaction
|
|
168
|
+
as projection updates. A delayed pre-terminal observation then cannot overwrite
|
|
169
|
+
a newer terminal observation. A snapshot fetched after a feed entry can be newer
|
|
170
|
+
than that entry; retain its actual revision and ignore older replays.
|
|
171
|
+
|
|
172
|
+
## Source replacement and cross-database limits
|
|
173
|
+
|
|
174
|
+
Migration assigns a random durable database identity, preserved across normal
|
|
175
|
+
reopens. A different source or a feed checkpoint ahead of the source revision requires an
|
|
176
|
+
explicit projection rebuild. A copied backup carries the original identity:
|
|
177
|
+
do not independently write divergent copies or resume a rewound source against
|
|
178
|
+
an existing projection. Source rotation and restore/rebuild orchestration remain
|
|
179
|
+
host responsibilities; this port does not silently reset a consumer.
|
|
180
|
+
|
|
181
|
+
The engine's transaction is not a transaction across `control.db` and
|
|
182
|
+
`engine.db`. Control still owns admission, actors and approval decisions.
|
|
183
|
+
An engine-only page cannot include control admissions that have no execution
|
|
184
|
+
yet. The control projection consumer and public control list routing are a
|
|
185
|
+
separate integration step. They must expose their durable applied revision and
|
|
186
|
+
the source revision observed during catch-up to represent lag. These ports
|
|
187
|
+
provide that information but do not claim the control projection is current.
|