@smthrs/engine-store 0.0.0-stage → 1.0.0-rc.4

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.
Files changed (787) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/LICENSE +21 -0
  3. package/README.md +146 -2
  4. package/dist/cjs/ArtifactGc.d.ts +235 -0
  5. package/dist/cjs/ArtifactGc.d.ts.map +1 -0
  6. package/dist/cjs/ArtifactGc.js +183 -0
  7. package/dist/cjs/ArtifactGc.js.map +7 -0
  8. package/dist/cjs/ArtifactSync.d.ts +164 -0
  9. package/dist/cjs/ArtifactSync.d.ts.map +1 -0
  10. package/dist/cjs/ArtifactSync.js +144 -0
  11. package/dist/cjs/ArtifactSync.js.map +7 -0
  12. package/dist/cjs/CacheSync.d.ts +112 -0
  13. package/dist/cjs/CacheSync.d.ts.map +1 -0
  14. package/dist/cjs/CacheSync.js +64 -0
  15. package/dist/cjs/CacheSync.js.map +7 -0
  16. package/dist/cjs/DeferredClockFold.d.ts +354 -0
  17. package/dist/cjs/DeferredClockFold.d.ts.map +1 -0
  18. package/dist/cjs/DeferredClockFold.js +335 -0
  19. package/dist/cjs/DeferredClockFold.js.map +7 -0
  20. package/dist/cjs/DisasterRecovery.d.ts +431 -0
  21. package/dist/cjs/DisasterRecovery.d.ts.map +1 -0
  22. package/dist/cjs/DisasterRecovery.js +453 -0
  23. package/dist/cjs/DisasterRecovery.js.map +7 -0
  24. package/dist/cjs/DurableEngineState.d.ts +776 -0
  25. package/dist/cjs/DurableEngineState.d.ts.map +1 -0
  26. package/dist/cjs/DurableEngineState.js +1536 -0
  27. package/dist/cjs/DurableEngineState.js.map +7 -0
  28. package/dist/cjs/EngineStore.d.ts +158 -0
  29. package/dist/cjs/EngineStore.d.ts.map +1 -0
  30. package/dist/cjs/EngineStore.js +398 -0
  31. package/dist/cjs/EngineStore.js.map +7 -0
  32. package/dist/cjs/EngineStoreMetrics.d.ts +276 -0
  33. package/dist/cjs/EngineStoreMetrics.d.ts.map +1 -0
  34. package/dist/cjs/EngineStoreMetrics.js +135 -0
  35. package/dist/cjs/EngineStoreMetrics.js.map +7 -0
  36. package/dist/cjs/Errors.d.ts +22 -0
  37. package/dist/cjs/Errors.d.ts.map +1 -0
  38. package/dist/cjs/Errors.js +39 -0
  39. package/dist/cjs/Errors.js.map +7 -0
  40. package/dist/cjs/EventTypes.d.ts +27 -0
  41. package/dist/cjs/EventTypes.d.ts.map +1 -0
  42. package/dist/cjs/EventTypes.js +37 -0
  43. package/dist/cjs/EventTypes.js.map +7 -0
  44. package/dist/cjs/ExecutionFacts.d.ts +59 -0
  45. package/dist/cjs/ExecutionFacts.d.ts.map +1 -0
  46. package/dist/cjs/ExecutionFacts.js +123 -0
  47. package/dist/cjs/ExecutionFacts.js.map +7 -0
  48. package/dist/cjs/ExecutionSnapshot.d.ts +117 -0
  49. package/dist/cjs/ExecutionSnapshot.d.ts.map +1 -0
  50. package/dist/cjs/ExecutionSnapshot.js +111 -0
  51. package/dist/cjs/ExecutionSnapshot.js.map +7 -0
  52. package/dist/cjs/Inconsistency.d.ts +154 -0
  53. package/dist/cjs/Inconsistency.d.ts.map +1 -0
  54. package/dist/cjs/Inconsistency.js +135 -0
  55. package/dist/cjs/Inconsistency.js.map +7 -0
  56. package/dist/cjs/Migrations.d.ts +56 -0
  57. package/dist/cjs/Migrations.d.ts.map +1 -0
  58. package/dist/cjs/Migrations.js +78 -0
  59. package/dist/cjs/Migrations.js.map +7 -0
  60. package/dist/cjs/OwnerIdentity.d.ts +91 -0
  61. package/dist/cjs/OwnerIdentity.d.ts.map +1 -0
  62. package/dist/cjs/OwnerIdentity.js +65 -0
  63. package/dist/cjs/OwnerIdentity.js.map +7 -0
  64. package/dist/cjs/PlanInputStore.d.ts +110 -0
  65. package/dist/cjs/PlanInputStore.d.ts.map +1 -0
  66. package/dist/cjs/PlanInputStore.js +224 -0
  67. package/dist/cjs/PlanInputStore.js.map +7 -0
  68. package/dist/cjs/PlanMergeStore.d.ts +113 -0
  69. package/dist/cjs/PlanMergeStore.d.ts.map +1 -0
  70. package/dist/cjs/PlanMergeStore.js +255 -0
  71. package/dist/cjs/PlanMergeStore.js.map +7 -0
  72. package/dist/cjs/PlanScheduler.d.ts +363 -0
  73. package/dist/cjs/PlanScheduler.d.ts.map +1 -0
  74. package/dist/cjs/PlanScheduler.js +1090 -0
  75. package/dist/cjs/PlanScheduler.js.map +7 -0
  76. package/dist/cjs/Reconciliation.d.ts +175 -0
  77. package/dist/cjs/Reconciliation.d.ts.map +1 -0
  78. package/dist/cjs/Reconciliation.js +119 -0
  79. package/dist/cjs/Reconciliation.js.map +7 -0
  80. package/dist/cjs/ReplayOnly.d.ts +91 -0
  81. package/dist/cjs/ReplayOnly.d.ts.map +1 -0
  82. package/dist/cjs/ReplayOnly.js +52 -0
  83. package/dist/cjs/ReplayOnly.js.map +7 -0
  84. package/dist/cjs/Retention.d.ts +113 -0
  85. package/dist/cjs/Retention.d.ts.map +1 -0
  86. package/dist/cjs/Retention.js +99 -0
  87. package/dist/cjs/Retention.js.map +7 -0
  88. package/dist/cjs/RunCatalogRead.d.ts +17 -0
  89. package/dist/cjs/RunCatalogRead.d.ts.map +1 -0
  90. package/dist/cjs/RunCatalogRead.js +33 -0
  91. package/dist/cjs/RunCatalogRead.js.map +7 -0
  92. package/dist/cjs/RunChangeFeed.d.ts +75 -0
  93. package/dist/cjs/RunChangeFeed.d.ts.map +1 -0
  94. package/dist/cjs/RunChangeFeed.js +96 -0
  95. package/dist/cjs/RunChangeFeed.js.map +7 -0
  96. package/dist/cjs/RunState.d.ts +116 -0
  97. package/dist/cjs/RunState.d.ts.map +1 -0
  98. package/dist/cjs/RunState.js +76 -0
  99. package/dist/cjs/RunState.js.map +7 -0
  100. package/dist/cjs/Selection.d.ts +495 -0
  101. package/dist/cjs/Selection.d.ts.map +1 -0
  102. package/dist/cjs/Selection.js +288 -0
  103. package/dist/cjs/Selection.js.map +7 -0
  104. package/dist/cjs/SelectionStore.d.ts +141 -0
  105. package/dist/cjs/SelectionStore.d.ts.map +1 -0
  106. package/dist/cjs/SelectionStore.js +229 -0
  107. package/dist/cjs/SelectionStore.js.map +7 -0
  108. package/dist/cjs/StepBoundary.d.ts +501 -0
  109. package/dist/cjs/StepBoundary.d.ts.map +1 -0
  110. package/dist/cjs/StepBoundary.js +619 -0
  111. package/dist/cjs/StepBoundary.js.map +7 -0
  112. package/dist/cjs/StepCacheFold.d.ts +148 -0
  113. package/dist/cjs/StepCacheFold.d.ts.map +1 -0
  114. package/dist/cjs/StepCacheFold.js +131 -0
  115. package/dist/cjs/StepCacheFold.js.map +7 -0
  116. package/dist/cjs/StepSandbox.d.ts +78 -0
  117. package/dist/cjs/StepSandbox.d.ts.map +1 -0
  118. package/dist/cjs/StepSandbox.js +75 -0
  119. package/dist/cjs/StepSandbox.js.map +7 -0
  120. package/dist/cjs/WakeBus.d.ts +116 -0
  121. package/dist/cjs/WakeBus.d.ts.map +1 -0
  122. package/dist/cjs/WakeBus.js +89 -0
  123. package/dist/cjs/WakeBus.js.map +7 -0
  124. package/dist/cjs/WorkspaceSandbox.d.ts +619 -0
  125. package/dist/cjs/WorkspaceSandbox.d.ts.map +1 -0
  126. package/dist/cjs/WorkspaceSandbox.js +711 -0
  127. package/dist/cjs/WorkspaceSandbox.js.map +7 -0
  128. package/dist/cjs/index.d.ts +157 -0
  129. package/dist/cjs/index.d.ts.map +1 -0
  130. package/dist/cjs/index.js +95 -0
  131. package/dist/cjs/index.js.map +7 -0
  132. package/dist/cjs/internal/ActionPersistence.d.ts +276 -0
  133. package/dist/cjs/internal/ActionPersistence.d.ts.map +1 -0
  134. package/dist/cjs/internal/ActionPersistence.js +1395 -0
  135. package/dist/cjs/internal/ActionPersistence.js.map +7 -0
  136. package/dist/cjs/internal/ArtifactRoots.d.ts +38 -0
  137. package/dist/cjs/internal/ArtifactRoots.d.ts.map +1 -0
  138. package/dist/cjs/internal/ArtifactRoots.js +89 -0
  139. package/dist/cjs/internal/ArtifactRoots.js.map +7 -0
  140. package/dist/cjs/internal/AttemptAdmission.d.ts +53 -0
  141. package/dist/cjs/internal/AttemptAdmission.d.ts.map +1 -0
  142. package/dist/cjs/internal/AttemptAdmission.js +52 -0
  143. package/dist/cjs/internal/AttemptAdmission.js.map +7 -0
  144. package/dist/cjs/internal/AttemptLifecycle.d.ts +245 -0
  145. package/dist/cjs/internal/AttemptLifecycle.d.ts.map +1 -0
  146. package/dist/cjs/internal/AttemptLifecycle.js +112 -0
  147. package/dist/cjs/internal/AttemptLifecycle.js.map +7 -0
  148. package/dist/cjs/internal/AttemptProbe.d.ts +53 -0
  149. package/dist/cjs/internal/AttemptProbe.d.ts.map +1 -0
  150. package/dist/cjs/internal/AttemptProbe.js +66 -0
  151. package/dist/cjs/internal/AttemptProbe.js.map +7 -0
  152. package/dist/cjs/internal/CacheAdmission.d.ts +79 -0
  153. package/dist/cjs/internal/CacheAdmission.d.ts.map +1 -0
  154. package/dist/cjs/internal/CacheAdmission.js +71 -0
  155. package/dist/cjs/internal/CacheAdmission.js.map +7 -0
  156. package/dist/cjs/internal/CacheAgeHistory.d.ts +27 -0
  157. package/dist/cjs/internal/CacheAgeHistory.d.ts.map +1 -0
  158. package/dist/cjs/internal/CacheAgeHistory.js +61 -0
  159. package/dist/cjs/internal/CacheAgeHistory.js.map +7 -0
  160. package/dist/cjs/internal/CacheAgeVerdicts.d.ts +15 -0
  161. package/dist/cjs/internal/CacheAgeVerdicts.d.ts.map +1 -0
  162. package/dist/cjs/internal/CacheAgeVerdicts.js +73 -0
  163. package/dist/cjs/internal/CacheAgeVerdicts.js.map +7 -0
  164. package/dist/cjs/internal/CacheOutputPolicy.d.ts +24 -0
  165. package/dist/cjs/internal/CacheOutputPolicy.d.ts.map +1 -0
  166. package/dist/cjs/internal/CacheOutputPolicy.js +75 -0
  167. package/dist/cjs/internal/CacheOutputPolicy.js.map +7 -0
  168. package/dist/cjs/internal/CachePublication.d.ts +97 -0
  169. package/dist/cjs/internal/CachePublication.d.ts.map +1 -0
  170. package/dist/cjs/internal/CachePublication.js +80 -0
  171. package/dist/cjs/internal/CachePublication.js.map +7 -0
  172. package/dist/cjs/internal/CallFacts.d.ts +15 -0
  173. package/dist/cjs/internal/CallFacts.d.ts.map +1 -0
  174. package/dist/cjs/internal/CallFacts.js +97 -0
  175. package/dist/cjs/internal/CallFacts.js.map +7 -0
  176. package/dist/cjs/internal/CopiedRecord.d.ts +61 -0
  177. package/dist/cjs/internal/CopiedRecord.d.ts.map +1 -0
  178. package/dist/cjs/internal/CopiedRecord.js +134 -0
  179. package/dist/cjs/internal/CopiedRecord.js.map +7 -0
  180. package/dist/cjs/internal/DeferredPersistence.d.ts +108 -0
  181. package/dist/cjs/internal/DeferredPersistence.d.ts.map +1 -0
  182. package/dist/cjs/internal/DeferredPersistence.js +270 -0
  183. package/dist/cjs/internal/DeferredPersistence.js.map +7 -0
  184. package/dist/cjs/internal/EffectRecords.d.ts +92 -0
  185. package/dist/cjs/internal/EffectRecords.d.ts.map +1 -0
  186. package/dist/cjs/internal/EffectRecords.js +63 -0
  187. package/dist/cjs/internal/EffectRecords.js.map +7 -0
  188. package/dist/cjs/internal/EngineJj.d.ts +30 -0
  189. package/dist/cjs/internal/EngineJj.d.ts.map +1 -0
  190. package/dist/cjs/internal/EngineJj.js +42 -0
  191. package/dist/cjs/internal/EngineJj.js.map +7 -0
  192. package/dist/cjs/internal/EngineStateSchema.d.ts +68 -0
  193. package/dist/cjs/internal/EngineStateSchema.d.ts.map +1 -0
  194. package/dist/cjs/internal/EngineStateSchema.js +58 -0
  195. package/dist/cjs/internal/EngineStateSchema.js.map +7 -0
  196. package/dist/cjs/internal/ExecutionSnapshotRead.d.ts +162 -0
  197. package/dist/cjs/internal/ExecutionSnapshotRead.d.ts.map +1 -0
  198. package/dist/cjs/internal/ExecutionSnapshotRead.js +201 -0
  199. package/dist/cjs/internal/ExecutionSnapshotRead.js.map +7 -0
  200. package/dist/cjs/internal/ExecutionSnapshotRelations.d.ts +39 -0
  201. package/dist/cjs/internal/ExecutionSnapshotRelations.d.ts.map +1 -0
  202. package/dist/cjs/internal/ExecutionSnapshotRelations.js +105 -0
  203. package/dist/cjs/internal/ExecutionSnapshotRelations.js.map +7 -0
  204. package/dist/cjs/internal/ExitEncoding.d.ts +180 -0
  205. package/dist/cjs/internal/ExitEncoding.d.ts.map +1 -0
  206. package/dist/cjs/internal/ExitEncoding.js +236 -0
  207. package/dist/cjs/internal/ExitEncoding.js.map +7 -0
  208. package/dist/cjs/internal/FileBoundarySnapshot.d.ts +14 -0
  209. package/dist/cjs/internal/FileBoundarySnapshot.d.ts.map +1 -0
  210. package/dist/cjs/internal/FileBoundarySnapshot.js +51 -0
  211. package/dist/cjs/internal/FileBoundarySnapshot.js.map +7 -0
  212. package/dist/cjs/internal/FileEnumeration.d.ts +127 -0
  213. package/dist/cjs/internal/FileEnumeration.d.ts.map +1 -0
  214. package/dist/cjs/internal/FileEnumeration.js +194 -0
  215. package/dist/cjs/internal/FileEnumeration.js.map +7 -0
  216. package/dist/cjs/internal/HostReflection.d.ts +80 -0
  217. package/dist/cjs/internal/HostReflection.d.ts.map +1 -0
  218. package/dist/cjs/internal/HostReflection.js +43 -0
  219. package/dist/cjs/internal/HostReflection.js.map +7 -0
  220. package/dist/cjs/internal/JournalRecords.d.ts +325 -0
  221. package/dist/cjs/internal/JournalRecords.d.ts.map +1 -0
  222. package/dist/cjs/internal/JournalRecords.js +122 -0
  223. package/dist/cjs/internal/JournalRecords.js.map +7 -0
  224. package/dist/cjs/internal/NodeJournal.d.ts +157 -0
  225. package/dist/cjs/internal/NodeJournal.d.ts.map +1 -0
  226. package/dist/cjs/internal/NodeJournal.js +192 -0
  227. package/dist/cjs/internal/NodeJournal.js.map +7 -0
  228. package/dist/cjs/internal/Ordering.d.ts +14 -0
  229. package/dist/cjs/internal/Ordering.d.ts.map +1 -0
  230. package/dist/cjs/internal/Ordering.js +25 -0
  231. package/dist/cjs/internal/Ordering.js.map +7 -0
  232. package/dist/cjs/internal/PlanInputs.d.ts +14 -0
  233. package/dist/cjs/internal/PlanInputs.d.ts.map +1 -0
  234. package/dist/cjs/internal/PlanInputs.js +78 -0
  235. package/dist/cjs/internal/PlanInputs.js.map +7 -0
  236. package/dist/cjs/internal/PlanMerges.d.ts +178 -0
  237. package/dist/cjs/internal/PlanMerges.d.ts.map +1 -0
  238. package/dist/cjs/internal/PlanMerges.js +125 -0
  239. package/dist/cjs/internal/PlanMerges.js.map +7 -0
  240. package/dist/cjs/internal/ProvenanceSlot.d.ts +30 -0
  241. package/dist/cjs/internal/ProvenanceSlot.d.ts.map +1 -0
  242. package/dist/cjs/internal/ProvenanceSlot.js +53 -0
  243. package/dist/cjs/internal/ProvenanceSlot.js.map +7 -0
  244. package/dist/cjs/internal/ResultEnvelope.d.ts +88 -0
  245. package/dist/cjs/internal/ResultEnvelope.d.ts.map +1 -0
  246. package/dist/cjs/internal/ResultEnvelope.js +90 -0
  247. package/dist/cjs/internal/ResultEnvelope.js.map +7 -0
  248. package/dist/cjs/internal/RetentionOps.d.ts +414 -0
  249. package/dist/cjs/internal/RetentionOps.d.ts.map +1 -0
  250. package/dist/cjs/internal/RetentionOps.js +354 -0
  251. package/dist/cjs/internal/RetentionOps.js.map +7 -0
  252. package/dist/cjs/internal/RunCatalogOps.d.ts +118 -0
  253. package/dist/cjs/internal/RunCatalogOps.d.ts.map +1 -0
  254. package/dist/cjs/internal/RunCatalogOps.js +85 -0
  255. package/dist/cjs/internal/RunCatalogOps.js.map +7 -0
  256. package/dist/cjs/internal/RunCoordinator.d.ts +78 -0
  257. package/dist/cjs/internal/RunCoordinator.d.ts.map +1 -0
  258. package/dist/cjs/internal/RunCoordinator.js +123 -0
  259. package/dist/cjs/internal/RunCoordinator.js.map +7 -0
  260. package/dist/cjs/internal/RunDriver.d.ts +192 -0
  261. package/dist/cjs/internal/RunDriver.d.ts.map +1 -0
  262. package/dist/cjs/internal/RunDriver.js +1586 -0
  263. package/dist/cjs/internal/RunDriver.js.map +7 -0
  264. package/dist/cjs/internal/RunLifecycle.d.ts +22 -0
  265. package/dist/cjs/internal/RunLifecycle.d.ts.map +1 -0
  266. package/dist/cjs/internal/RunLifecycle.js +63 -0
  267. package/dist/cjs/internal/RunLifecycle.js.map +7 -0
  268. package/dist/cjs/internal/RunListing.d.ts +78 -0
  269. package/dist/cjs/internal/RunListing.d.ts.map +1 -0
  270. package/dist/cjs/internal/RunListing.js +171 -0
  271. package/dist/cjs/internal/RunListing.js.map +7 -0
  272. package/dist/cjs/internal/RunListingError.d.ts +35 -0
  273. package/dist/cjs/internal/RunListingError.d.ts.map +1 -0
  274. package/dist/cjs/internal/RunListingError.js +47 -0
  275. package/dist/cjs/internal/RunListingError.js.map +7 -0
  276. package/dist/cjs/internal/RuntimeGraph.d.ts +73 -0
  277. package/dist/cjs/internal/RuntimeGraph.d.ts.map +1 -0
  278. package/dist/cjs/internal/RuntimeGraph.js +180 -0
  279. package/dist/cjs/internal/RuntimeGraph.js.map +7 -0
  280. package/dist/cjs/internal/SandboxedExecution.d.ts +80 -0
  281. package/dist/cjs/internal/SandboxedExecution.d.ts.map +1 -0
  282. package/dist/cjs/internal/SandboxedExecution.js +104 -0
  283. package/dist/cjs/internal/SandboxedExecution.js.map +7 -0
  284. package/dist/cjs/internal/StateTransaction.d.ts +44 -0
  285. package/dist/cjs/internal/StateTransaction.d.ts.map +1 -0
  286. package/dist/cjs/internal/StateTransaction.js +52 -0
  287. package/dist/cjs/internal/StateTransaction.js.map +7 -0
  288. package/dist/cjs/internal/StepFacts.d.ts +14 -0
  289. package/dist/cjs/internal/StepFacts.d.ts.map +1 -0
  290. package/dist/cjs/internal/StepFacts.js +58 -0
  291. package/dist/cjs/internal/StepFacts.js.map +7 -0
  292. package/dist/cjs/internal/TypedEvents.d.ts +14 -0
  293. package/dist/cjs/internal/TypedEvents.d.ts.map +1 -0
  294. package/dist/cjs/internal/TypedEvents.js +37 -0
  295. package/dist/cjs/internal/TypedEvents.js.map +7 -0
  296. package/dist/cjs/migrations/0001_initial.d.ts +17 -0
  297. package/dist/cjs/migrations/0001_initial.d.ts.map +1 -0
  298. package/dist/cjs/migrations/0001_initial.js +61 -0
  299. package/dist/cjs/migrations/0001_initial.js.map +7 -0
  300. package/dist/cjs/migrations/0002_selection_store.d.ts +15 -0
  301. package/dist/cjs/migrations/0002_selection_store.d.ts.map +1 -0
  302. package/dist/cjs/migrations/0002_selection_store.js +56 -0
  303. package/dist/cjs/migrations/0002_selection_store.js.map +7 -0
  304. package/dist/cjs/migrations/0003_plan_inputs.d.ts +13 -0
  305. package/dist/cjs/migrations/0003_plan_inputs.d.ts.map +1 -0
  306. package/dist/cjs/migrations/0003_plan_inputs.js +90 -0
  307. package/dist/cjs/migrations/0003_plan_inputs.js.map +7 -0
  308. package/dist/cjs/migrations/0004_plan_environment.d.ts +14 -0
  309. package/dist/cjs/migrations/0004_plan_environment.d.ts.map +1 -0
  310. package/dist/cjs/migrations/0004_plan_environment.js +56 -0
  311. package/dist/cjs/migrations/0004_plan_environment.js.map +7 -0
  312. package/dist/cjs/migrations/0005_plan_merges.d.ts +14 -0
  313. package/dist/cjs/migrations/0005_plan_merges.d.ts.map +1 -0
  314. package/dist/cjs/migrations/0005_plan_merges.js +82 -0
  315. package/dist/cjs/migrations/0005_plan_merges.js.map +7 -0
  316. package/dist/cjs/migrations/0006_execution_listing.d.ts +15 -0
  317. package/dist/cjs/migrations/0006_execution_listing.d.ts.map +1 -0
  318. package/dist/cjs/migrations/0006_execution_listing.js +101 -0
  319. package/dist/cjs/migrations/0006_execution_listing.js.map +7 -0
  320. package/dist/cjs/migrations/0007_run_parent_sequence.d.ts +15 -0
  321. package/dist/cjs/migrations/0007_run_parent_sequence.d.ts.map +1 -0
  322. package/dist/cjs/migrations/0007_run_parent_sequence.js +40 -0
  323. package/dist/cjs/migrations/0007_run_parent_sequence.js.map +7 -0
  324. package/dist/cjs/migrations/0008_deferred_consumption.d.ts +16 -0
  325. package/dist/cjs/migrations/0008_deferred_consumption.d.ts.map +1 -0
  326. package/dist/cjs/migrations/0008_deferred_consumption.js +45 -0
  327. package/dist/cjs/migrations/0008_deferred_consumption.js.map +7 -0
  328. package/dist/cjs/migrations/0009_deferred_clock_facts.d.ts +24 -0
  329. package/dist/cjs/migrations/0009_deferred_clock_facts.d.ts.map +1 -0
  330. package/dist/cjs/migrations/0009_deferred_clock_facts.js +141 -0
  331. package/dist/cjs/migrations/0009_deferred_clock_facts.js.map +7 -0
  332. package/dist/cjs/migrations/0010_pending_cancellation.d.ts +15 -0
  333. package/dist/cjs/migrations/0010_pending_cancellation.d.ts.map +1 -0
  334. package/dist/cjs/migrations/0010_pending_cancellation.js +41 -0
  335. package/dist/cjs/migrations/0010_pending_cancellation.js.map +7 -0
  336. package/dist/cjs/package.json +1 -0
  337. package/dist/cjs/test/TestStores.d.ts +89 -0
  338. package/dist/cjs/test/TestStores.d.ts.map +1 -0
  339. package/dist/cjs/test/TestStores.js +98 -0
  340. package/dist/cjs/test/TestStores.js.map +7 -0
  341. package/dist/esm/ArtifactGc.d.ts +235 -0
  342. package/dist/esm/ArtifactGc.d.ts.map +1 -0
  343. package/dist/esm/ArtifactGc.js +268 -0
  344. package/dist/esm/ArtifactGc.js.map +1 -0
  345. package/dist/esm/ArtifactSync.d.ts +164 -0
  346. package/dist/esm/ArtifactSync.d.ts.map +1 -0
  347. package/dist/esm/ArtifactSync.js +176 -0
  348. package/dist/esm/ArtifactSync.js.map +1 -0
  349. package/dist/esm/CacheSync.d.ts +112 -0
  350. package/dist/esm/CacheSync.d.ts.map +1 -0
  351. package/dist/esm/CacheSync.js +94 -0
  352. package/dist/esm/CacheSync.js.map +1 -0
  353. package/dist/esm/DeferredClockFold.d.ts +354 -0
  354. package/dist/esm/DeferredClockFold.d.ts.map +1 -0
  355. package/dist/esm/DeferredClockFold.js +472 -0
  356. package/dist/esm/DeferredClockFold.js.map +1 -0
  357. package/dist/esm/DisasterRecovery.d.ts +431 -0
  358. package/dist/esm/DisasterRecovery.d.ts.map +1 -0
  359. package/dist/esm/DisasterRecovery.js +523 -0
  360. package/dist/esm/DisasterRecovery.js.map +1 -0
  361. package/dist/esm/DurableEngineState.d.ts +776 -0
  362. package/dist/esm/DurableEngineState.d.ts.map +1 -0
  363. package/dist/esm/DurableEngineState.js +1648 -0
  364. package/dist/esm/DurableEngineState.js.map +1 -0
  365. package/dist/esm/EngineStore.d.ts +158 -0
  366. package/dist/esm/EngineStore.d.ts.map +1 -0
  367. package/dist/esm/EngineStore.js +403 -0
  368. package/dist/esm/EngineStore.js.map +1 -0
  369. package/dist/esm/EngineStoreMetrics.d.ts +276 -0
  370. package/dist/esm/EngineStoreMetrics.d.ts.map +1 -0
  371. package/dist/esm/EngineStoreMetrics.js +260 -0
  372. package/dist/esm/EngineStoreMetrics.js.map +1 -0
  373. package/dist/esm/Errors.d.ts +22 -0
  374. package/dist/esm/Errors.d.ts.map +1 -0
  375. package/dist/esm/Errors.js +22 -0
  376. package/dist/esm/Errors.js.map +1 -0
  377. package/dist/esm/EventTypes.d.ts +27 -0
  378. package/dist/esm/EventTypes.d.ts.map +1 -0
  379. package/dist/esm/EventTypes.js +27 -0
  380. package/dist/esm/EventTypes.js.map +1 -0
  381. package/dist/esm/ExecutionFacts.d.ts +59 -0
  382. package/dist/esm/ExecutionFacts.d.ts.map +1 -0
  383. package/dist/esm/ExecutionFacts.js +96 -0
  384. package/dist/esm/ExecutionFacts.js.map +1 -0
  385. package/dist/esm/ExecutionSnapshot.d.ts +117 -0
  386. package/dist/esm/ExecutionSnapshot.d.ts.map +1 -0
  387. package/dist/esm/ExecutionSnapshot.js +95 -0
  388. package/dist/esm/ExecutionSnapshot.js.map +1 -0
  389. package/dist/esm/Inconsistency.d.ts +154 -0
  390. package/dist/esm/Inconsistency.d.ts.map +1 -0
  391. package/dist/esm/Inconsistency.js +133 -0
  392. package/dist/esm/Inconsistency.js.map +1 -0
  393. package/dist/esm/Migrations.d.ts +56 -0
  394. package/dist/esm/Migrations.d.ts.map +1 -0
  395. package/dist/esm/Migrations.js +91 -0
  396. package/dist/esm/Migrations.js.map +1 -0
  397. package/dist/esm/OwnerIdentity.d.ts +91 -0
  398. package/dist/esm/OwnerIdentity.d.ts.map +1 -0
  399. package/dist/esm/OwnerIdentity.js +99 -0
  400. package/dist/esm/OwnerIdentity.js.map +1 -0
  401. package/dist/esm/PlanInputStore.d.ts +110 -0
  402. package/dist/esm/PlanInputStore.d.ts.map +1 -0
  403. package/dist/esm/PlanInputStore.js +207 -0
  404. package/dist/esm/PlanInputStore.js.map +1 -0
  405. package/dist/esm/PlanMergeStore.d.ts +113 -0
  406. package/dist/esm/PlanMergeStore.d.ts.map +1 -0
  407. package/dist/esm/PlanMergeStore.js +244 -0
  408. package/dist/esm/PlanMergeStore.js.map +1 -0
  409. package/dist/esm/PlanScheduler.d.ts +363 -0
  410. package/dist/esm/PlanScheduler.d.ts.map +1 -0
  411. package/dist/esm/PlanScheduler.js +1321 -0
  412. package/dist/esm/PlanScheduler.js.map +1 -0
  413. package/dist/esm/Reconciliation.d.ts +175 -0
  414. package/dist/esm/Reconciliation.d.ts.map +1 -0
  415. package/dist/esm/Reconciliation.js +175 -0
  416. package/dist/esm/Reconciliation.js.map +1 -0
  417. package/dist/esm/ReplayOnly.d.ts +91 -0
  418. package/dist/esm/ReplayOnly.d.ts.map +1 -0
  419. package/dist/esm/ReplayOnly.js +59 -0
  420. package/dist/esm/ReplayOnly.js.map +1 -0
  421. package/dist/esm/Retention.d.ts +113 -0
  422. package/dist/esm/Retention.d.ts.map +1 -0
  423. package/dist/esm/Retention.js +139 -0
  424. package/dist/esm/Retention.js.map +1 -0
  425. package/dist/esm/RunCatalogRead.d.ts +17 -0
  426. package/dist/esm/RunCatalogRead.d.ts.map +1 -0
  427. package/dist/esm/RunCatalogRead.js +17 -0
  428. package/dist/esm/RunCatalogRead.js.map +1 -0
  429. package/dist/esm/RunChangeFeed.d.ts +75 -0
  430. package/dist/esm/RunChangeFeed.d.ts.map +1 -0
  431. package/dist/esm/RunChangeFeed.js +81 -0
  432. package/dist/esm/RunChangeFeed.js.map +1 -0
  433. package/dist/esm/RunState.d.ts +116 -0
  434. package/dist/esm/RunState.d.ts.map +1 -0
  435. package/dist/esm/RunState.js +109 -0
  436. package/dist/esm/RunState.js.map +1 -0
  437. package/dist/esm/Selection.d.ts +495 -0
  438. package/dist/esm/Selection.d.ts.map +1 -0
  439. package/dist/esm/Selection.js +482 -0
  440. package/dist/esm/Selection.js.map +1 -0
  441. package/dist/esm/SelectionStore.d.ts +141 -0
  442. package/dist/esm/SelectionStore.d.ts.map +1 -0
  443. package/dist/esm/SelectionStore.js +215 -0
  444. package/dist/esm/SelectionStore.js.map +1 -0
  445. package/dist/esm/StepBoundary.d.ts +501 -0
  446. package/dist/esm/StepBoundary.d.ts.map +1 -0
  447. package/dist/esm/StepBoundary.js +919 -0
  448. package/dist/esm/StepBoundary.js.map +1 -0
  449. package/dist/esm/StepCacheFold.d.ts +148 -0
  450. package/dist/esm/StepCacheFold.d.ts.map +1 -0
  451. package/dist/esm/StepCacheFold.js +201 -0
  452. package/dist/esm/StepCacheFold.js.map +1 -0
  453. package/dist/esm/StepSandbox.d.ts +78 -0
  454. package/dist/esm/StepSandbox.d.ts.map +1 -0
  455. package/dist/esm/StepSandbox.js +70 -0
  456. package/dist/esm/StepSandbox.js.map +1 -0
  457. package/dist/esm/WakeBus.d.ts +116 -0
  458. package/dist/esm/WakeBus.d.ts.map +1 -0
  459. package/dist/esm/WakeBus.js +121 -0
  460. package/dist/esm/WakeBus.js.map +1 -0
  461. package/dist/esm/WorkspaceSandbox.d.ts +619 -0
  462. package/dist/esm/WorkspaceSandbox.d.ts.map +1 -0
  463. package/dist/esm/WorkspaceSandbox.js +985 -0
  464. package/dist/esm/WorkspaceSandbox.js.map +1 -0
  465. package/dist/esm/index.d.ts +157 -0
  466. package/dist/esm/index.d.ts.map +1 -0
  467. package/dist/esm/index.js +157 -0
  468. package/dist/esm/index.js.map +1 -0
  469. package/dist/esm/internal/ActionPersistence.d.ts +276 -0
  470. package/dist/esm/internal/ActionPersistence.d.ts.map +1 -0
  471. package/dist/esm/internal/ActionPersistence.js +2306 -0
  472. package/dist/esm/internal/ActionPersistence.js.map +1 -0
  473. package/dist/esm/internal/ArtifactRoots.d.ts +38 -0
  474. package/dist/esm/internal/ArtifactRoots.d.ts.map +1 -0
  475. package/dist/esm/internal/ArtifactRoots.js +76 -0
  476. package/dist/esm/internal/ArtifactRoots.js.map +1 -0
  477. package/dist/esm/internal/AttemptAdmission.d.ts +53 -0
  478. package/dist/esm/internal/AttemptAdmission.d.ts.map +1 -0
  479. package/dist/esm/internal/AttemptAdmission.js +52 -0
  480. package/dist/esm/internal/AttemptAdmission.js.map +1 -0
  481. package/dist/esm/internal/AttemptLifecycle.d.ts +245 -0
  482. package/dist/esm/internal/AttemptLifecycle.d.ts.map +1 -0
  483. package/dist/esm/internal/AttemptLifecycle.js +104 -0
  484. package/dist/esm/internal/AttemptLifecycle.js.map +1 -0
  485. package/dist/esm/internal/AttemptProbe.d.ts +53 -0
  486. package/dist/esm/internal/AttemptProbe.d.ts.map +1 -0
  487. package/dist/esm/internal/AttemptProbe.js +83 -0
  488. package/dist/esm/internal/AttemptProbe.js.map +1 -0
  489. package/dist/esm/internal/CacheAdmission.d.ts +79 -0
  490. package/dist/esm/internal/CacheAdmission.d.ts.map +1 -0
  491. package/dist/esm/internal/CacheAdmission.js +72 -0
  492. package/dist/esm/internal/CacheAdmission.js.map +1 -0
  493. package/dist/esm/internal/CacheAgeHistory.d.ts +27 -0
  494. package/dist/esm/internal/CacheAgeHistory.d.ts.map +1 -0
  495. package/dist/esm/internal/CacheAgeHistory.js +49 -0
  496. package/dist/esm/internal/CacheAgeHistory.js.map +1 -0
  497. package/dist/esm/internal/CacheAgeVerdicts.d.ts +15 -0
  498. package/dist/esm/internal/CacheAgeVerdicts.d.ts.map +1 -0
  499. package/dist/esm/internal/CacheAgeVerdicts.js +54 -0
  500. package/dist/esm/internal/CacheAgeVerdicts.js.map +1 -0
  501. package/dist/esm/internal/CacheOutputPolicy.d.ts +24 -0
  502. package/dist/esm/internal/CacheOutputPolicy.d.ts.map +1 -0
  503. package/dist/esm/internal/CacheOutputPolicy.js +73 -0
  504. package/dist/esm/internal/CacheOutputPolicy.js.map +1 -0
  505. package/dist/esm/internal/CachePublication.d.ts +97 -0
  506. package/dist/esm/internal/CachePublication.d.ts.map +1 -0
  507. package/dist/esm/internal/CachePublication.js +116 -0
  508. package/dist/esm/internal/CachePublication.js.map +1 -0
  509. package/dist/esm/internal/CallFacts.d.ts +15 -0
  510. package/dist/esm/internal/CallFacts.d.ts.map +1 -0
  511. package/dist/esm/internal/CallFacts.js +83 -0
  512. package/dist/esm/internal/CallFacts.js.map +1 -0
  513. package/dist/esm/internal/CopiedRecord.d.ts +61 -0
  514. package/dist/esm/internal/CopiedRecord.d.ts.map +1 -0
  515. package/dist/esm/internal/CopiedRecord.js +165 -0
  516. package/dist/esm/internal/CopiedRecord.js.map +1 -0
  517. package/dist/esm/internal/DeferredPersistence.d.ts +108 -0
  518. package/dist/esm/internal/DeferredPersistence.d.ts.map +1 -0
  519. package/dist/esm/internal/DeferredPersistence.js +240 -0
  520. package/dist/esm/internal/DeferredPersistence.js.map +1 -0
  521. package/dist/esm/internal/EffectRecords.d.ts +92 -0
  522. package/dist/esm/internal/EffectRecords.d.ts.map +1 -0
  523. package/dist/esm/internal/EffectRecords.js +94 -0
  524. package/dist/esm/internal/EffectRecords.js.map +1 -0
  525. package/dist/esm/internal/EngineJj.d.ts +30 -0
  526. package/dist/esm/internal/EngineJj.d.ts.map +1 -0
  527. package/dist/esm/internal/EngineJj.js +29 -0
  528. package/dist/esm/internal/EngineJj.js.map +1 -0
  529. package/dist/esm/internal/EngineStateSchema.d.ts +68 -0
  530. package/dist/esm/internal/EngineStateSchema.d.ts.map +1 -0
  531. package/dist/esm/internal/EngineStateSchema.js +53 -0
  532. package/dist/esm/internal/EngineStateSchema.js.map +1 -0
  533. package/dist/esm/internal/ExecutionSnapshotRead.d.ts +162 -0
  534. package/dist/esm/internal/ExecutionSnapshotRead.d.ts.map +1 -0
  535. package/dist/esm/internal/ExecutionSnapshotRead.js +218 -0
  536. package/dist/esm/internal/ExecutionSnapshotRead.js.map +1 -0
  537. package/dist/esm/internal/ExecutionSnapshotRelations.d.ts +39 -0
  538. package/dist/esm/internal/ExecutionSnapshotRelations.d.ts.map +1 -0
  539. package/dist/esm/internal/ExecutionSnapshotRelations.js +81 -0
  540. package/dist/esm/internal/ExecutionSnapshotRelations.js.map +1 -0
  541. package/dist/esm/internal/ExitEncoding.d.ts +180 -0
  542. package/dist/esm/internal/ExitEncoding.d.ts.map +1 -0
  543. package/dist/esm/internal/ExitEncoding.js +361 -0
  544. package/dist/esm/internal/ExitEncoding.js.map +1 -0
  545. package/dist/esm/internal/FileBoundarySnapshot.d.ts +14 -0
  546. package/dist/esm/internal/FileBoundarySnapshot.d.ts.map +1 -0
  547. package/dist/esm/internal/FileBoundarySnapshot.js +29 -0
  548. package/dist/esm/internal/FileBoundarySnapshot.js.map +1 -0
  549. package/dist/esm/internal/FileEnumeration.d.ts +127 -0
  550. package/dist/esm/internal/FileEnumeration.d.ts.map +1 -0
  551. package/dist/esm/internal/FileEnumeration.js +236 -0
  552. package/dist/esm/internal/FileEnumeration.js.map +1 -0
  553. package/dist/esm/internal/HostReflection.d.ts +80 -0
  554. package/dist/esm/internal/HostReflection.d.ts.map +1 -0
  555. package/dist/esm/internal/HostReflection.js +98 -0
  556. package/dist/esm/internal/HostReflection.js.map +1 -0
  557. package/dist/esm/internal/JournalRecords.d.ts +325 -0
  558. package/dist/esm/internal/JournalRecords.d.ts.map +1 -0
  559. package/dist/esm/internal/JournalRecords.js +306 -0
  560. package/dist/esm/internal/JournalRecords.js.map +1 -0
  561. package/dist/esm/internal/NodeJournal.d.ts +157 -0
  562. package/dist/esm/internal/NodeJournal.d.ts.map +1 -0
  563. package/dist/esm/internal/NodeJournal.js +298 -0
  564. package/dist/esm/internal/NodeJournal.js.map +1 -0
  565. package/dist/esm/internal/Ordering.d.ts +14 -0
  566. package/dist/esm/internal/Ordering.d.ts.map +1 -0
  567. package/dist/esm/internal/Ordering.js +14 -0
  568. package/dist/esm/internal/Ordering.js.map +1 -0
  569. package/dist/esm/internal/PlanInputs.d.ts +14 -0
  570. package/dist/esm/internal/PlanInputs.d.ts.map +1 -0
  571. package/dist/esm/internal/PlanInputs.js +57 -0
  572. package/dist/esm/internal/PlanInputs.js.map +1 -0
  573. package/dist/esm/internal/PlanMerges.d.ts +178 -0
  574. package/dist/esm/internal/PlanMerges.d.ts.map +1 -0
  575. package/dist/esm/internal/PlanMerges.js +113 -0
  576. package/dist/esm/internal/PlanMerges.js.map +1 -0
  577. package/dist/esm/internal/ProvenanceSlot.d.ts +30 -0
  578. package/dist/esm/internal/ProvenanceSlot.d.ts.map +1 -0
  579. package/dist/esm/internal/ProvenanceSlot.js +39 -0
  580. package/dist/esm/internal/ProvenanceSlot.js.map +1 -0
  581. package/dist/esm/internal/ResultEnvelope.d.ts +88 -0
  582. package/dist/esm/internal/ResultEnvelope.d.ts.map +1 -0
  583. package/dist/esm/internal/ResultEnvelope.js +83 -0
  584. package/dist/esm/internal/ResultEnvelope.js.map +1 -0
  585. package/dist/esm/internal/RetentionOps.d.ts +414 -0
  586. package/dist/esm/internal/RetentionOps.d.ts.map +1 -0
  587. package/dist/esm/internal/RetentionOps.js +576 -0
  588. package/dist/esm/internal/RetentionOps.js.map +1 -0
  589. package/dist/esm/internal/RunCatalogOps.d.ts +118 -0
  590. package/dist/esm/internal/RunCatalogOps.d.ts.map +1 -0
  591. package/dist/esm/internal/RunCatalogOps.js +120 -0
  592. package/dist/esm/internal/RunCatalogOps.js.map +1 -0
  593. package/dist/esm/internal/RunCoordinator.d.ts +78 -0
  594. package/dist/esm/internal/RunCoordinator.d.ts.map +1 -0
  595. package/dist/esm/internal/RunCoordinator.js +115 -0
  596. package/dist/esm/internal/RunCoordinator.js.map +1 -0
  597. package/dist/esm/internal/RunDriver.d.ts +192 -0
  598. package/dist/esm/internal/RunDriver.d.ts.map +1 -0
  599. package/dist/esm/internal/RunDriver.js +2334 -0
  600. package/dist/esm/internal/RunDriver.js.map +1 -0
  601. package/dist/esm/internal/RunLifecycle.d.ts +22 -0
  602. package/dist/esm/internal/RunLifecycle.d.ts.map +1 -0
  603. package/dist/esm/internal/RunLifecycle.js +49 -0
  604. package/dist/esm/internal/RunLifecycle.js.map +1 -0
  605. package/dist/esm/internal/RunListing.d.ts +78 -0
  606. package/dist/esm/internal/RunListing.d.ts.map +1 -0
  607. package/dist/esm/internal/RunListing.js +146 -0
  608. package/dist/esm/internal/RunListing.js.map +1 -0
  609. package/dist/esm/internal/RunListingError.d.ts +35 -0
  610. package/dist/esm/internal/RunListingError.d.ts.map +1 -0
  611. package/dist/esm/internal/RunListingError.js +27 -0
  612. package/dist/esm/internal/RunListingError.js.map +1 -0
  613. package/dist/esm/internal/RuntimeGraph.d.ts +73 -0
  614. package/dist/esm/internal/RuntimeGraph.d.ts.map +1 -0
  615. package/dist/esm/internal/RuntimeGraph.js +182 -0
  616. package/dist/esm/internal/RuntimeGraph.js.map +1 -0
  617. package/dist/esm/internal/SandboxedExecution.d.ts +80 -0
  618. package/dist/esm/internal/SandboxedExecution.d.ts.map +1 -0
  619. package/dist/esm/internal/SandboxedExecution.js +107 -0
  620. package/dist/esm/internal/SandboxedExecution.js.map +1 -0
  621. package/dist/esm/internal/StateTransaction.d.ts +44 -0
  622. package/dist/esm/internal/StateTransaction.d.ts.map +1 -0
  623. package/dist/esm/internal/StateTransaction.js +54 -0
  624. package/dist/esm/internal/StateTransaction.js.map +1 -0
  625. package/dist/esm/internal/StepFacts.d.ts +14 -0
  626. package/dist/esm/internal/StepFacts.d.ts.map +1 -0
  627. package/dist/esm/internal/StepFacts.js +35 -0
  628. package/dist/esm/internal/StepFacts.js.map +1 -0
  629. package/dist/esm/internal/TypedEvents.d.ts +14 -0
  630. package/dist/esm/internal/TypedEvents.d.ts.map +1 -0
  631. package/dist/esm/internal/TypedEvents.js +14 -0
  632. package/dist/esm/internal/TypedEvents.js.map +1 -0
  633. package/dist/esm/migrations/0001_initial.d.ts +17 -0
  634. package/dist/esm/migrations/0001_initial.d.ts.map +1 -0
  635. package/dist/esm/migrations/0001_initial.js +41 -0
  636. package/dist/esm/migrations/0001_initial.js.map +1 -0
  637. package/dist/esm/migrations/0002_selection_store.d.ts +15 -0
  638. package/dist/esm/migrations/0002_selection_store.d.ts.map +1 -0
  639. package/dist/esm/migrations/0002_selection_store.js +34 -0
  640. package/dist/esm/migrations/0002_selection_store.js.map +1 -0
  641. package/dist/esm/migrations/0003_plan_inputs.d.ts +13 -0
  642. package/dist/esm/migrations/0003_plan_inputs.d.ts.map +1 -0
  643. package/dist/esm/migrations/0003_plan_inputs.js +70 -0
  644. package/dist/esm/migrations/0003_plan_inputs.js.map +1 -0
  645. package/dist/esm/migrations/0004_plan_environment.d.ts +14 -0
  646. package/dist/esm/migrations/0004_plan_environment.d.ts.map +1 -0
  647. package/dist/esm/migrations/0004_plan_environment.js +33 -0
  648. package/dist/esm/migrations/0004_plan_environment.js.map +1 -0
  649. package/dist/esm/migrations/0005_plan_merges.d.ts +14 -0
  650. package/dist/esm/migrations/0005_plan_merges.d.ts.map +1 -0
  651. package/dist/esm/migrations/0005_plan_merges.js +59 -0
  652. package/dist/esm/migrations/0005_plan_merges.js.map +1 -0
  653. package/dist/esm/migrations/0006_execution_listing.d.ts +15 -0
  654. package/dist/esm/migrations/0006_execution_listing.d.ts.map +1 -0
  655. package/dist/esm/migrations/0006_execution_listing.js +81 -0
  656. package/dist/esm/migrations/0006_execution_listing.js.map +1 -0
  657. package/dist/esm/migrations/0007_run_parent_sequence.d.ts +15 -0
  658. package/dist/esm/migrations/0007_run_parent_sequence.d.ts.map +1 -0
  659. package/dist/esm/migrations/0007_run_parent_sequence.js +18 -0
  660. package/dist/esm/migrations/0007_run_parent_sequence.js.map +1 -0
  661. package/dist/esm/migrations/0008_deferred_consumption.d.ts +16 -0
  662. package/dist/esm/migrations/0008_deferred_consumption.d.ts.map +1 -0
  663. package/dist/esm/migrations/0008_deferred_consumption.js +24 -0
  664. package/dist/esm/migrations/0008_deferred_consumption.js.map +1 -0
  665. package/dist/esm/migrations/0009_deferred_clock_facts.d.ts +24 -0
  666. package/dist/esm/migrations/0009_deferred_clock_facts.d.ts.map +1 -0
  667. package/dist/esm/migrations/0009_deferred_clock_facts.js +127 -0
  668. package/dist/esm/migrations/0009_deferred_clock_facts.js.map +1 -0
  669. package/dist/esm/migrations/0010_pending_cancellation.d.ts +15 -0
  670. package/dist/esm/migrations/0010_pending_cancellation.d.ts.map +1 -0
  671. package/dist/esm/migrations/0010_pending_cancellation.js +19 -0
  672. package/dist/esm/migrations/0010_pending_cancellation.js.map +1 -0
  673. package/dist/esm/test/TestStores.d.ts +89 -0
  674. package/dist/esm/test/TestStores.d.ts.map +1 -0
  675. package/dist/esm/test/TestStores.js +103 -0
  676. package/dist/esm/test/TestStores.js.map +1 -0
  677. package/docs/README.md +113 -0
  678. package/docs/api.md +1494 -0
  679. package/docs/concepts/attempts-and-replay.md +149 -0
  680. package/docs/concepts/cache-admission.md +265 -0
  681. package/docs/concepts/call-facts.md +86 -0
  682. package/docs/concepts/durable-waits.md +175 -0
  683. package/docs/concepts/execution-facts.md +90 -0
  684. package/docs/concepts/ownership-and-fencing.md +128 -0
  685. package/docs/concepts/step-boundaries.md +148 -0
  686. package/docs/concepts/workspace-transactions.md +199 -0
  687. package/docs/event-types.md +14 -0
  688. package/docs/guides/back-up-and-restore.md +164 -0
  689. package/docs/guides/collect-unreferenced-artifacts.md +128 -0
  690. package/docs/guides/compose-a-durable-engine.md +146 -0
  691. package/docs/guides/coordinate-two-processes.md +120 -0
  692. package/docs/guides/defer-work-with-selection.md +171 -0
  693. package/docs/guides/delete-old-run-history.md +154 -0
  694. package/docs/guides/drive-a-plan.md +314 -0
  695. package/docs/guides/observe-engine-metrics.md +98 -0
  696. package/docs/guides/observe-executions.md +187 -0
  697. package/docs/guides/reclaim-runs-from-a-dead-host.md +133 -0
  698. package/docs/guides/share-a-cache-across-machines.md +134 -0
  699. package/docs/guides/testing.md +123 -0
  700. package/docs/installation.md +102 -0
  701. package/docs/quickstart.md +215 -0
  702. package/docs/troubleshooting.md +347 -0
  703. package/package.json +438 -3
  704. package/src/ArtifactGc.ts +408 -0
  705. package/src/ArtifactSync.ts +278 -0
  706. package/src/CacheSync.ts +131 -0
  707. package/src/DeferredClockFold.ts +586 -0
  708. package/src/DisasterRecovery.ts +888 -0
  709. package/src/DurableEngineState.ts +2656 -0
  710. package/src/EngineStore.ts +656 -0
  711. package/src/EngineStoreMetrics.ts +331 -0
  712. package/src/Errors.ts +28 -0
  713. package/src/EventTypes.ts +27 -0
  714. package/src/ExecutionFacts.ts +125 -0
  715. package/src/ExecutionSnapshot.ts +186 -0
  716. package/src/Inconsistency.ts +253 -0
  717. package/src/Migrations.ts +95 -0
  718. package/src/OwnerIdentity.ts +125 -0
  719. package/src/PlanInputStore.ts +292 -0
  720. package/src/PlanMergeStore.ts +330 -0
  721. package/src/PlanScheduler.ts +1806 -0
  722. package/src/Reconciliation.ts +224 -0
  723. package/src/ReplayOnly.ts +95 -0
  724. package/src/Retention.ts +214 -0
  725. package/src/RunCatalogRead.ts +27 -0
  726. package/src/RunChangeFeed.ts +125 -0
  727. package/src/RunState.ts +137 -0
  728. package/src/Selection.ts +683 -0
  729. package/src/SelectionStore.ts +353 -0
  730. package/src/StepBoundary.ts +1165 -0
  731. package/src/StepCacheFold.ts +244 -0
  732. package/src/StepSandbox.ts +110 -0
  733. package/src/WakeBus.ts +167 -0
  734. package/src/WorkspaceSandbox.ts +1604 -0
  735. package/src/index.ts +185 -0
  736. package/src/internal/ActionPersistence.ts +2687 -0
  737. package/src/internal/ArtifactRoots.ts +92 -0
  738. package/src/internal/AttemptAdmission.ts +76 -0
  739. package/src/internal/AttemptLifecycle.ts +163 -0
  740. package/src/internal/AttemptProbe.ts +90 -0
  741. package/src/internal/CacheAdmission.ts +133 -0
  742. package/src/internal/CacheAgeHistory.ts +58 -0
  743. package/src/internal/CacheAgeVerdicts.ts +61 -0
  744. package/src/internal/CacheOutputPolicy.ts +82 -0
  745. package/src/internal/CachePublication.ts +153 -0
  746. package/src/internal/CallFacts.ts +87 -0
  747. package/src/internal/CopiedRecord.ts +201 -0
  748. package/src/internal/DeferredPersistence.ts +459 -0
  749. package/src/internal/EffectRecords.ts +136 -0
  750. package/src/internal/EngineJj.ts +30 -0
  751. package/src/internal/EngineStateSchema.ts +92 -0
  752. package/src/internal/ExecutionSnapshotRead.ts +300 -0
  753. package/src/internal/ExecutionSnapshotRelations.ts +121 -0
  754. package/src/internal/ExitEncoding.ts +453 -0
  755. package/src/internal/FileBoundarySnapshot.ts +39 -0
  756. package/src/internal/FileEnumeration.ts +334 -0
  757. package/src/internal/HostReflection.ts +128 -0
  758. package/src/internal/JournalRecords.ts +396 -0
  759. package/src/internal/NodeJournal.ts +340 -0
  760. package/src/internal/Ordering.ts +14 -0
  761. package/src/internal/PlanInputs.ts +62 -0
  762. package/src/internal/PlanMerges.ts +123 -0
  763. package/src/internal/ProvenanceSlot.ts +52 -0
  764. package/src/internal/ResultEnvelope.ts +118 -0
  765. package/src/internal/RetentionOps.ts +865 -0
  766. package/src/internal/RunCatalogOps.ts +174 -0
  767. package/src/internal/RunCoordinator.ts +215 -0
  768. package/src/internal/RunDriver.ts +3154 -0
  769. package/src/internal/RunLifecycle.ts +53 -0
  770. package/src/internal/RunListing.ts +210 -0
  771. package/src/internal/RunListingError.ts +37 -0
  772. package/src/internal/RuntimeGraph.ts +253 -0
  773. package/src/internal/SandboxedExecution.ts +165 -0
  774. package/src/internal/StateTransaction.ts +71 -0
  775. package/src/internal/StepFacts.ts +36 -0
  776. package/src/internal/TypedEvents.ts +29 -0
  777. package/src/migrations/0001_initial.ts +51 -0
  778. package/src/migrations/0002_selection_store.ts +38 -0
  779. package/src/migrations/0003_plan_inputs.ts +75 -0
  780. package/src/migrations/0004_plan_environment.ts +34 -0
  781. package/src/migrations/0005_plan_merges.ts +60 -0
  782. package/src/migrations/0006_execution_listing.ts +86 -0
  783. package/src/migrations/0007_run_parent_sequence.ts +19 -0
  784. package/src/migrations/0008_deferred_consumption.ts +27 -0
  785. package/src/migrations/0009_deferred_clock_facts.ts +163 -0
  786. package/src/migrations/0010_pending_cancellation.ts +20 -0
  787. package/src/test/TestStores.ts +145 -0
