@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,276 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard metric definitions for the engine-store hot paths.
|
|
3
|
+
*
|
|
4
|
+
* This module only defines the metric handles, following the shape of
|
|
5
|
+
* `RunStoreMetrics` and Effect's `ClusterMetrics`. The dispatch seam
|
|
6
|
+
* (`internal/ActionPersistence`), the plan scheduler, the workspace sandbox,
|
|
7
|
+
* and the run driver update them as outcomes are decided. No exporter ships in
|
|
8
|
+
* this package; provide one — for example `@smthrs/observability` — and
|
|
9
|
+
* these series appear in it.
|
|
10
|
+
*
|
|
11
|
+
* Counters over an effect's exit are keyed by {@link ExitTag} records, so an
|
|
12
|
+
* update is a lookup rather than a branch, and durations land in
|
|
13
|
+
* `Metric.timer` histograms through Effect's own `Effect.trackDuration`. The
|
|
14
|
+
* same exit observation annotates the operation span with its outcome; none of
|
|
15
|
+
* the instrumentation combinators alters the instrumented effect's result or
|
|
16
|
+
* cause.
|
|
17
|
+
*
|
|
18
|
+
* @since 0.1.0
|
|
19
|
+
*/
|
|
20
|
+
import type * as Duration from "effect/Duration";
|
|
21
|
+
import * as Effect from "effect/Effect";
|
|
22
|
+
import type * as Exit from "effect/Exit";
|
|
23
|
+
import * as Metric from "effect/Metric";
|
|
24
|
+
/**
|
|
25
|
+
* How an instrumented effect exited: `Success`, `Failure` (any non-interrupt
|
|
26
|
+
* cause), or `Interrupt` (an interrupt-only cause — in this store that is the
|
|
27
|
+
* fencing self-interruption as well as caller cancellation).
|
|
28
|
+
*
|
|
29
|
+
* @category models
|
|
30
|
+
* @since 0.1.0
|
|
31
|
+
*/
|
|
32
|
+
export type ExitTag = "Success" | "Failure" | "Interrupt";
|
|
33
|
+
/**
|
|
34
|
+
* Classifies an exit for an {@link ExitTag}-keyed counter record.
|
|
35
|
+
*
|
|
36
|
+
* @category accessors
|
|
37
|
+
* @since 0.1.0
|
|
38
|
+
*/
|
|
39
|
+
export declare const exitTag: <A, E>(exit: Exit.Exit<A, E>) => ExitTag;
|
|
40
|
+
/**
|
|
41
|
+
* Observes an effect with a duration timer and an exit-outcome counter.
|
|
42
|
+
*
|
|
43
|
+
* Composes Effect's own `Effect.trackDuration` (monotonic clock, records on
|
|
44
|
+
* success, failure, and interruption alike) with an `Effect.onExit` counter
|
|
45
|
+
* update and current-span annotation, so the instrumented effect's exit —
|
|
46
|
+
* value, cause, and interruption — propagates byte-identically. This is the
|
|
47
|
+
* dual-instrument shape production Effect services use for hot-path
|
|
48
|
+
* operations.
|
|
49
|
+
*
|
|
50
|
+
* @category combinators
|
|
51
|
+
* @since 0.1.0
|
|
52
|
+
*/
|
|
53
|
+
export declare const observe: (instruments: {
|
|
54
|
+
readonly timer: Metric.Histogram<Duration.Duration>;
|
|
55
|
+
readonly counter: { readonly [Tag in ExitTag]: Metric.Metric<number, Metric.CounterState<number>>; };
|
|
56
|
+
}) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
57
|
+
/**
|
|
58
|
+
* Counter over durable action dispatches through
|
|
59
|
+
* `internal/ActionPersistence`, dimensioned by exit `outcome` (`success`,
|
|
60
|
+
* `failure`, or `interrupt`). A cache-served replay and a fresh execution
|
|
61
|
+
* both count: the dispatch is the unit the engine retries and fences.
|
|
62
|
+
*
|
|
63
|
+
* @category metrics
|
|
64
|
+
* @since 0.1.0
|
|
65
|
+
*/
|
|
66
|
+
export declare const dispatches: Metric.Counter<number>;
|
|
67
|
+
/**
|
|
68
|
+
* Latency histogram over durable action dispatches, from admission through
|
|
69
|
+
* settlement (cache verification, execution, copy-back, and the terminal
|
|
70
|
+
* row included).
|
|
71
|
+
*
|
|
72
|
+
* @category metrics
|
|
73
|
+
* @since 0.1.0
|
|
74
|
+
*/
|
|
75
|
+
export declare const dispatchDuration: Metric.Histogram<Duration.Duration>;
|
|
76
|
+
/**
|
|
77
|
+
* `dispatches` views keyed by {@link ExitTag}.
|
|
78
|
+
*
|
|
79
|
+
* @category metrics
|
|
80
|
+
* @since 0.1.0
|
|
81
|
+
*/
|
|
82
|
+
export declare const dispatch: {
|
|
83
|
+
readonly Success: Metric.Metric<number, Metric.CounterState<number>>;
|
|
84
|
+
readonly Failure: Metric.Metric<number, Metric.CounterState<number>>;
|
|
85
|
+
readonly Interrupt: Metric.Metric<number, Metric.CounterState<number>>;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Counter over scheduler admission passes that launched work. The
|
|
89
|
+
* completion-driven scheduler re-computes the ready set after every terminal
|
|
90
|
+
* event; only a pass that admits at least one node counts, so the series
|
|
91
|
+
* reads as "how many times the scheduler opened dispatch permits", not as
|
|
92
|
+
* event-loop noise.
|
|
93
|
+
*
|
|
94
|
+
* @category metrics
|
|
95
|
+
* @since 0.1.0
|
|
96
|
+
*/
|
|
97
|
+
export declare const schedulerAdmissions: Metric.Counter<number>;
|
|
98
|
+
/**
|
|
99
|
+
* Latency histogram over one scheduler dispatch, admission through terminal
|
|
100
|
+
* event: measurement, keying, the durable-action seam, and every rebase turn
|
|
101
|
+
* of the same node's loop land in a single observation.
|
|
102
|
+
*
|
|
103
|
+
* @category metrics
|
|
104
|
+
* @since 0.1.0
|
|
105
|
+
*/
|
|
106
|
+
export declare const schedulerDispatchDuration: Metric.Histogram<Duration.Duration>;
|
|
107
|
+
/**
|
|
108
|
+
* Counter over plan node settlements, dimensioned by the scheduler `outcome`
|
|
109
|
+
* (`built`, `clean`, `failed`, `skipped`, or `deferred`) — the per-node
|
|
110
|
+
* evaluation vocabulary `PlanScheduler` journals.
|
|
111
|
+
*
|
|
112
|
+
* @category metrics
|
|
113
|
+
* @since 0.1.0
|
|
114
|
+
*/
|
|
115
|
+
export declare const schedulerNodes: Metric.Counter<number>;
|
|
116
|
+
/**
|
|
117
|
+
* `schedulerNodes` views keyed by `PlanScheduler.Outcome`.
|
|
118
|
+
*
|
|
119
|
+
* @category metrics
|
|
120
|
+
* @since 0.1.0
|
|
121
|
+
*/
|
|
122
|
+
export declare const node: {
|
|
123
|
+
readonly deferred: Metric.Metric<number, Metric.CounterState<number>>;
|
|
124
|
+
readonly failed: Metric.Metric<number, Metric.CounterState<number>>;
|
|
125
|
+
readonly built: Metric.Metric<number, Metric.CounterState<number>>;
|
|
126
|
+
readonly clean: Metric.Metric<number, Metric.CounterState<number>>;
|
|
127
|
+
readonly skipped: Metric.Metric<number, Metric.CounterState<number>>;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Counter over isolated workspace executions (`WorkspaceSandbox.execute`),
|
|
131
|
+
* dimensioned by exit `outcome`. An `Invalidated` verdict is a `success`
|
|
132
|
+
* exit — the transaction ran and answered; the verdict itself is journaled.
|
|
133
|
+
*
|
|
134
|
+
* @category metrics
|
|
135
|
+
* @since 0.1.0
|
|
136
|
+
*/
|
|
137
|
+
export declare const sandboxExecutions: Metric.Counter<number>;
|
|
138
|
+
/**
|
|
139
|
+
* `sandboxExecutions` views keyed by {@link ExitTag}.
|
|
140
|
+
*
|
|
141
|
+
* @category metrics
|
|
142
|
+
* @since 0.1.0
|
|
143
|
+
*/
|
|
144
|
+
export declare const sandboxExecution: {
|
|
145
|
+
readonly Success: Metric.Metric<number, Metric.CounterState<number>>;
|
|
146
|
+
readonly Failure: Metric.Metric<number, Metric.CounterState<number>>;
|
|
147
|
+
readonly Interrupt: Metric.Metric<number, Metric.CounterState<number>>;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Latency histogram over isolated workspace executions.
|
|
151
|
+
*
|
|
152
|
+
* @category metrics
|
|
153
|
+
* @since 0.1.0
|
|
154
|
+
*/
|
|
155
|
+
export declare const sandboxExecutionDuration: Metric.Histogram<Duration.Duration>;
|
|
156
|
+
/**
|
|
157
|
+
* Counter over sandbox materializations (`WorkspaceSandbox.materialize` —
|
|
158
|
+
* the one host write), dimensioned by exit `outcome`.
|
|
159
|
+
*
|
|
160
|
+
* @category metrics
|
|
161
|
+
* @since 0.1.0
|
|
162
|
+
*/
|
|
163
|
+
export declare const sandboxMaterializations: Metric.Counter<number>;
|
|
164
|
+
/**
|
|
165
|
+
* `sandboxMaterializations` views keyed by {@link ExitTag}.
|
|
166
|
+
*
|
|
167
|
+
* @category metrics
|
|
168
|
+
* @since 0.1.0
|
|
169
|
+
*/
|
|
170
|
+
export declare const materialization: {
|
|
171
|
+
readonly Success: Metric.Metric<number, Metric.CounterState<number>>;
|
|
172
|
+
readonly Failure: Metric.Metric<number, Metric.CounterState<number>>;
|
|
173
|
+
readonly Interrupt: Metric.Metric<number, Metric.CounterState<number>>;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Latency histogram over sandbox materializations.
|
|
177
|
+
*
|
|
178
|
+
* @category metrics
|
|
179
|
+
* @since 0.1.0
|
|
180
|
+
*/
|
|
181
|
+
export declare const materializationDuration: Metric.Histogram<Duration.Duration>;
|
|
182
|
+
/**
|
|
183
|
+
* Counter over copy-back compare-and-set refusals: the preflight found host
|
|
184
|
+
* state that moved after the transaction's base snapshot. The engine answers
|
|
185
|
+
* one with a rebase or a conflict strategy, so the rate is contention
|
|
186
|
+
* evidence, not an error rate.
|
|
187
|
+
*
|
|
188
|
+
* @category metrics
|
|
189
|
+
* @since 0.1.0
|
|
190
|
+
*/
|
|
191
|
+
export declare const materializationConflicts: Metric.Counter<number>;
|
|
192
|
+
/**
|
|
193
|
+
* Counter over step-boundary settlements at the dispatch seam, dimensioned by
|
|
194
|
+
* `outcome`: `clean` evidence, an `expected`-mode `deviation`, or a hard
|
|
195
|
+
* `violation` (undeclared write, missing declared output, surviving declared
|
|
196
|
+
* removal), with `refused` for a host that could not settle at all.
|
|
197
|
+
*
|
|
198
|
+
* @category metrics
|
|
199
|
+
* @since 0.1.0
|
|
200
|
+
*/
|
|
201
|
+
export declare const boundarySettlements: Metric.Counter<number>;
|
|
202
|
+
/**
|
|
203
|
+
* `boundarySettlements` views keyed by settlement classification.
|
|
204
|
+
*
|
|
205
|
+
* @category metrics
|
|
206
|
+
* @since 0.1.0
|
|
207
|
+
*/
|
|
208
|
+
export declare const boundarySettlement: {
|
|
209
|
+
readonly Clean: Metric.Metric<number, Metric.CounterState<number>>;
|
|
210
|
+
readonly Deviation: Metric.Metric<number, Metric.CounterState<number>>;
|
|
211
|
+
readonly Violation: Metric.Metric<number, Metric.CounterState<number>>;
|
|
212
|
+
readonly Refused: Metric.Metric<number, Metric.CounterState<number>>;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Counter over the EFFECTIVE step-boundary cache decisions at the dispatch
|
|
216
|
+
* seam, dimensioned by `outcome`. `flows_step_cache_lookups` counts raw row
|
|
217
|
+
* presence at `CacheStore.get`; this series records what the dispatch
|
|
218
|
+
* actually did with the row after read-set verification and output
|
|
219
|
+
* materialization — `verified_hit` served the cached result, and every other
|
|
220
|
+
* outcome fell through to a real execution (`miss` no row,
|
|
221
|
+
* `unverifiable_evidence` a row whose recorded evidence cannot justify reuse,
|
|
222
|
+
* `unmeasurable` a host that could not re-measure the read set,
|
|
223
|
+
* `stale_read_set` a measured mismatch, `replay_failed` verified evidence the
|
|
224
|
+
* host could not re-materialize). Each decision is counted where it takes
|
|
225
|
+
* effect: `verified_hit` as the cached result is returned, a fall-through
|
|
226
|
+
* outcome as the dispatch proceeds past its refusal handling — so a
|
|
227
|
+
* cache-consulting dispatch that fails or is fenced out mid-decision (a
|
|
228
|
+
* journal failure on the provenance emit, a strict corruption verdict)
|
|
229
|
+
* records no decision, and its exit lands in {@link dispatches}. At most one
|
|
230
|
+
* decision is counted per cache-consulting dispatch.
|
|
231
|
+
*
|
|
232
|
+
* @category metrics
|
|
233
|
+
* @since 0.1.0
|
|
234
|
+
*/
|
|
235
|
+
export declare const stepCacheDecisions: Metric.Counter<number>;
|
|
236
|
+
/**
|
|
237
|
+
* `stepCacheDecisions` views keyed by decision.
|
|
238
|
+
*
|
|
239
|
+
* @category metrics
|
|
240
|
+
* @since 0.1.0
|
|
241
|
+
*/
|
|
242
|
+
export declare const stepCacheDecision: {
|
|
243
|
+
readonly VerifiedHit: Metric.Metric<number, Metric.CounterState<number>>;
|
|
244
|
+
readonly Miss: Metric.Metric<number, Metric.CounterState<number>>;
|
|
245
|
+
readonly UnverifiableEvidence: Metric.Metric<number, Metric.CounterState<number>>;
|
|
246
|
+
readonly Unmeasurable: Metric.Metric<number, Metric.CounterState<number>>;
|
|
247
|
+
readonly StaleReadSet: Metric.Metric<number, Metric.CounterState<number>>;
|
|
248
|
+
readonly ReplayFailed: Metric.Metric<number, Metric.CounterState<number>>;
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* Counter over the run driver's claim-and-activate decisions, dimensioned by
|
|
252
|
+
* `outcome`. These are the engine-level decisions taken BEFORE or AFTER the
|
|
253
|
+
* store-level compare-and-swaps `RunStoreMetrics` counts: a `terminal` or
|
|
254
|
+
* `heartbeat_fresh` refusal never reaches the store, `steal_refused_owner_alive`
|
|
255
|
+
* is the liveness probe declining, and `claim_lost`/`activation_lost` are the
|
|
256
|
+
* driver observing a lost store CAS.
|
|
257
|
+
*
|
|
258
|
+
* @category metrics
|
|
259
|
+
* @since 0.1.0
|
|
260
|
+
*/
|
|
261
|
+
export declare const claims: Metric.Counter<number>;
|
|
262
|
+
/**
|
|
263
|
+
* `claims` views keyed by driver decision.
|
|
264
|
+
*
|
|
265
|
+
* @category metrics
|
|
266
|
+
* @since 0.1.0
|
|
267
|
+
*/
|
|
268
|
+
export declare const claim: {
|
|
269
|
+
readonly Activated: Metric.Metric<number, Metric.CounterState<number>>;
|
|
270
|
+
readonly HeartbeatFresh: Metric.Metric<number, Metric.CounterState<number>>;
|
|
271
|
+
readonly ClaimLost: Metric.Metric<number, Metric.CounterState<number>>;
|
|
272
|
+
readonly Terminal: Metric.Metric<number, Metric.CounterState<number>>;
|
|
273
|
+
readonly StealRefusedOwnerAlive: Metric.Metric<number, Metric.CounterState<number>>;
|
|
274
|
+
readonly ActivationLost: Metric.Metric<number, Metric.CounterState<number>>;
|
|
275
|
+
};
|
|
276
|
+
//# sourceMappingURL=EngineStoreMetrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineStoreMetrics.d.ts","sourceRoot":"","sources":["../../src/EngineStoreMetrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,IAAI,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAA;AAezD;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,OAC+C,CAAA;AAErG;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,GAAI,aAAa;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACnD,QAAQ,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAE,CAAA;CACpG,MACA,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAS7D,CAAA;AAIH;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,wBAErB,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,qCAE3B,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;CAAsC,CAAA;AAE3D;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,wBAE9B,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,qCAEpC,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,wBAEzB,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;CAIhB,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,wBAE5B,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;CAA6C,CAAA;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,qCAEnC,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,wBAElC,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;CAAmD,CAAA;AAE/E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,qCAElC,CAAA;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,wBAEnC,CAAA;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,wBAE9B,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;CAI9B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,wBAE7B,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;CAI7B,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,wBAEjB,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;;;;;;CAIjB,CAAA"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard metric definitions for the engine-store hot paths.
|
|
3
|
+
*
|
|
4
|
+
* This module only defines the metric handles, following the shape of
|
|
5
|
+
* `RunStoreMetrics` and Effect's `ClusterMetrics`. The dispatch seam
|
|
6
|
+
* (`internal/ActionPersistence`), the plan scheduler, the workspace sandbox,
|
|
7
|
+
* and the run driver update them as outcomes are decided. No exporter ships in
|
|
8
|
+
* this package; provide one — for example `@smthrs/observability` — and
|
|
9
|
+
* these series appear in it.
|
|
10
|
+
*
|
|
11
|
+
* Counters over an effect's exit are keyed by {@link ExitTag} records, so an
|
|
12
|
+
* update is a lookup rather than a branch, and durations land in
|
|
13
|
+
* `Metric.timer` histograms through Effect's own `Effect.trackDuration`. The
|
|
14
|
+
* same exit observation annotates the operation span with its outcome; none of
|
|
15
|
+
* the instrumentation combinators alters the instrumented effect's result or
|
|
16
|
+
* cause.
|
|
17
|
+
*
|
|
18
|
+
* @since 0.1.0
|
|
19
|
+
*/
|
|
20
|
+
import * as Cause from "effect/Cause";
|
|
21
|
+
import * as Effect from "effect/Effect";
|
|
22
|
+
import * as Metric from "effect/Metric";
|
|
23
|
+
/** Rewrites an outcome tag (`HeartbeatFresh`) as an attribute value (`heartbeat_fresh`). */
|
|
24
|
+
const attributeValue = (tag) => tag.replace(/(?<=[a-z0-9])(?=[A-Z])/g, "_").toLowerCase();
|
|
25
|
+
/** Builds the tag-keyed record of attributed counter views for one operation. */
|
|
26
|
+
const byOutcome = (metric, attributes, tags) => Object.fromEntries(tags.map((tag) => [tag, Metric.withAttributes(metric, { ...attributes, outcome: attributeValue(tag) })]));
|
|
27
|
+
/**
|
|
28
|
+
* Classifies an exit for an {@link ExitTag}-keyed counter record.
|
|
29
|
+
*
|
|
30
|
+
* @category accessors
|
|
31
|
+
* @since 0.1.0
|
|
32
|
+
*/
|
|
33
|
+
export const exitTag = (exit) => exit._tag === "Success" ? "Success" : Cause.hasInterruptsOnly(exit.cause) ? "Interrupt" : "Failure";
|
|
34
|
+
/**
|
|
35
|
+
* Observes an effect with a duration timer and an exit-outcome counter.
|
|
36
|
+
*
|
|
37
|
+
* Composes Effect's own `Effect.trackDuration` (monotonic clock, records on
|
|
38
|
+
* success, failure, and interruption alike) with an `Effect.onExit` counter
|
|
39
|
+
* update and current-span annotation, so the instrumented effect's exit —
|
|
40
|
+
* value, cause, and interruption — propagates byte-identically. This is the
|
|
41
|
+
* dual-instrument shape production Effect services use for hot-path
|
|
42
|
+
* operations.
|
|
43
|
+
*
|
|
44
|
+
* @category combinators
|
|
45
|
+
* @since 0.1.0
|
|
46
|
+
*/
|
|
47
|
+
export const observe = (instruments) => (effect) => effect.pipe(Effect.trackDuration(instruments.timer), Effect.onExit((exit) => {
|
|
48
|
+
const tag = exitTag(exit);
|
|
49
|
+
return Effect.annotateCurrentSpan({ outcome: attributeValue(tag) }).pipe(Effect.andThen(Metric.update(instruments.counter[tag], 1)));
|
|
50
|
+
}));
|
|
51
|
+
const exitTags = ["Success", "Failure", "Interrupt"];
|
|
52
|
+
/**
|
|
53
|
+
* Counter over durable action dispatches through
|
|
54
|
+
* `internal/ActionPersistence`, dimensioned by exit `outcome` (`success`,
|
|
55
|
+
* `failure`, or `interrupt`). A cache-served replay and a fresh execution
|
|
56
|
+
* both count: the dispatch is the unit the engine retries and fences.
|
|
57
|
+
*
|
|
58
|
+
* @category metrics
|
|
59
|
+
* @since 0.1.0
|
|
60
|
+
*/
|
|
61
|
+
export const dispatches = Metric.counter("flows_engine_dispatches", {
|
|
62
|
+
description: "Durable action dispatches by exit outcome"
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* Latency histogram over durable action dispatches, from admission through
|
|
66
|
+
* settlement (cache verification, execution, copy-back, and the terminal
|
|
67
|
+
* row included).
|
|
68
|
+
*
|
|
69
|
+
* @category metrics
|
|
70
|
+
* @since 0.1.0
|
|
71
|
+
*/
|
|
72
|
+
export const dispatchDuration = Metric.timer("flows_engine_dispatch_duration", {
|
|
73
|
+
description: "Durable action dispatch duration"
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* `dispatches` views keyed by {@link ExitTag}.
|
|
77
|
+
*
|
|
78
|
+
* @category metrics
|
|
79
|
+
* @since 0.1.0
|
|
80
|
+
*/
|
|
81
|
+
export const dispatch = byOutcome(dispatches, {}, exitTags);
|
|
82
|
+
/**
|
|
83
|
+
* Counter over scheduler admission passes that launched work. The
|
|
84
|
+
* completion-driven scheduler re-computes the ready set after every terminal
|
|
85
|
+
* event; only a pass that admits at least one node counts, so the series
|
|
86
|
+
* reads as "how many times the scheduler opened dispatch permits", not as
|
|
87
|
+
* event-loop noise.
|
|
88
|
+
*
|
|
89
|
+
* @category metrics
|
|
90
|
+
* @since 0.1.0
|
|
91
|
+
*/
|
|
92
|
+
export const schedulerAdmissions = Metric.counter("flows_engine_scheduler_admissions", {
|
|
93
|
+
description: "Plan scheduler admission passes that launched at least one dispatch"
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* Latency histogram over one scheduler dispatch, admission through terminal
|
|
97
|
+
* event: measurement, keying, the durable-action seam, and every rebase turn
|
|
98
|
+
* of the same node's loop land in a single observation.
|
|
99
|
+
*
|
|
100
|
+
* @category metrics
|
|
101
|
+
* @since 0.1.0
|
|
102
|
+
*/
|
|
103
|
+
export const schedulerDispatchDuration = Metric.timer("flows_engine_scheduler_dispatch_duration", {
|
|
104
|
+
description: "Duration of one scheduler dispatch, admission through terminal event"
|
|
105
|
+
});
|
|
106
|
+
/**
|
|
107
|
+
* Counter over plan node settlements, dimensioned by the scheduler `outcome`
|
|
108
|
+
* (`built`, `clean`, `failed`, `skipped`, or `deferred`) — the per-node
|
|
109
|
+
* evaluation vocabulary `PlanScheduler` journals.
|
|
110
|
+
*
|
|
111
|
+
* @category metrics
|
|
112
|
+
* @since 0.1.0
|
|
113
|
+
*/
|
|
114
|
+
export const schedulerNodes = Metric.counter("flows_engine_scheduler_nodes", {
|
|
115
|
+
description: "Plan node settlements by evaluation outcome"
|
|
116
|
+
});
|
|
117
|
+
/**
|
|
118
|
+
* `schedulerNodes` views keyed by `PlanScheduler.Outcome`.
|
|
119
|
+
*
|
|
120
|
+
* @category metrics
|
|
121
|
+
* @since 0.1.0
|
|
122
|
+
*/
|
|
123
|
+
export const node = byOutcome(schedulerNodes, {}, ["built", "clean", "failed", "skipped", "deferred"]);
|
|
124
|
+
/**
|
|
125
|
+
* Counter over isolated workspace executions (`WorkspaceSandbox.execute`),
|
|
126
|
+
* dimensioned by exit `outcome`. An `Invalidated` verdict is a `success`
|
|
127
|
+
* exit — the transaction ran and answered; the verdict itself is journaled.
|
|
128
|
+
*
|
|
129
|
+
* @category metrics
|
|
130
|
+
* @since 0.1.0
|
|
131
|
+
*/
|
|
132
|
+
export const sandboxExecutions = Metric.counter("flows_engine_sandbox_executions", {
|
|
133
|
+
description: "Isolated workspace executions by exit outcome"
|
|
134
|
+
});
|
|
135
|
+
/**
|
|
136
|
+
* `sandboxExecutions` views keyed by {@link ExitTag}.
|
|
137
|
+
*
|
|
138
|
+
* @category metrics
|
|
139
|
+
* @since 0.1.0
|
|
140
|
+
*/
|
|
141
|
+
export const sandboxExecution = byOutcome(sandboxExecutions, {}, exitTags);
|
|
142
|
+
/**
|
|
143
|
+
* Latency histogram over isolated workspace executions.
|
|
144
|
+
*
|
|
145
|
+
* @category metrics
|
|
146
|
+
* @since 0.1.0
|
|
147
|
+
*/
|
|
148
|
+
export const sandboxExecutionDuration = Metric.timer("flows_engine_sandbox_execution_duration", {
|
|
149
|
+
description: "Isolated workspace execution duration"
|
|
150
|
+
});
|
|
151
|
+
/**
|
|
152
|
+
* Counter over sandbox materializations (`WorkspaceSandbox.materialize` —
|
|
153
|
+
* the one host write), dimensioned by exit `outcome`.
|
|
154
|
+
*
|
|
155
|
+
* @category metrics
|
|
156
|
+
* @since 0.1.0
|
|
157
|
+
*/
|
|
158
|
+
export const sandboxMaterializations = Metric.counter("flows_engine_sandbox_materializations", {
|
|
159
|
+
description: "Sandbox copy-back materializations by exit outcome"
|
|
160
|
+
});
|
|
161
|
+
/**
|
|
162
|
+
* `sandboxMaterializations` views keyed by {@link ExitTag}.
|
|
163
|
+
*
|
|
164
|
+
* @category metrics
|
|
165
|
+
* @since 0.1.0
|
|
166
|
+
*/
|
|
167
|
+
export const materialization = byOutcome(sandboxMaterializations, {}, exitTags);
|
|
168
|
+
/**
|
|
169
|
+
* Latency histogram over sandbox materializations.
|
|
170
|
+
*
|
|
171
|
+
* @category metrics
|
|
172
|
+
* @since 0.1.0
|
|
173
|
+
*/
|
|
174
|
+
export const materializationDuration = Metric.timer("flows_engine_sandbox_materialization_duration", {
|
|
175
|
+
description: "Sandbox copy-back materialization duration"
|
|
176
|
+
});
|
|
177
|
+
/**
|
|
178
|
+
* Counter over copy-back compare-and-set refusals: the preflight found host
|
|
179
|
+
* state that moved after the transaction's base snapshot. The engine answers
|
|
180
|
+
* one with a rebase or a conflict strategy, so the rate is contention
|
|
181
|
+
* evidence, not an error rate.
|
|
182
|
+
*
|
|
183
|
+
* @category metrics
|
|
184
|
+
* @since 0.1.0
|
|
185
|
+
*/
|
|
186
|
+
export const materializationConflicts = Metric.counter("flows_engine_sandbox_conflicts", {
|
|
187
|
+
description: "Sandbox copy-back compare-and-set refusals"
|
|
188
|
+
});
|
|
189
|
+
/**
|
|
190
|
+
* Counter over step-boundary settlements at the dispatch seam, dimensioned by
|
|
191
|
+
* `outcome`: `clean` evidence, an `expected`-mode `deviation`, or a hard
|
|
192
|
+
* `violation` (undeclared write, missing declared output, surviving declared
|
|
193
|
+
* removal), with `refused` for a host that could not settle at all.
|
|
194
|
+
*
|
|
195
|
+
* @category metrics
|
|
196
|
+
* @since 0.1.0
|
|
197
|
+
*/
|
|
198
|
+
export const boundarySettlements = Metric.counter("flows_engine_boundary_settlements", {
|
|
199
|
+
description: "Step boundary settlements by outcome"
|
|
200
|
+
});
|
|
201
|
+
/**
|
|
202
|
+
* `boundarySettlements` views keyed by settlement classification.
|
|
203
|
+
*
|
|
204
|
+
* @category metrics
|
|
205
|
+
* @since 0.1.0
|
|
206
|
+
*/
|
|
207
|
+
export const boundarySettlement = byOutcome(boundarySettlements, {}, ["Clean", "Deviation", "Violation", "Refused"]);
|
|
208
|
+
/**
|
|
209
|
+
* Counter over the EFFECTIVE step-boundary cache decisions at the dispatch
|
|
210
|
+
* seam, dimensioned by `outcome`. `flows_step_cache_lookups` counts raw row
|
|
211
|
+
* presence at `CacheStore.get`; this series records what the dispatch
|
|
212
|
+
* actually did with the row after read-set verification and output
|
|
213
|
+
* materialization — `verified_hit` served the cached result, and every other
|
|
214
|
+
* outcome fell through to a real execution (`miss` no row,
|
|
215
|
+
* `unverifiable_evidence` a row whose recorded evidence cannot justify reuse,
|
|
216
|
+
* `unmeasurable` a host that could not re-measure the read set,
|
|
217
|
+
* `stale_read_set` a measured mismatch, `replay_failed` verified evidence the
|
|
218
|
+
* host could not re-materialize). Each decision is counted where it takes
|
|
219
|
+
* effect: `verified_hit` as the cached result is returned, a fall-through
|
|
220
|
+
* outcome as the dispatch proceeds past its refusal handling — so a
|
|
221
|
+
* cache-consulting dispatch that fails or is fenced out mid-decision (a
|
|
222
|
+
* journal failure on the provenance emit, a strict corruption verdict)
|
|
223
|
+
* records no decision, and its exit lands in {@link dispatches}. At most one
|
|
224
|
+
* decision is counted per cache-consulting dispatch.
|
|
225
|
+
*
|
|
226
|
+
* @category metrics
|
|
227
|
+
* @since 0.1.0
|
|
228
|
+
*/
|
|
229
|
+
export const stepCacheDecisions = Metric.counter("flows_engine_step_cache_decisions", {
|
|
230
|
+
description: "Effective step-boundary cache decisions at the dispatch seam"
|
|
231
|
+
});
|
|
232
|
+
/**
|
|
233
|
+
* `stepCacheDecisions` views keyed by decision.
|
|
234
|
+
*
|
|
235
|
+
* @category metrics
|
|
236
|
+
* @since 0.1.0
|
|
237
|
+
*/
|
|
238
|
+
export const stepCacheDecision = byOutcome(stepCacheDecisions, {}, ["VerifiedHit", "Miss", "UnverifiableEvidence", "Unmeasurable", "StaleReadSet", "ReplayFailed"]);
|
|
239
|
+
/**
|
|
240
|
+
* Counter over the run driver's claim-and-activate decisions, dimensioned by
|
|
241
|
+
* `outcome`. These are the engine-level decisions taken BEFORE or AFTER the
|
|
242
|
+
* store-level compare-and-swaps `RunStoreMetrics` counts: a `terminal` or
|
|
243
|
+
* `heartbeat_fresh` refusal never reaches the store, `steal_refused_owner_alive`
|
|
244
|
+
* is the liveness probe declining, and `claim_lost`/`activation_lost` are the
|
|
245
|
+
* driver observing a lost store CAS.
|
|
246
|
+
*
|
|
247
|
+
* @category metrics
|
|
248
|
+
* @since 0.1.0
|
|
249
|
+
*/
|
|
250
|
+
export const claims = Metric.counter("flows_engine_claims", {
|
|
251
|
+
description: "Run driver claim-and-activate decisions by outcome"
|
|
252
|
+
});
|
|
253
|
+
/**
|
|
254
|
+
* `claims` views keyed by driver decision.
|
|
255
|
+
*
|
|
256
|
+
* @category metrics
|
|
257
|
+
* @since 0.1.0
|
|
258
|
+
*/
|
|
259
|
+
export const claim = byOutcome(claims, {}, ["Activated", "Terminal", "HeartbeatFresh", "StealRefusedOwnerAlive", "ClaimLost", "ActivationLost"]);
|
|
260
|
+
//# sourceMappingURL=EngineStoreMetrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineStoreMetrics.js","sourceRoot":"","sources":["../../src/EngineStoreMetrics.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Standard metric definitions for the engine-store hot paths.\n *\n * This module only defines the metric handles, following the shape of\n * `RunStoreMetrics` and Effect's `ClusterMetrics`. The dispatch seam\n * (`internal/ActionPersistence`), the plan scheduler, the workspace sandbox,\n * and the run driver update them as outcomes are decided. No exporter ships in\n * this package; provide one — for example `@smthrs/observability` — and\n * these series appear in it.\n *\n * Counters over an effect's exit are keyed by {@link ExitTag} records, so an\n * update is a lookup rather than a branch, and durations land in\n * `Metric.timer` histograms through Effect's own `Effect.trackDuration`. The\n * same exit observation annotates the operation span with its outcome; none of\n * the instrumentation combinators alters the instrumented effect's result or\n * cause.\n *\n * @since 0.1.0\n */\n\nimport * as Cause from \"effect/Cause\"\nimport type * as Duration from \"effect/Duration\"\nimport * as Effect from \"effect/Effect\"\nimport type * as Exit from \"effect/Exit\"\nimport * as Metric from \"effect/Metric\"\n\n/**\n * How an instrumented effect exited: `Success`, `Failure` (any non-interrupt\n * cause), or `Interrupt` (an interrupt-only cause — in this store that is the\n * fencing self-interruption as well as caller cancellation).\n *\n * @category models\n * @since 0.1.0\n */\nexport type ExitTag = \"Success\" | \"Failure\" | \"Interrupt\"\n\n/** Rewrites an outcome tag (`HeartbeatFresh`) as an attribute value (`heartbeat_fresh`). */\nconst attributeValue = (tag: string): string => tag.replace(/(?<=[a-z0-9])(?=[A-Z])/g, \"_\").toLowerCase()\n\n/** Builds the tag-keyed record of attributed counter views for one operation. */\nconst byOutcome = <const Tags extends ReadonlyArray<string>>(\n metric: Metric.Metric<number, Metric.CounterState<number>>,\n attributes: Readonly<Record<string, string>>,\n tags: Tags\n): { readonly [Tag in Tags[number]]: Metric.Metric<number, Metric.CounterState<number>> } =>\n Object.fromEntries(\n tags.map((tag) => [tag, Metric.withAttributes(metric, { ...attributes, outcome: attributeValue(tag) })])\n ) as { [Tag in Tags[number]]: Metric.Metric<number, Metric.CounterState<number>> }\n\n/**\n * Classifies an exit for an {@link ExitTag}-keyed counter record.\n *\n * @category accessors\n * @since 0.1.0\n */\nexport const exitTag = <A, E>(exit: Exit.Exit<A, E>): ExitTag =>\n exit._tag === \"Success\" ? \"Success\" : Cause.hasInterruptsOnly(exit.cause) ? \"Interrupt\" : \"Failure\"\n\n/**\n * Observes an effect with a duration timer and an exit-outcome counter.\n *\n * Composes Effect's own `Effect.trackDuration` (monotonic clock, records on\n * success, failure, and interruption alike) with an `Effect.onExit` counter\n * update and current-span annotation, so the instrumented effect's exit —\n * value, cause, and interruption — propagates byte-identically. This is the\n * dual-instrument shape production Effect services use for hot-path\n * operations.\n *\n * @category combinators\n * @since 0.1.0\n */\nexport const observe = (instruments: {\n readonly timer: Metric.Histogram<Duration.Duration>\n readonly counter: { readonly [Tag in ExitTag]: Metric.Metric<number, Metric.CounterState<number>> }\n}) =>\n<A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>\n effect.pipe(\n Effect.trackDuration(instruments.timer),\n Effect.onExit((exit) => {\n const tag = exitTag(exit)\n return Effect.annotateCurrentSpan({ outcome: attributeValue(tag) }).pipe(\n Effect.andThen(Metric.update(instruments.counter[tag], 1))\n )\n })\n )\n\nconst exitTags = [\"Success\", \"Failure\", \"Interrupt\"] as const\n\n/**\n * Counter over durable action dispatches through\n * `internal/ActionPersistence`, dimensioned by exit `outcome` (`success`,\n * `failure`, or `interrupt`). A cache-served replay and a fresh execution\n * both count: the dispatch is the unit the engine retries and fences.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const dispatches = Metric.counter(\"flows_engine_dispatches\", {\n description: \"Durable action dispatches by exit outcome\"\n})\n\n/**\n * Latency histogram over durable action dispatches, from admission through\n * settlement (cache verification, execution, copy-back, and the terminal\n * row included).\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const dispatchDuration = Metric.timer(\"flows_engine_dispatch_duration\", {\n description: \"Durable action dispatch duration\"\n})\n\n/**\n * `dispatches` views keyed by {@link ExitTag}.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const dispatch = byOutcome(dispatches, {}, exitTags)\n\n/**\n * Counter over scheduler admission passes that launched work. The\n * completion-driven scheduler re-computes the ready set after every terminal\n * event; only a pass that admits at least one node counts, so the series\n * reads as \"how many times the scheduler opened dispatch permits\", not as\n * event-loop noise.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const schedulerAdmissions = Metric.counter(\"flows_engine_scheduler_admissions\", {\n description: \"Plan scheduler admission passes that launched at least one dispatch\"\n})\n\n/**\n * Latency histogram over one scheduler dispatch, admission through terminal\n * event: measurement, keying, the durable-action seam, and every rebase turn\n * of the same node's loop land in a single observation.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const schedulerDispatchDuration = Metric.timer(\"flows_engine_scheduler_dispatch_duration\", {\n description: \"Duration of one scheduler dispatch, admission through terminal event\"\n})\n\n/**\n * Counter over plan node settlements, dimensioned by the scheduler `outcome`\n * (`built`, `clean`, `failed`, `skipped`, or `deferred`) — the per-node\n * evaluation vocabulary `PlanScheduler` journals.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const schedulerNodes = Metric.counter(\"flows_engine_scheduler_nodes\", {\n description: \"Plan node settlements by evaluation outcome\"\n})\n\n/**\n * `schedulerNodes` views keyed by `PlanScheduler.Outcome`.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const node = byOutcome(\n schedulerNodes,\n {},\n [\"built\", \"clean\", \"failed\", \"skipped\", \"deferred\"] as const\n)\n\n/**\n * Counter over isolated workspace executions (`WorkspaceSandbox.execute`),\n * dimensioned by exit `outcome`. An `Invalidated` verdict is a `success`\n * exit — the transaction ran and answered; the verdict itself is journaled.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const sandboxExecutions = Metric.counter(\"flows_engine_sandbox_executions\", {\n description: \"Isolated workspace executions by exit outcome\"\n})\n\n/**\n * `sandboxExecutions` views keyed by {@link ExitTag}.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const sandboxExecution = byOutcome(sandboxExecutions, {}, exitTags)\n\n/**\n * Latency histogram over isolated workspace executions.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const sandboxExecutionDuration = Metric.timer(\"flows_engine_sandbox_execution_duration\", {\n description: \"Isolated workspace execution duration\"\n})\n\n/**\n * Counter over sandbox materializations (`WorkspaceSandbox.materialize` —\n * the one host write), dimensioned by exit `outcome`.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const sandboxMaterializations = Metric.counter(\"flows_engine_sandbox_materializations\", {\n description: \"Sandbox copy-back materializations by exit outcome\"\n})\n\n/**\n * `sandboxMaterializations` views keyed by {@link ExitTag}.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const materialization = byOutcome(sandboxMaterializations, {}, exitTags)\n\n/**\n * Latency histogram over sandbox materializations.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const materializationDuration = Metric.timer(\"flows_engine_sandbox_materialization_duration\", {\n description: \"Sandbox copy-back materialization duration\"\n})\n\n/**\n * Counter over copy-back compare-and-set refusals: the preflight found host\n * state that moved after the transaction's base snapshot. The engine answers\n * one with a rebase or a conflict strategy, so the rate is contention\n * evidence, not an error rate.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const materializationConflicts = Metric.counter(\"flows_engine_sandbox_conflicts\", {\n description: \"Sandbox copy-back compare-and-set refusals\"\n})\n\n/**\n * Counter over step-boundary settlements at the dispatch seam, dimensioned by\n * `outcome`: `clean` evidence, an `expected`-mode `deviation`, or a hard\n * `violation` (undeclared write, missing declared output, surviving declared\n * removal), with `refused` for a host that could not settle at all.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const boundarySettlements = Metric.counter(\"flows_engine_boundary_settlements\", {\n description: \"Step boundary settlements by outcome\"\n})\n\n/**\n * `boundarySettlements` views keyed by settlement classification.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const boundarySettlement = byOutcome(\n boundarySettlements,\n {},\n [\"Clean\", \"Deviation\", \"Violation\", \"Refused\"] as const\n)\n\n/**\n * Counter over the EFFECTIVE step-boundary cache decisions at the dispatch\n * seam, dimensioned by `outcome`. `flows_step_cache_lookups` counts raw row\n * presence at `CacheStore.get`; this series records what the dispatch\n * actually did with the row after read-set verification and output\n * materialization — `verified_hit` served the cached result, and every other\n * outcome fell through to a real execution (`miss` no row,\n * `unverifiable_evidence` a row whose recorded evidence cannot justify reuse,\n * `unmeasurable` a host that could not re-measure the read set,\n * `stale_read_set` a measured mismatch, `replay_failed` verified evidence the\n * host could not re-materialize). Each decision is counted where it takes\n * effect: `verified_hit` as the cached result is returned, a fall-through\n * outcome as the dispatch proceeds past its refusal handling — so a\n * cache-consulting dispatch that fails or is fenced out mid-decision (a\n * journal failure on the provenance emit, a strict corruption verdict)\n * records no decision, and its exit lands in {@link dispatches}. At most one\n * decision is counted per cache-consulting dispatch.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const stepCacheDecisions = Metric.counter(\"flows_engine_step_cache_decisions\", {\n description: \"Effective step-boundary cache decisions at the dispatch seam\"\n})\n\n/**\n * `stepCacheDecisions` views keyed by decision.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const stepCacheDecision = byOutcome(\n stepCacheDecisions,\n {},\n [\"VerifiedHit\", \"Miss\", \"UnverifiableEvidence\", \"Unmeasurable\", \"StaleReadSet\", \"ReplayFailed\"] as const\n)\n\n/**\n * Counter over the run driver's claim-and-activate decisions, dimensioned by\n * `outcome`. These are the engine-level decisions taken BEFORE or AFTER the\n * store-level compare-and-swaps `RunStoreMetrics` counts: a `terminal` or\n * `heartbeat_fresh` refusal never reaches the store, `steal_refused_owner_alive`\n * is the liveness probe declining, and `claim_lost`/`activation_lost` are the\n * driver observing a lost store CAS.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const claims = Metric.counter(\"flows_engine_claims\", {\n description: \"Run driver claim-and-activate decisions by outcome\"\n})\n\n/**\n * `claims` views keyed by driver decision.\n *\n * @category metrics\n * @since 0.1.0\n */\nexport const claim = byOutcome(\n claims,\n {},\n [\"Activated\", \"Terminal\", \"HeartbeatFresh\", \"StealRefusedOwnerAlive\", \"ClaimLost\", \"ActivationLost\"] as const\n)\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The public, stable error contract of `@smthrs/engine-store`.
|
|
3
|
+
*
|
|
4
|
+
* Every error here carries a `code` literal that is part of the public API:
|
|
5
|
+
* consumers may switch on `code` (or `_tag`) and the strings will not change
|
|
6
|
+
* without a major version. The classes themselves are declared next to the
|
|
7
|
+
* logic that raises them (`internal/ActionPersistence.ts`,
|
|
8
|
+
* `@smthrs/flow/Action`, and `@smthrs/flow/FlowRuntime`); this module is the
|
|
9
|
+
* barrel-exported surface so that `internal/` never has to be imported by
|
|
10
|
+
* consumers.
|
|
11
|
+
*
|
|
12
|
+
* Related documentation: `docs/troubleshooting.md` names every code and
|
|
13
|
+
* what to change; `docs/api.md` carries the schemas.
|
|
14
|
+
*
|
|
15
|
+
* @since 0.1.0
|
|
16
|
+
*/
|
|
17
|
+
export { IrreversibleRetryRequiresIdempotencyKey } from "@smthrs/flow/Action";
|
|
18
|
+
export { FlowCycleDetected } from "@smthrs/flow/FlowRuntime";
|
|
19
|
+
export { AttemptAdmissionRejected, AttemptEvidenceQuarantined, AttemptSuspended, CacheConflictDetected, CacheCorruptionDetected } from "./internal/ActionPersistence.ts";
|
|
20
|
+
export { RetentionError, RetentionErrorCode } from "./internal/RetentionOps.ts";
|
|
21
|
+
export { RunCatalogError, RunCatalogErrorCode } from "./internal/RunCatalogOps.ts";
|
|
22
|
+
//# sourceMappingURL=Errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The public, stable error contract of `@smthrs/engine-store`.
|
|
3
|
+
*
|
|
4
|
+
* Every error here carries a `code` literal that is part of the public API:
|
|
5
|
+
* consumers may switch on `code` (or `_tag`) and the strings will not change
|
|
6
|
+
* without a major version. The classes themselves are declared next to the
|
|
7
|
+
* logic that raises them (`internal/ActionPersistence.ts`,
|
|
8
|
+
* `@smthrs/flow/Action`, and `@smthrs/flow/FlowRuntime`); this module is the
|
|
9
|
+
* barrel-exported surface so that `internal/` never has to be imported by
|
|
10
|
+
* consumers.
|
|
11
|
+
*
|
|
12
|
+
* Related documentation: `docs/troubleshooting.md` names every code and
|
|
13
|
+
* what to change; `docs/api.md` carries the schemas.
|
|
14
|
+
*
|
|
15
|
+
* @since 0.1.0
|
|
16
|
+
*/
|
|
17
|
+
export { IrreversibleRetryRequiresIdempotencyKey } from "@smthrs/flow/Action";
|
|
18
|
+
export { FlowCycleDetected } from "@smthrs/flow/FlowRuntime";
|
|
19
|
+
export { AttemptAdmissionRejected, AttemptEvidenceQuarantined, AttemptSuspended, CacheConflictDetected, CacheCorruptionDetected } from "./internal/ActionPersistence.js";
|
|
20
|
+
export { RetentionError, RetentionErrorCode } from "./internal/RetentionOps.js";
|
|
21
|
+
export { RunCatalogError, RunCatalogErrorCode } from "./internal/RunCatalogOps.js";
|
|
22
|
+
//# sourceMappingURL=Errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA","sourcesContent":["/**\n * The public, stable error contract of `@smthrs/engine-store`.\n *\n * Every error here carries a `code` literal that is part of the public API:\n * consumers may switch on `code` (or `_tag`) and the strings will not change\n * without a major version. The classes themselves are declared next to the\n * logic that raises them (`internal/ActionPersistence.ts`,\n * `@smthrs/flow/Action`, and `@smthrs/flow/FlowRuntime`); this module is the\n * barrel-exported surface so that `internal/` never has to be imported by\n * consumers.\n *\n * Related documentation: `docs/troubleshooting.md` names every code and\n * what to change; `docs/api.md` carries the schemas.\n *\n * @since 0.1.0\n */\n\nexport { IrreversibleRetryRequiresIdempotencyKey } from \"@smthrs/flow/Action\"\nexport { FlowCycleDetected } from \"@smthrs/flow/FlowRuntime\"\nexport {\n AttemptAdmissionRejected,\n AttemptEvidenceQuarantined,\n AttemptSuspended,\n CacheConflictDetected,\n CacheCorruptionDetected\n} from \"./internal/ActionPersistence.ts\"\nexport { RetentionError, RetentionErrorCode } from \"./internal/RetentionOps.ts\"\nexport { RunCatalogError, RunCatalogErrorCode } from \"./internal/RunCatalogOps.ts\"\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable engine journal record names shared with replay consumers.
|
|
3
|
+
*
|
|
4
|
+
* @since 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Persisted event types and the child-spawn effect kind. Writers and readers
|
|
8
|
+
* share these identities; changing a value requires migrating stored history.
|
|
9
|
+
* `childSpawnKind` names the effect inside a boundary, not its event type.
|
|
10
|
+
*
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category constants
|
|
13
|
+
*/
|
|
14
|
+
export declare const EventTypes: {
|
|
15
|
+
readonly runDecision: "flows.engine.run-decision";
|
|
16
|
+
readonly attemptStarted: "flows.engine.attempt-started";
|
|
17
|
+
readonly attemptFinished: "flows.engine.attempt-finished";
|
|
18
|
+
readonly snapshotIdentified: "flows.engine.snapshot-identified";
|
|
19
|
+
readonly planRecorded: "flows.engine.plan-recorded";
|
|
20
|
+
readonly subgraphAppended: "flows.engine.subgraph-appended";
|
|
21
|
+
readonly deferredCompleted: "flows.engine.deferred-completed";
|
|
22
|
+
readonly deferredConsumed: "flows.engine.deferred-consumed";
|
|
23
|
+
readonly clockScheduled: "flows.engine.clock-scheduled";
|
|
24
|
+
readonly clockCompleted: "flows.engine.clock-completed";
|
|
25
|
+
readonly childSpawnKind: "flows/engine-store/child-spawn";
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=EventTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventTypes.d.ts","sourceRoot":"","sources":["../../src/EventTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;CAYb,CAAA"}
|