@@ -0,0 +1,149 @@
1
+ ---
2
+ title: "Attempts and replay"
3
+ description: "What the engine persists for each step attempt, how a restart replays a settled row instead of re-executing it, and which admission checks refuse an attempt outright."
4
+ sidebar:
5
+ order: 2
6
+ ---
7
+
8
+ An attempt is one execution of one step under one key. The engine writes a row
9
+ before the body runs and settles that row afterwards, so the record of what
10
+ happened outlives the process that made it. Replay is the consequence: a
11
+ restarted engine reads the row and reproduces its outcome instead of running
12
+ the body a second time.
13
+
14
+ ## The step key is the address
15
+
16
+ Every dispatch is keyed. The key is a digest of the declaration and the
17
+ material the step consumes, and the engine stores it hashed: cache addresses
18
+ are the injected `Sha256` transformation of the step key, never the raw
19
+ `key1_...` value.
20
+
21
+ Two consequences follow. A declaration change produces a new key, so a step
22
+ whose code moved is never served the old answer. And two runs that declare the
23
+ same step under the same material land on the same address, which is what makes
24
+ a result shareable at all. Whether it is actually shared is a separate
25
+ question, answered in [Cache admission](./cache-admission.md).
26
+
27
+ ## What a replay does with each row state
28
+
29
+ | Persisted row | What a replay does |
30
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
31
+ | `succeeded` | Returns the recorded result, and calls `StepBoundary.replayOutputs` first so the workspace holds the outputs the step produced. |
32
+ | `failed` | Rethrows the persisted domain failure. It never re-admits the attempt. |
33
+ | `running` | Recovers under the run fence and shared admission permit, honoring any recorded effect crossing. |
34
+ | `suspended` | Continues the same attempt rather than burning a new one against the retry budget. |
35
+
36
+ An admitted attempt remains authoritative when a matching shared cache row
37
+ exists; another run's cached success cannot replace its result or failure.
38
+ Failure values were schema-encoded before persistence, so a `_tag` survives
39
+ the JSON round trip and a `RetryPolicy`'s non-retryable matching still applies
40
+ on replay.
41
+
42
+ ## Which columns are redacted
43
+
44
+ Attempt and run rows share a database with the journal, so failure text meets
45
+ the journal's redaction rules (`Redaction.defaultRules`) on write. Only text
46
+ that replay never classifies on is rewritten:
47
+
48
+ | Column | Redacted |
49
+ | ----------------------------- | -------------------------------------------------------------------------------------------------------- |
50
+ | `flows_attempts.error_json` | String `message` and `stack` members of each persisted reason. `_tag` and every other member stay exact. |
51
+ | `flows_runs.state_json` | The `message` and `stack` text of an unencodable-settlement projection. |
52
+ | `flows_attempts.outcome_json` | Never. It is the executable copy replay returns, byte for byte. |
53
+
54
+ A redacted failure still replays as the same typed failure, because
55
+ `RetryPolicy` matches on `_tag`. A value that must never reach `outcome_json`
56
+ belongs in a `Redacted` field of the action's own success schema.
57
+
58
+ ## Admission is exclusive per key
59
+
60
+ Each engine or plan scheduler shares admission permits across its dispatches.
61
+ A permit covers one run and step key through admission, execution, and
62
+ settlement. Concurrent same-key dispatches wait, then replay the settled
63
+ attempt instead of executing another body. Interruption releases the permit.
64
+
65
+ Holding the permit and the run fence permits recovery of a stranded `running`
66
+ attempt. A recorded successful effect crossing supplies the result directly;
67
+ an unresolved irreversible crossing requires an idempotency key before retry.
68
+ The durable owner and admission checks still refuse a superseded fence or a
69
+ conflicting attempt row.
70
+
71
+ ## Attempt counters survive pruning
72
+
73
+ Two questions come up on a resume, and both are answered from the surviving
74
+ attempt rows rather than from a counter held in memory:
75
+
76
+ - Which attempt number is this? The engine resumes from the persisted
77
+ sequence rather than restarting at 1.
78
+ - When did retrying start? `actionRetryOrigin` degrades to the earliest
79
+ surviving attempt row when a retention pass pruned attempt 1.
80
+ - What did the world look like before retrying started? `actionSnapshot`
81
+ returns the earliest `SnapshotBoundary` handle a surviving compensable
82
+ attempt row persisted, so a restarted retry restores that pre-image. The
83
+ handle is written into the running row before the body runs, and a replayed
84
+ attempt never touches the boundary.
85
+
86
+ `DurableEngineState.attemptSurvivors` answers both in one range read, returning
87
+ `{ earliestAttempt, earliestStartedAtMs, latest }`. It is optional on the
88
+ service: storage that cannot range-scan `flows_attempts` omits it, and the
89
+ engine falls back to per-attempt point reads against `AttemptStore`.
90
+
91
+ ## The cache converges with the journal
92
+
93
+ A crash can land between `attempts.finish` and `cache.put`. The restarted
94
+ executor re-records the sealed completion, with fresh cache provenance, rather
95
+ than leaving the cache permanently behind the journal. If the row that was
96
+ already recorded disagrees with what this run produced, that divergence is not
97
+ resolved silently: it goes to the `Inconsistency` receiver, which is strict by
98
+ default and fails the dispatch.
99
+
100
+ ## Corrupt evidence on a succeeded row is quarantined, not evicted
101
+
102
+ A shared cache row whose bytes no longer hash to their recorded digest is
103
+ evictable: the next dispatch re-executes and re-captures cleanly, and the
104
+ failure is reported as `CacheCorruptionDetected` so a failing disk stays
105
+ visible.
106
+
107
+ A succeeded attempt row is different. It records that this run's side effects
108
+ already ran, so evicting and re-executing would break exactly-once for an
109
+ irreversible action. Under the strict verdict the corrupt evidence is
110
+ quarantined instead: the driver parks the first detection in the `quarantine`
111
+ waiting state after `AttemptEvidenceQuarantined`. The engine's automatic polls,
112
+ discarded-execution followers, internal wakes, and fresh `execute` calls leave
113
+ that park intact. A waiting caller
114
+ continues under its `suspendedRetryPolicy`; exhausting that budget reports
115
+ `SuspendedResumeGaveUp` without clearing quarantine. Only an explicit
116
+ `Flow.resume(executionId)` or engine `resume` authorizes recovery, returning the
117
+ durable outcome without re-materializing the poisoned evidence or re-executing
118
+ the action.
119
+
120
+ ## Every lifecycle write takes the durable channel
121
+
122
+ Run decisions, attempt started and finished, hard boundary violations, snapshot
123
+ identity, cache provenance, deferred completions, clock schedules, interruption
124
+ records, and the `Inconsistency` cache-conflict record all go through the
125
+ journal's `emitDurable` channel. A saturated lossy queue can never drop one.
126
+ Attempt lifecycle writes additionally pass the owner, so a reclaimed owner
127
+ fails with `fence_lost` and self-interrupts instead of appending.
128
+
129
+ ## Typed history and execution authority
130
+
131
+ The shared [state and event authority contract](https://journal.smithers.sh/concepts/state-event-authority/)
132
+ defines additive versioned event families. Current attempt writers retain their
133
+ existing bytes. The engine's internal attempt lifecycle and projection adapters
134
+ do not change that writer contract or expose new public entrypoints.
135
+
136
+ Full history and retained snapshot plus suffix rebuild the disclosed attempt
137
+ projection. Redacted history does not prove recovery of arbitrary private
138
+ results or executable engine state. Keep the authoritative attempt and run
139
+ stores; a writer cutover requires complete lineage and encoded results in the
140
+ same state transaction, with an explicit migration for retained history.
141
+
142
+ ## Related
143
+
144
+ - [Ownership and fencing](./ownership-and-fencing.md): who is allowed to write
145
+ an attempt row at all.
146
+ - [Step boundaries](./step-boundaries.md): what `replayOutputs` reproduces, and
147
+ where it gets the bytes.
148
+ - [Troubleshooting](../troubleshooting.md): each of these failures with its
149
+ cause and its fix.
@@ -0,0 +1,265 @@
1
+ ---
2
+ title: "Cache admission"
3
+ description: "The conditions a step result must meet before another run may reuse it, how a hit is verified before it is served, and the ordering that makes a shared tier safe."
4
+ sidebar:
5
+ order: 6
6
+ ---
7
+
8
+ Serving a recorded result instead of executing a step is the most valuable and
9
+ the most dangerous thing this package does. Cache admission is the set of
10
+ conditions a result must meet before it becomes reusable, and cache
11
+ verification is the check that runs before a recorded result is actually
12
+ served.
13
+
14
+ ## What gets admitted
15
+
16
+ The engine admits a cache record only when all of the following hold:
17
+
18
+ - The action is `sealed`.
19
+ - The boundary is `hard`.
20
+ - All declared reads are exact inputs, not unresolved globs.
21
+ - No deviation occurred.
22
+ - The evidence explicitly carries `wholeTreeWritesVerified: true`.
23
+ - The evidence explicitly carries `hermeticReadsVerified: true`.
24
+ - The completed attempt carries `readSetVerified: true`: its measured inputs
25
+ matched the declaration when the body executed.
26
+
27
+ Fresh results and recovered durable completions use the same internal
28
+ publication decision. Refusal keeps a completed action's run-local outcome;
29
+ it does not require the body to execute again. Known-corrupt evidence cannot
30
+ be published merely because the inconsistency policy tolerates that outcome.
31
+
32
+ Older evidence, and boundaries that observe declared paths only, are
33
+ conservatively refused. Under the production composition the proof comes from
34
+ [`WorkspaceSandbox`](./workspace-transactions.md): the body ran in an isolated
35
+ workspace, so a write outside the declared set is a map comparison rather than
36
+ an inference, and the engine sets the flag itself. When the whole-tree
37
+ diff shows a deviation the declared-read scan would have missed, it records that
38
+ deviation and withholds the entry instead.
39
+
40
+ One more distinction decides reach rather than admission. Only a content-key
41
+ record has an address another run can reproduce; an ordinal-key record stays
42
+ run-local.
43
+
44
+ ## A hit is verified before it is served
45
+
46
+ A matching key is not sufficient. Before serving, the store calls
47
+ `StepBoundary.prepare` and compares the descriptor's declared `readSet` against
48
+ the `readSnapshot` the host measured:
49
+
50
+ - Every declared read still matching permits output replay verification.
51
+ - A declared path that is missing, or whose digest differs, refuses the hit,
52
+ journals a `cache-provenance` record with `action: "stale_read_set"`, and
53
+ falls through to a real execution.
54
+ - Reads the host reports but the declaration never claimed are ignored: the
55
+ declaration is what the key was computed over.
56
+
57
+ This is Skyframe's dirty-check invariant. The key alone detects a changed
58
+ declaration, never a stale one.
59
+
60
+ A verified hit then calls `replayOutputs` before returning the stored result.
61
+ Unlike completion publication, candidate admission does not require the old
62
+ `readSetVerified` flag: current inputs are freshly measured here. Missing
63
+ whole-tree or hermetic-read evidence still refuses the candidate. An unavailable
64
+ measurement does not prove staleness and does not justify evicting the row.
65
+
66
+ When that refuses with `MissingArtifact`, the normal first answer for a row
67
+ recorded on a machine whose artifacts this one has never seen, the dispatch
68
+ hydrates from the shared tier and retries the replay exactly once before
69
+ falling through to a real execution. A second failure means the tier cannot
70
+ serve it either, and executing is strictly better than looping.
71
+
72
+ ## Current output authority and legacy flags
73
+
74
+ Before measuring a candidate or replaying a durable outcome, the engine checks
75
+ the entire recorded output manifest against the current boundary descriptor.
76
+ Each write must be covered by the current write set, each deletion must be an
77
+ explicit removal, and every exact output and removal must be present. Tree
78
+ pruning requires the same declared tree root; a glob or a narrower subtree
79
+ cannot authorize pruning a broader recorded tree. A tree root must remain a
80
+ directory; a manifest cannot replay a file at that path. Duplicate and noncanonical
81
+ recorded paths are refused. The existing abstract `{ paths: [...] }` boundary
82
+ format requires an identical current write set and no removals. An unknown
83
+ output format is refused as `unsupported-output-evidence`. Malformed production
84
+ evidence cannot use the abstract path-list fallback.
85
+
86
+ A descriptor mismatch is `output-boundary-mismatch`, recorded in the existing
87
+ `cache-provenance` family with `action: "replay_failed"`. It permits no replay
88
+ call, hydration, pruning, or age-based eviction of that candidate. This is a
89
+ preflight guarantee for policy refusal, not atomic rollback of filesystem work
90
+ if an admitted replay subsequently encounters host failure or corruption.
91
+ A succeeded attempt retains its original outcome and metadata, returns that
92
+ outcome without executing its body again, and withholds cache publication when
93
+ its output evidence is refused.
94
+
95
+ Stored `boundaryQuarantined: true` always forbids shared reuse and publication.
96
+ Quarantine together with boundary evidence or `readSetVerified: true` is
97
+ `contradictory-evidence`; verified reads with no boundary evidence have the same
98
+ refusal. Neither a historical verification flag nor a tolerant inconsistency
99
+ policy overrides quarantine. These legacy rows remain unchanged and their
100
+ run-local durable outcomes remain authoritative. A candidate without the old
101
+ read-verification flag can still be admitted by fresh current-read measurement.
102
+ Proof flags retain their existing true-or-omitted schema. Stored false values
103
+ or strings fail metadata decoding as `invalid-meta` for shared reuse, while
104
+ the run-local durable outcome remains authoritative.
105
+
106
+ ## Empty output sets
107
+
108
+ An action with no declared writes or removals can publish and converge a cache
109
+ entry. For replay and convergence, its evidence must explicitly encode the empty
110
+ set as `{ outputs: [] }` (with no tree roots) or the abstract `{ paths: [] }`
111
+ format. All ordinary boundary, whole-tree, hermetic-read and execution-time read
112
+ proofs still apply.
113
+ An empty set does not establish those proofs by itself. A durable completion
114
+ without a finish timestamp uses the current clock when it converges the entry.
115
+
116
+ Empty outputs do not bypass replay verification. If the boundary reports
117
+ `BoundaryCorruption` in admitted evidence, the succeeded attempt's evidence is
118
+ quarantined, its boundary and read-verification proof are cleared, and strict
119
+ policy parks the run until an explicit resume; polling and repeated execution
120
+ cannot clear quarantine. That explicit resume returns the durable
121
+ outcome without rechecking that evidence, repeating the body, or publishing it.
122
+
123
+ An opaque `{}` is unsupported evidence, not an encoded empty set. An empty
124
+ manifest that omits a declared exact output, removal, or tree root is a boundary
125
+ mismatch. These preflight refusals preserve the succeeded outcome and original
126
+ metadata, withhold convergence, and never call the boundary, so they do not
127
+ trigger corruption quarantine. Undecodable metadata likewise supplies no
128
+ reusable proof; it does not manufacture a corruption verdict.
129
+
130
+ ## Age decisions, policy removal, and forked history
131
+
132
+ The first age verdict for a cache provenance is durable: age equal to `ttlMs`
133
+ is admitted, and age one millisecond greater is expired. Replaying that verdict
134
+ uses its original answer when the clock moves in either direction. An exact
135
+ duplicate of the opposite measured verdict proves a clock change; an arbitrary
136
+ journal conflict never does.
137
+
138
+ Removing `ttlMs` after any recorded age verdict for this cache address within
139
+ the run is refused with `JournalError.code: "idempotency_conflict"`. This holds
140
+ even if the head has since been evicted or replaced. Restore the original
141
+ policy or use a new action identity. Before a verdict exists, the policy can
142
+ still change. Scope continues to narrow the cache address without changing the
143
+ durable attempt identity.
144
+
145
+ The no-TTL guard indexes verdicts per executor and reads only journal entries
146
+ after its last validated sequence on subsequent dispatches. It checks new
147
+ entries before answering absence. Resume, a different journal service, or a
148
+ changed rewind generation rebuilds the index from retained history once.
149
+ EngineStore shares it across a run's action instances; PlanScheduler shares it
150
+ across its node dispatches.
151
+
152
+ A fork may reuse a copied parent's age verdict only after a paged history
153
+ lookup validates the complete producer identity, event type, payload including
154
+ TTL and recorded provenance, sequence, timestamp, and lineage metadata against
155
+ the retained ancestor record. Each ancestry edge also requires the recorded
156
+ fork marker, its producer, exact cutoff, and cutoff lineage. Forks of forks
157
+ must validate every intervening copied prefix. Missing ancestry, contradictory
158
+ fields, and unrelated foreign lineage retain the typed `idempotency_conflict`
159
+ with its cause. A journal read failure, including a compacted cursor, preserves
160
+ the journal's original typed error. An identity refusal also records
161
+ `action: "replay_failed", reason: "incompatible-age-history"` in the existing
162
+ cache provenance family. No new event family, persisted schema, key, or producer
163
+ identity is introduced; transparent reuse of unvalidated foreign history is
164
+ unsupported.
165
+
166
+ ## Publication order across two tiers
167
+
168
+ A shared tier turns one machine's result into every machine's result, and the
169
+ order the two writes happen in is a correctness property, not a preference.
170
+
171
+ 1. `ArtifactSync.publish(digests)` runs first, immediately before the
172
+ transaction that records the cache entry and never inside it. It probes the
173
+ shared tier with `findMissing`, uploads what is missing, and re-probes to
174
+ confirm. A publication that cannot make the artifacts durable fails with
175
+ `ArtifactPublicationFailed`, and the shared entry is withheld.
176
+ 2. The local cache row and the journal record explaining it commit in one
177
+ `DurableWriter` transaction.
178
+ 3. `CacheSync.publishEntry(entry)` runs after that transaction, publishing the
179
+ already-durable local entry to the shared step-result tier.
180
+
181
+ Step 1 before step 2 is Bazel's REAPI ordering constraint: an action result is
182
+ uploaded after every blob it refers to, because a result accessed before its
183
+ blobs are present cannot be validated. Step 3 after step 2 is why `CacheSync`
184
+ is a separate seam from the `CacheStore` tag at all: a `CacheStore` whose `put`
185
+ also wrote a shared HTTP tier would put a network round trip inside a write
186
+ transaction, blocking every other writer for its duration and rolling the local
187
+ row back whenever a shared cache was unreachable.
188
+
189
+ The ordering makes a shared tier consistent, not trustworthy. A hit replays the
190
+ entry's evidence into the workspace, writing its outputs and deleting its
191
+ `digest: null` paths, and every check that runs is against digests the same
192
+ entry recorded. Only producers you trust as much as your own machines may write
193
+ to the shared tier. See
194
+ [Trust every writer of the shared tier](../guides/share-a-cache-across-machines.md#trust-every-writer-of-the-shared-tier).
195
+
196
+ ## Neither publication step can fail a run
197
+
198
+ Both run after `attempts.finish`, so the result is already durably recorded on
199
+ this host. Failing a completed run because an optional accelerator is
200
+ unreachable trades a real result for an unavailable one.
201
+
202
+ A refusal withholds the shared copy, never the local row, and journals a
203
+ `cache-provenance` record with `action: "unpublished"` carrying the stage
204
+ (`artifacts` or `entry`) and the reason. A missing shared entry is therefore
205
+ explainable from the journal rather than inferred from its absence.
206
+
207
+ Local cache lookup and publication failures are also accelerator failures. A
208
+ typed store refusal is journaled and a succeeded durable attempt remains
209
+ usable. A failed cache transaction leaves neither its row nor its provenance
210
+ record; reopening can publish from the terminal attempt without repeating the
211
+ body. A crash after the local cache row commits may leave the optional remote
212
+ entry absent: a subsequent local hit does not retry remote publication.
213
+
214
+ ## Download policy on the read side
215
+
216
+ `ArtifactSync.hydrate` establishes that this host can resolve every referenced
217
+ artifact. How eagerly it materializes them is `DownloadPolicy`, declared on the
218
+ shared tier as `RemoteArtifacts.Options.downloadPolicy` and read from the store
219
+ `ArtifactSync.make` was handed, so one deployment setting reaches both seams. An
220
+ explicit `downloadPolicy` on `make` or `layer` overrides it.
221
+
222
+ | Policy | Behavior on hydrate |
223
+ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
224
+ | `all` (default) | Downloads every referenced artifact into this host's store while admitting the replay. Every later read is local, and a shared tier that goes down afterwards costs nothing. |
225
+ | `toplevel` | Downloads nothing. One batched `findMissing` establishes that the shared tier can serve what is missing, and `CombinedArtifacts.get` fetches and writes back the blobs a reader actually reads. |
226
+ | `minimal` | The same probe and the same zero downloads; `CombinedArtifacts.get` then serves without writing back, so this host never accumulates other machines' artifacts. |
227
+
228
+ The two lazy policies are sound only when the store the replay reads through
229
+ can reach the shared tier, which means `CombinedArtifacts` with the same remote
230
+ tier. Under a purely local `ArtifactStore` an admitted lazy replay would later
231
+ read an artifact this host never fetched. A tier that refuses the probe is
232
+ indistinguishable from one that holds nothing, so the replay is refused either
233
+ way and the step executes.
234
+
235
+ ## When two runs disagree
236
+
237
+ Two runs that record different results under the same content key mean the
238
+ declaration does not fully describe what the step depends on. That is a
239
+ hermeticity violation, and it goes to the `Inconsistency` receiver:
240
+
241
+ - `Inconsistency.layerStrict(owner)` journals the conflict and fails the
242
+ dispatch. This is the default for engine wiring, because a non-hermetic
243
+ sealed hard-boundary action is a defect rather than a condition to paper
244
+ over.
245
+ - `Inconsistency.layerTolerant(owner)` journals and continues, preserving the
246
+ first-recorded row. That is Skyframe's tolerant production configuration.
247
+ - `Inconsistency.layerNoop()` journals nothing and tolerates everything.
248
+
249
+ The record goes through the journal's durable channel, so a `tolerate` verdict
250
+ that silently dropped its only record cannot wire the detector to nothing.
251
+
252
+ An explicitly nondeterministic declaration instead keeps the first local writer
253
+ and records `conflict_first_writer`; it never calls the deterministic
254
+ inconsistency receiver. The optional remote publisher also retains its existing
255
+ first-writer policy. Neither policy turns a local deterministic conflict into
256
+ an availability failure.
257
+
258
+ ## Related
259
+
260
+ - [Step boundaries](./step-boundaries.md): where `wholeTreeWritesVerified`
261
+ comes from.
262
+ - [Share a cache across machines](../guides/share-a-cache-across-machines.md):
263
+ the composition that turns this on.
264
+ - [Content addressing](/docs/concepts/content-addressing/) on smithers.sh: how
265
+ a step key is built in the first place.
@@ -0,0 +1,86 @@
1
+ # Native call facts and their outbox
2
+
3
+ `flows.harness.call-fact.v1` is the versioned durable producer for agent cell
4
+ calls. It is separate from `AgentSession`'s best-effort trace consumer. The
5
+ immutable native journal is the outbox; there is no second delivery queue or
6
+ consumer-side writer that reconstructs a missing call from a flow name.
7
+
8
+ ## Identity and authorization
9
+
10
+ The harness constructs the existing dispatch identity before invoking a call:
11
+ logical run, frame, cell digest, invocation ordinal, declaration digest, and
12
+ ordered active layers. Its stable `cell-call-v1:<sha256>` digest is unchanged.
13
+ The public fact calls the logical run coordinate `identity.runId`; it is not
14
+ an authentication session. Existing action keys and legacy trace producer IDs
15
+ are unchanged. The annotations are additive metadata, never key material.
16
+
17
+ `FlowEngineLike.call` authorizes before constructing the annotated native
18
+ action. Only then can its owner commit the `invoked` fact. Permission refusal
19
+ or a parked approval does not claim a native invocation. Legacy trace telemetry
20
+ may describe that attempted call, and the separate approval stream describes
21
+ the durable request.
22
+
23
+ ## Commit and delivery
24
+
25
+ Fresh attempt admission, its existing lifecycle records, and the invocation
26
+ fact share one fenced native transaction. Failure rolls admission back and
27
+ prevents the handler, sandbox, and result publication. A verified cache replay
28
+ commits invocation before materializing outputs. An older completed native
29
+ attempt can gain an invocation observation without claiming the handler ran
30
+ again.
31
+
32
+ The harness records the exact success/failure branch it will return to the
33
+ cell through its existing `record("cell-call")` action. Its additive annotation
34
+ carries the same dispatch identity. `ActionPersistence` commits the `settled`
35
+ fact with that controller attempt's succeeded row, using the actual encoded
36
+ outcome and validating its result codec. The host operation's success alone
37
+ cannot replace a timeout or failure delivered by the harness.
38
+
39
+ A failed settlement commit returns no completed result and publishes no fact.
40
+ On reopen, an already durable succeeded effect crossing can finish that same
41
+ controller attempt and fact without rerunning its body. The fact proves a
42
+ committed result ready for delivery; a process can still crash before consuming
43
+ it and replay it later. This does not promise exactly-once external side effects
44
+ or change the existing timeout/reissue policy.
45
+
46
+ Fact identity is `(native run, "call-fact-v1:<callId>:<phase>", 0)` under the
47
+ native journal generation. Exact retries receive the existing commit receipt.
48
+ A changed payload under that identity is a conflict. No handler result is
49
+ published through a best-effort fallback after a durable write failure.
50
+
51
+ ## Outbox and projections
52
+
53
+ `EngineJournalProjection` copies committed native entries into the control
54
+ journal with its existing source identities. It resumes after a lost receipt
55
+ or process reopen; the destination's unique producer key suppresses already
56
+ committed copies. Source and destination are separate transactions, so the
57
+ bridge can lag and cannot turn an uncommitted source attempt into public state.
58
+
59
+ Gateway's browser-safe shared call normalizer validates the envelope version,
60
+ native coordinates, logical run, and producer identity. Its pure fold prefers
61
+ native facts over identified telemetry, keeping the first display position and
62
+ stable public node IDs. CLI progress corrects an earlier telemetry outcome
63
+ without double-counting. Transcript subscriptions use the existing snapshot
64
+ reset when a later native fact changes an already emitted row; fresh snapshots
65
+ and resumed subscriptions then agree.
66
+
67
+ All public inputs, values, and messages remain subject to journal redaction.
68
+ An individual field larger than 65,536 UTF-8 bytes becomes a byte count and
69
+ canonical SHA-256 commitment. Protected native attempt rows retain the full
70
+ encoded result. A public fact cannot reconstruct a credential or a truncated
71
+ private value, and no redactor is bypassed.
72
+
73
+ ## Migration and coverage
74
+
75
+ The writer is additive: no historical rewrite, action-key migration, or trace
76
+ identity change is required. A legacy native result acquires a fact only when
77
+ the actual annotated record boundary reads it successfully. An invalid encoded
78
+ outcome cannot become a deliverable fact.
79
+
80
+ Legacy trace rows without a call ID retain FIFO matching among unidentified
81
+ starts. They cannot safely be merged with new native identities by flow name,
82
+ input, or guessed ordinal. Native facts do not fill missing historical model
83
+ deltas, printed output, or complete trace prefixes. Low-level custom engine
84
+ ports without these annotations remain legacy producers. Native journal
85
+ generation gaps remain visible in raw bridge history; the call fold does not
86
+ claim complete run-history coverage or authorize work from public projections.