@agent-teams/repository-mutation 0.0.0

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 (243) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +201 -0
  3. package/README.md +10 -0
  4. package/dist/canonical-json.d.ts +12 -0
  5. package/dist/canonical-json.d.ts.map +1 -0
  6. package/dist/canonical-json.js +137 -0
  7. package/dist/canonical-json.js.map +1 -0
  8. package/dist/errors.d.ts +6 -0
  9. package/dist/errors.d.ts.map +1 -0
  10. package/dist/errors.js +9 -0
  11. package/dist/errors.js.map +1 -0
  12. package/dist/index.d.ts +25 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +13 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/installed-artifact-identity.d.ts +15 -0
  17. package/dist/installed-artifact-identity.d.ts.map +1 -0
  18. package/dist/installed-artifact-identity.js +127 -0
  19. package/dist/installed-artifact-identity.js.map +1 -0
  20. package/dist/node.d.ts +29 -0
  21. package/dist/node.d.ts.map +1 -0
  22. package/dist/node.js +19 -0
  23. package/dist/node.js.map +1 -0
  24. package/dist/package-version.d.ts +3 -0
  25. package/dist/package-version.d.ts.map +1 -0
  26. package/dist/package-version.js +11 -0
  27. package/dist/package-version.js.map +1 -0
  28. package/dist/qualification/index.d.ts +24 -0
  29. package/dist/qualification/index.d.ts.map +1 -0
  30. package/dist/qualification/index.js +11 -0
  31. package/dist/qualification/index.js.map +1 -0
  32. package/dist/repository-mutation/adapters/node/node-absent-file-publication-private.d.ts +19 -0
  33. package/dist/repository-mutation/adapters/node/node-absent-file-publication-private.d.ts.map +1 -0
  34. package/dist/repository-mutation/adapters/node/node-absent-file-publication-private.js +74 -0
  35. package/dist/repository-mutation/adapters/node/node-absent-file-publication-private.js.map +1 -0
  36. package/dist/repository-mutation/adapters/node/node-absent-file-publication.d.ts +35 -0
  37. package/dist/repository-mutation/adapters/node/node-absent-file-publication.d.ts.map +1 -0
  38. package/dist/repository-mutation/adapters/node/node-absent-file-publication.js +181 -0
  39. package/dist/repository-mutation/adapters/node/node-absent-file-publication.js.map +1 -0
  40. package/dist/repository-mutation/adapters/node/node-bounded-regular-file.d.ts +23 -0
  41. package/dist/repository-mutation/adapters/node/node-bounded-regular-file.d.ts.map +1 -0
  42. package/dist/repository-mutation/adapters/node/node-bounded-regular-file.js +134 -0
  43. package/dist/repository-mutation/adapters/node/node-bounded-regular-file.js.map +1 -0
  44. package/dist/repository-mutation/adapters/node/node-cleanup-owned-temporary.d.ts +26 -0
  45. package/dist/repository-mutation/adapters/node/node-cleanup-owned-temporary.d.ts.map +1 -0
  46. package/dist/repository-mutation/adapters/node/node-cleanup-owned-temporary.js +172 -0
  47. package/dist/repository-mutation/adapters/node/node-cleanup-owned-temporary.js.map +1 -0
  48. package/dist/repository-mutation/adapters/node/node-create-and-bind-directory.d.ts +14 -0
  49. package/dist/repository-mutation/adapters/node/node-create-and-bind-directory.d.ts.map +1 -0
  50. package/dist/repository-mutation/adapters/node/node-create-and-bind-directory.js +23 -0
  51. package/dist/repository-mutation/adapters/node/node-create-and-bind-directory.js.map +1 -0
  52. package/dist/repository-mutation/adapters/node/node-directory-durability.d.ts +17 -0
  53. package/dist/repository-mutation/adapters/node/node-directory-durability.d.ts.map +1 -0
  54. package/dist/repository-mutation/adapters/node/node-directory-durability.js +47 -0
  55. package/dist/repository-mutation/adapters/node/node-directory-durability.js.map +1 -0
  56. package/dist/repository-mutation/adapters/node/node-directory-materialization.d.ts +37 -0
  57. package/dist/repository-mutation/adapters/node/node-directory-materialization.d.ts.map +1 -0
  58. package/dist/repository-mutation/adapters/node/node-directory-materialization.js +244 -0
  59. package/dist/repository-mutation/adapters/node/node-directory-materialization.js.map +1 -0
  60. package/dist/repository-mutation/adapters/node/node-existing-repository-ancestors.d.ts +13 -0
  61. package/dist/repository-mutation/adapters/node/node-existing-repository-ancestors.d.ts.map +1 -0
  62. package/dist/repository-mutation/adapters/node/node-existing-repository-ancestors.js +67 -0
  63. package/dist/repository-mutation/adapters/node/node-existing-repository-ancestors.js.map +1 -0
  64. package/dist/repository-mutation/adapters/node/node-known-file-apply-effects.d.ts +84 -0
  65. package/dist/repository-mutation/adapters/node/node-known-file-apply-effects.d.ts.map +1 -0
  66. package/dist/repository-mutation/adapters/node/node-known-file-apply-effects.js +232 -0
  67. package/dist/repository-mutation/adapters/node/node-known-file-apply-effects.js.map +1 -0
  68. package/dist/repository-mutation/adapters/node/node-known-file-apply-faults.d.ts +9 -0
  69. package/dist/repository-mutation/adapters/node/node-known-file-apply-faults.d.ts.map +1 -0
  70. package/dist/repository-mutation/adapters/node/node-known-file-apply-faults.js +2 -0
  71. package/dist/repository-mutation/adapters/node/node-known-file-apply-faults.js.map +1 -0
  72. package/dist/repository-mutation/adapters/node/node-known-file-apply-observation.d.ts +6 -0
  73. package/dist/repository-mutation/adapters/node/node-known-file-apply-observation.d.ts.map +1 -0
  74. package/dist/repository-mutation/adapters/node/node-known-file-apply-observation.js +30 -0
  75. package/dist/repository-mutation/adapters/node/node-known-file-apply-observation.js.map +1 -0
  76. package/dist/repository-mutation/adapters/node/node-known-file-apply-operation.d.ts +11 -0
  77. package/dist/repository-mutation/adapters/node/node-known-file-apply-operation.d.ts.map +1 -0
  78. package/dist/repository-mutation/adapters/node/node-known-file-apply-operation.js +159 -0
  79. package/dist/repository-mutation/adapters/node/node-known-file-apply-operation.js.map +1 -0
  80. package/dist/repository-mutation/adapters/node/node-known-file-apply-state.d.ts +9 -0
  81. package/dist/repository-mutation/adapters/node/node-known-file-apply-state.d.ts.map +1 -0
  82. package/dist/repository-mutation/adapters/node/node-known-file-apply-state.js +22 -0
  83. package/dist/repository-mutation/adapters/node/node-known-file-apply-state.js.map +1 -0
  84. package/dist/repository-mutation/adapters/node/node-known-file-recovery-cleanup.d.ts +9 -0
  85. package/dist/repository-mutation/adapters/node/node-known-file-recovery-cleanup.d.ts.map +1 -0
  86. package/dist/repository-mutation/adapters/node/node-known-file-recovery-cleanup.js +203 -0
  87. package/dist/repository-mutation/adapters/node/node-known-file-recovery-cleanup.js.map +1 -0
  88. package/dist/repository-mutation/adapters/node/node-known-file-recovery-executor.d.ts +17 -0
  89. package/dist/repository-mutation/adapters/node/node-known-file-recovery-executor.d.ts.map +1 -0
  90. package/dist/repository-mutation/adapters/node/node-known-file-recovery-executor.js +22 -0
  91. package/dist/repository-mutation/adapters/node/node-known-file-recovery-executor.js.map +1 -0
  92. package/dist/repository-mutation/adapters/node/node-known-file-recovery-filesystem.d.ts +28 -0
  93. package/dist/repository-mutation/adapters/node/node-known-file-recovery-filesystem.d.ts.map +1 -0
  94. package/dist/repository-mutation/adapters/node/node-known-file-recovery-filesystem.js +213 -0
  95. package/dist/repository-mutation/adapters/node/node-known-file-recovery-filesystem.js.map +1 -0
  96. package/dist/repository-mutation/adapters/node/node-known-file-recovery-observation.d.ts +15 -0
  97. package/dist/repository-mutation/adapters/node/node-known-file-recovery-observation.d.ts.map +1 -0
  98. package/dist/repository-mutation/adapters/node/node-known-file-recovery-observation.js +51 -0
  99. package/dist/repository-mutation/adapters/node/node-known-file-recovery-observation.js.map +1 -0
  100. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured-cleanup.d.ts +29 -0
  101. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured-cleanup.d.ts.map +1 -0
  102. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured-cleanup.js +72 -0
  103. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured-cleanup.js.map +1 -0
  104. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured.d.ts +31 -0
  105. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured.d.ts.map +1 -0
  106. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured.js +254 -0
  107. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured.js.map +1 -0
  108. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage.d.ts +13 -0
  109. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage.d.ts.map +1 -0
  110. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage.js +210 -0
  111. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage.js.map +1 -0
  112. package/dist/repository-mutation/adapters/node/node-known-file-recovery-retirement.d.ts +15 -0
  113. package/dist/repository-mutation/adapters/node/node-known-file-recovery-retirement.d.ts.map +1 -0
  114. package/dist/repository-mutation/adapters/node/node-known-file-recovery-retirement.js +181 -0
  115. package/dist/repository-mutation/adapters/node/node-known-file-recovery-retirement.js.map +1 -0
  116. package/dist/repository-mutation/adapters/node/node-known-file-recovery-state.d.ts +12 -0
  117. package/dist/repository-mutation/adapters/node/node-known-file-recovery-state.d.ts.map +1 -0
  118. package/dist/repository-mutation/adapters/node/node-known-file-recovery-state.js +18 -0
  119. package/dist/repository-mutation/adapters/node/node-known-file-recovery-state.js.map +1 -0
  120. package/dist/repository-mutation/adapters/node/node-known-file-transaction-filesystem.d.ts +25 -0
  121. package/dist/repository-mutation/adapters/node/node-known-file-transaction-filesystem.d.ts.map +1 -0
  122. package/dist/repository-mutation/adapters/node/node-known-file-transaction-filesystem.js +150 -0
  123. package/dist/repository-mutation/adapters/node/node-known-file-transaction-filesystem.js.map +1 -0
  124. package/dist/repository-mutation/adapters/node/node-known-file-transaction-inspection.d.ts +12 -0
  125. package/dist/repository-mutation/adapters/node/node-known-file-transaction-inspection.d.ts.map +1 -0
  126. package/dist/repository-mutation/adapters/node/node-known-file-transaction-inspection.js +56 -0
  127. package/dist/repository-mutation/adapters/node/node-known-file-transaction-inspection.js.map +1 -0
  128. package/dist/repository-mutation/adapters/node/node-known-file-transaction-journal-store.d.ts +22 -0
  129. package/dist/repository-mutation/adapters/node/node-known-file-transaction-journal-store.d.ts.map +1 -0
  130. package/dist/repository-mutation/adapters/node/node-known-file-transaction-journal-store.js +246 -0
  131. package/dist/repository-mutation/adapters/node/node-known-file-transaction-journal-store.js.map +1 -0
  132. package/dist/repository-mutation/adapters/node/node-known-file-transaction-lease-release.d.ts +21 -0
  133. package/dist/repository-mutation/adapters/node/node-known-file-transaction-lease-release.d.ts.map +1 -0
  134. package/dist/repository-mutation/adapters/node/node-known-file-transaction-lease-release.js +34 -0
  135. package/dist/repository-mutation/adapters/node/node-known-file-transaction-lease-release.js.map +1 -0
  136. package/dist/repository-mutation/adapters/node/node-known-file-transaction-receipt.d.ts +4 -0
  137. package/dist/repository-mutation/adapters/node/node-known-file-transaction-receipt.d.ts.map +1 -0
  138. package/dist/repository-mutation/adapters/node/node-known-file-transaction-receipt.js +43 -0
  139. package/dist/repository-mutation/adapters/node/node-known-file-transaction-receipt.js.map +1 -0
  140. package/dist/repository-mutation/adapters/node/node-known-file-transaction-recovery.d.ts +14 -0
  141. package/dist/repository-mutation/adapters/node/node-known-file-transaction-recovery.d.ts.map +1 -0
  142. package/dist/repository-mutation/adapters/node/node-known-file-transaction-recovery.js +109 -0
  143. package/dist/repository-mutation/adapters/node/node-known-file-transaction-recovery.js.map +1 -0
  144. package/dist/repository-mutation/adapters/node/node-known-file-transaction.d.ts +21 -0
  145. package/dist/repository-mutation/adapters/node/node-known-file-transaction.d.ts.map +1 -0
  146. package/dist/repository-mutation/adapters/node/node-known-file-transaction.js +215 -0
  147. package/dist/repository-mutation/adapters/node/node-known-file-transaction.js.map +1 -0
  148. package/dist/repository-mutation/adapters/node/node-prepare-exact-sibling-temporary.d.ts +18 -0
  149. package/dist/repository-mutation/adapters/node/node-prepare-exact-sibling-temporary.d.ts.map +1 -0
  150. package/dist/repository-mutation/adapters/node/node-prepare-exact-sibling-temporary.js +30 -0
  151. package/dist/repository-mutation/adapters/node/node-prepare-exact-sibling-temporary.js.map +1 -0
  152. package/dist/repository-mutation/adapters/node/node-publish-prepared-absent-file.d.ts +31 -0
  153. package/dist/repository-mutation/adapters/node/node-publish-prepared-absent-file.d.ts.map +1 -0
  154. package/dist/repository-mutation/adapters/node/node-publish-prepared-absent-file.js +50 -0
  155. package/dist/repository-mutation/adapters/node/node-publish-prepared-absent-file.js.map +1 -0
  156. package/dist/repository-mutation/adapters/node/node-repository-path.d.ts +2 -0
  157. package/dist/repository-mutation/adapters/node/node-repository-path.d.ts.map +1 -0
  158. package/dist/repository-mutation/adapters/node/node-repository-path.js +7 -0
  159. package/dist/repository-mutation/adapters/node/node-repository-path.js.map +1 -0
  160. package/dist/repository-mutation/adapters/node/node-terminal-evidence-directory.d.ts +21 -0
  161. package/dist/repository-mutation/adapters/node/node-terminal-evidence-directory.d.ts.map +1 -0
  162. package/dist/repository-mutation/adapters/node/node-terminal-evidence-directory.js +59 -0
  163. package/dist/repository-mutation/adapters/node/node-terminal-evidence-directory.js.map +1 -0
  164. package/dist/repository-mutation/application/model/directory-materialization.d.ts +35 -0
  165. package/dist/repository-mutation/application/model/directory-materialization.d.ts.map +1 -0
  166. package/dist/repository-mutation/application/model/directory-materialization.js +11 -0
  167. package/dist/repository-mutation/application/model/directory-materialization.js.map +1 -0
  168. package/dist/repository-mutation/application/model/exact-postimage.d.ts +17 -0
  169. package/dist/repository-mutation/application/model/exact-postimage.d.ts.map +1 -0
  170. package/dist/repository-mutation/application/model/exact-postimage.js +11 -0
  171. package/dist/repository-mutation/application/model/exact-postimage.js.map +1 -0
  172. package/dist/repository-mutation/application/model/known-file-transaction-journal.d.ts +69 -0
  173. package/dist/repository-mutation/application/model/known-file-transaction-journal.d.ts.map +1 -0
  174. package/dist/repository-mutation/application/model/known-file-transaction-journal.js +15 -0
  175. package/dist/repository-mutation/application/model/known-file-transaction-journal.js.map +1 -0
  176. package/dist/repository-mutation/application/model/known-file-transaction.d.ts +64 -0
  177. package/dist/repository-mutation/application/model/known-file-transaction.d.ts.map +1 -0
  178. package/dist/repository-mutation/application/model/known-file-transaction.js +2 -0
  179. package/dist/repository-mutation/application/model/known-file-transaction.js.map +1 -0
  180. package/dist/repository-mutation/application/model/path-identity.d.ts +7 -0
  181. package/dist/repository-mutation/application/model/path-identity.d.ts.map +1 -0
  182. package/dist/repository-mutation/application/model/path-identity.js +2 -0
  183. package/dist/repository-mutation/application/model/path-identity.js.map +1 -0
  184. package/dist/repository-mutation/application/model/repository-path.d.ts +8 -0
  185. package/dist/repository-mutation/application/model/repository-path.d.ts.map +1 -0
  186. package/dist/repository-mutation/application/model/repository-path.js +74 -0
  187. package/dist/repository-mutation/application/model/repository-path.js.map +1 -0
  188. package/dist/repository-mutation/application/policies/classify-known-file-recovery-transition.d.ts +33 -0
  189. package/dist/repository-mutation/application/policies/classify-known-file-recovery-transition.d.ts.map +1 -0
  190. package/dist/repository-mutation/application/policies/classify-known-file-recovery-transition.js +21 -0
  191. package/dist/repository-mutation/application/policies/classify-known-file-recovery-transition.js.map +1 -0
  192. package/dist/repository-mutation/application/policies/known-file-transaction-envelope.d.ts +9 -0
  193. package/dist/repository-mutation/application/policies/known-file-transaction-envelope.d.ts.map +1 -0
  194. package/dist/repository-mutation/application/policies/known-file-transaction-envelope.js +214 -0
  195. package/dist/repository-mutation/application/policies/known-file-transaction-envelope.js.map +1 -0
  196. package/dist/repository-mutation/application/policies/known-file-transaction-plan.d.ts +7 -0
  197. package/dist/repository-mutation/application/policies/known-file-transaction-plan.d.ts.map +1 -0
  198. package/dist/repository-mutation/application/policies/known-file-transaction-plan.js +253 -0
  199. package/dist/repository-mutation/application/policies/known-file-transaction-plan.js.map +1 -0
  200. package/dist/repository-mutation/application/ports/owned-temporary-cleanup-transition.d.ts +7 -0
  201. package/dist/repository-mutation/application/ports/owned-temporary-cleanup-transition.d.ts.map +1 -0
  202. package/dist/repository-mutation/application/ports/owned-temporary-cleanup-transition.js +2 -0
  203. package/dist/repository-mutation/application/ports/owned-temporary-cleanup-transition.js.map +1 -0
  204. package/dist/repository-mutation-envelope.d.ts +32 -0
  205. package/dist/repository-mutation-envelope.d.ts.map +1 -0
  206. package/dist/repository-mutation-envelope.js +292 -0
  207. package/dist/repository-mutation-envelope.js.map +1 -0
  208. package/dist/state-contract.d.ts +6 -0
  209. package/dist/state-contract.d.ts.map +1 -0
  210. package/dist/state-contract.js +6 -0
  211. package/dist/state-contract.js.map +1 -0
  212. package/dist/strict-json.d.ts +7 -0
  213. package/dist/strict-json.d.ts.map +1 -0
  214. package/dist/strict-json.js +131 -0
  215. package/dist/strict-json.js.map +1 -0
  216. package/dist/transaction-coordination/adapters/node/node-journal-slot-evidence.d.ts +29 -0
  217. package/dist/transaction-coordination/adapters/node/node-journal-slot-evidence.d.ts.map +1 -0
  218. package/dist/transaction-coordination/adapters/node/node-journal-slot-evidence.js +139 -0
  219. package/dist/transaction-coordination/adapters/node/node-journal-slot-evidence.js.map +1 -0
  220. package/dist/transaction-coordination/adapters/node/node-journal-slot-profile.d.ts +151 -0
  221. package/dist/transaction-coordination/adapters/node/node-journal-slot-profile.d.ts.map +1 -0
  222. package/dist/transaction-coordination/adapters/node/node-journal-slot-profile.js +29 -0
  223. package/dist/transaction-coordination/adapters/node/node-journal-slot-profile.js.map +1 -0
  224. package/dist/transaction-coordination/adapters/node/node-journal-slot-store.d.ts +25 -0
  225. package/dist/transaction-coordination/adapters/node/node-journal-slot-store.d.ts.map +1 -0
  226. package/dist/transaction-coordination/adapters/node/node-journal-slot-store.js +303 -0
  227. package/dist/transaction-coordination/adapters/node/node-journal-slot-store.js.map +1 -0
  228. package/dist/transaction-coordination/adapters/node/node-operation-lock.d.ts +16 -0
  229. package/dist/transaction-coordination/adapters/node/node-operation-lock.d.ts.map +1 -0
  230. package/dist/transaction-coordination/adapters/node/node-operation-lock.js +359 -0
  231. package/dist/transaction-coordination/adapters/node/node-operation-lock.js.map +1 -0
  232. package/dist/transaction-coordination/adapters/node/node-state-directory.d.ts +11 -0
  233. package/dist/transaction-coordination/adapters/node/node-state-directory.d.ts.map +1 -0
  234. package/dist/transaction-coordination/adapters/node/node-state-directory.js +91 -0
  235. package/dist/transaction-coordination/adapters/node/node-state-directory.js.map +1 -0
  236. package/dist/transaction-coordination/mutation-lease.d.ts +38 -0
  237. package/dist/transaction-coordination/mutation-lease.d.ts.map +1 -0
  238. package/dist/transaction-coordination/mutation-lease.js +351 -0
  239. package/dist/transaction-coordination/mutation-lease.js.map +1 -0
  240. package/package.json +52 -0
  241. package/schemas/known-file-transaction-plan/v1.schema.json +65 -0
  242. package/schemas/known-file-transaction-receipt/v1.schema.json +36 -0
  243. package/schemas/repository-mutation-transaction-envelope/v1.schema.json +46 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-journal-slot-evidence.js","sourceRoot":"","sources":["../../../../src/transaction-coordination/adapters/node/node-journal-slot-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAmB,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,yEAAyE,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AASzD,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAEvC,SAAS,oBAAoB,CAAC,KAAc;IAC1C,OAAO,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK;QAC9C,CAAC,CAAE,KAA+B,CAAC,IAAI;QACvC,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAS,oBAAoB,CAC3B,QAA8B,EAC9B,KAAiB;IAEjB,OAAO,EAAE,eAAe,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,IAAY,EACZ,QAA8B,EAC9B,YAAoB;IAEpB,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAClE,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC;YAChC,OAAO,OAAO,CAAC;QAC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AK,EAAE,KAAK,EAAE,CACjB,CAAC;IACJ,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,OAAO,oBAAoB,CACzB,MAAM,yBAAyB,CAAC,MAAM,CAAC,EACvC,OAAO,CAAC,KAAK,CACd,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -0,0 +1,151 @@
1
+ import type { PortablePathIdentity } from "../../../repository-mutation/application/model/path-identity.js";
2
+ /**
3
+ * One journal slot is a canonical pathname whose content transitions through
4
+ * a hard-linked candidate, a private quarantine directory for the previous
5
+ * content, and terminal evidence directories. Owner packages describe their
6
+ * slot with a profile; the mechanics never depend on the journal vocabulary.
7
+ */
8
+ export type JournalSlotMutation = "create" | "remove" | "replace";
9
+ export type JournalSlotEvidence = "candidate" | "previous";
10
+ export type JournalSlotSyncRole = "destination" | "source" | "state-parent";
11
+ export type JournalSlotSyncStage = "candidate" | "final" | "publication" | "transition";
12
+ export type JournalSlotFaultPoint = {
13
+ readonly mutation: JournalSlotMutation;
14
+ readonly phase: "after-candidate-synced";
15
+ } | {
16
+ readonly mutation: "remove" | "replace";
17
+ readonly path: string;
18
+ readonly phase: "before-quarantine-directory";
19
+ } | {
20
+ readonly mutation: "remove" | "replace";
21
+ readonly path: string;
22
+ readonly phase: "before-shared-quarantine";
23
+ } | {
24
+ readonly mutation: "remove" | "replace";
25
+ readonly phase: "after-shared-quarantine-synced";
26
+ } | {
27
+ readonly mutation: "create" | "replace";
28
+ readonly phase: "before-canonical-link";
29
+ } | {
30
+ readonly mutation: "create" | "replace";
31
+ readonly phase: "after-canonical-linked";
32
+ } | {
33
+ readonly mutation: "create" | "replace";
34
+ readonly phase: "after-canonical-synced";
35
+ } | {
36
+ readonly evidence: JournalSlotEvidence;
37
+ readonly mutation: JournalSlotMutation;
38
+ readonly path: string;
39
+ readonly phase: "before-retirement-directory";
40
+ } | {
41
+ readonly evidence: JournalSlotEvidence;
42
+ readonly mutation: JournalSlotMutation;
43
+ readonly path: string;
44
+ readonly phase: "before-private-retirement";
45
+ } | {
46
+ readonly evidence: JournalSlotEvidence;
47
+ readonly mutation: JournalSlotMutation;
48
+ readonly path: string;
49
+ readonly phase: "before-private-retirement-rename";
50
+ } | {
51
+ readonly evidence: JournalSlotEvidence;
52
+ readonly mutation: JournalSlotMutation;
53
+ readonly path: string;
54
+ readonly phase: "before-logical-retirement";
55
+ } | {
56
+ readonly mutation: JournalSlotMutation;
57
+ readonly phase: "before-final-directory-sync";
58
+ } | {
59
+ readonly mutation: JournalSlotMutation;
60
+ readonly phase: "after-final-directory-sync";
61
+ } | {
62
+ readonly mutation: JournalSlotMutation;
63
+ readonly path: string;
64
+ readonly phase: "before-directory-sync";
65
+ readonly role: JournalSlotSyncRole;
66
+ readonly stage: JournalSlotSyncStage;
67
+ } | {
68
+ readonly phase: "before-reconciliation-directory-sync";
69
+ };
70
+ export type JournalSlotFaultInjector = (point: JournalSlotFaultPoint) => Promise<void> | void;
71
+ export interface JournalSlotAuthority {
72
+ readonly authorityDigest: `sha256:${string}`;
73
+ readonly identity: PortablePathIdentity;
74
+ }
75
+ export interface StoredJournalSlot<TJournal> {
76
+ readonly authority: JournalSlotAuthority;
77
+ readonly journal: TJournal;
78
+ }
79
+ export type JournalSlotSubject = "candidate" | "canonical" | "evidence" | "quarantine" | "replacement" | "retired-evidence";
80
+ export type JournalSlotFailure = "candidate-exists" | "candidate-unavailable" | "canonical-recreated" | "changed" | "must-be-stabilized" | "not-regular-file" | "publication-conflict" | "quarantine-unavailable" | "slot-occupied" | "state-directory-missing" | "too-many-entries" | "transition-residue";
81
+ export interface JournalSlotFailureContext {
82
+ readonly cause?: unknown;
83
+ readonly evidence?: JournalSlotEvidence;
84
+ readonly mutation?: JournalSlotMutation | "read" | "stabilize";
85
+ readonly subject?: JournalSlotSubject;
86
+ }
87
+ /** Owners translate closed failure classes into their released diagnostics. */
88
+ export type JournalSlotFailureFactory = (failure: JournalSlotFailure, context: JournalSlotFailureContext) => Error;
89
+ export interface JournalSlotCodec<TJournal> {
90
+ /** Returns validated canonical bytes or throws the owner's contract error. */
91
+ readonly serialize: (journal: TJournal) => Promise<Buffer>;
92
+ /** Parses stable canonical bytes or throws the owner's contract error. */
93
+ readonly parse: (bytes: Buffer) => Promise<TJournal>;
94
+ }
95
+ export type JournalSlotResidueMatcher = {
96
+ readonly exact: string;
97
+ } | {
98
+ readonly prefix: string;
99
+ };
100
+ export interface JournalSlotNaming {
101
+ readonly candidatePath: string;
102
+ readonly quarantineDirectoryName: (previous: JournalSlotAuthority) => string;
103
+ readonly residues: readonly JournalSlotResidueMatcher[];
104
+ readonly retiredDirectoryName: () => string;
105
+ readonly terminalRootName: string;
106
+ }
107
+ export interface JournalSlotProfile<TJournal> {
108
+ readonly canonicalPath: string;
109
+ readonly codec: JournalSlotCodec<TJournal>;
110
+ readonly failure: JournalSlotFailureFactory;
111
+ readonly faultInjector?: JournalSlotFaultInjector;
112
+ readonly maximumBytes: number;
113
+ readonly naming: JournalSlotNaming;
114
+ /** Directory syncs whose `before-directory-sync` fault point is observable. */
115
+ readonly observableSyncStages: readonly JournalSlotSyncStage[];
116
+ /**
117
+ * How the canonical slot is inspected before a mutation and after a
118
+ * removal: `authority` compares identity and bytes only, `parsed` also
119
+ * requires the content to satisfy the owner's codec and reports codec and
120
+ * non-regular-file diagnostics first.
121
+ */
122
+ readonly canonicalInspection: "authority" | "parsed";
123
+ /** Whether an unfinished mutation blocks reads until reconciliation. */
124
+ readonly reconciliation: "residue-only" | "sticky-pending";
125
+ readonly syncDirectory: (path: string) => Promise<void>;
126
+ }
127
+ export type JournalSlotObservation<TJournal> = {
128
+ readonly outcome: "stable";
129
+ readonly stored?: StoredJournalSlot<TJournal>;
130
+ } | {
131
+ readonly outcome: "committed" | "not-applied";
132
+ readonly stored?: StoredJournalSlot<TJournal>;
133
+ } | {
134
+ readonly canonical?: StoredJournalSlot<TJournal>;
135
+ readonly outcome: "recovery-required";
136
+ readonly residueNames: readonly string[];
137
+ };
138
+ export type PendingJournalSlotMutation = {
139
+ intendedAuthority?: JournalSlotAuthority;
140
+ readonly kind: "create";
141
+ } | {
142
+ intendedAuthority?: JournalSlotAuthority;
143
+ readonly kind: "replace";
144
+ readonly prior: JournalSlotAuthority;
145
+ } | {
146
+ readonly kind: "remove";
147
+ readonly prior: JournalSlotAuthority;
148
+ };
149
+ export declare function sameJournalSlotAuthority(left: JournalSlotAuthority, right: JournalSlotAuthority): boolean;
150
+ export declare function classifyCleanJournalSlotMutation(pending: PendingJournalSlotMutation, canonical: JournalSlotAuthority | undefined): "committed" | "not-applied" | "recovery-required";
151
+ //# sourceMappingURL=node-journal-slot-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-journal-slot-profile.d.ts","sourceRoot":"","sources":["../../../../src/transaction-coordination/adapters/node/node-journal-slot-profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iEAAiE,CAAC;AAE5G;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,UAAU,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,QAAQ,GAAG,cAAc,CAAC;AAE5E,MAAM,MAAM,oBAAoB,GAC5B,WAAW,GACX,OAAO,GACP,aAAa,GACb,YAAY,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAA;CAAE,GACpF;IACE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IACxC,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C;CAC1C,CAAC;AAEN,MAAM,MAAM,0BAA0B,GAClC;IACE,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB,GACD;IACE,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;CACtC,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;CACtC,CAAC;AAEN,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,oBAAoB,EAC1B,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAKT;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,0BAA0B,EACnC,SAAS,EAAE,oBAAoB,GAAG,SAAS,GAC1C,WAAW,GAAG,aAAa,GAAG,mBAAmB,CAuBnD"}
@@ -0,0 +1,29 @@
1
+ export function sameJournalSlotAuthority(left, right) {
2
+ return left.authorityDigest === right.authorityDigest &&
3
+ left.identity.birthtimeNs === right.identity.birthtimeNs &&
4
+ left.identity.dev === right.identity.dev &&
5
+ left.identity.ino === right.identity.ino;
6
+ }
7
+ export function classifyCleanJournalSlotMutation(pending, canonical) {
8
+ if (pending.kind === "remove") {
9
+ if (canonical === undefined) {
10
+ return "committed";
11
+ }
12
+ return sameJournalSlotAuthority(canonical, pending.prior)
13
+ ? "not-applied"
14
+ : "recovery-required";
15
+ }
16
+ if (pending.intendedAuthority !== undefined &&
17
+ canonical !== undefined &&
18
+ sameJournalSlotAuthority(canonical, pending.intendedAuthority)) {
19
+ return "committed";
20
+ }
21
+ if (pending.kind === "create") {
22
+ return canonical === undefined ? "not-applied" : "recovery-required";
23
+ }
24
+ return canonical !== undefined &&
25
+ sameJournalSlotAuthority(canonical, pending.prior)
26
+ ? "not-applied"
27
+ : "recovery-required";
28
+ }
29
+ //# sourceMappingURL=node-journal-slot-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-journal-slot-profile.js","sourceRoot":"","sources":["../../../../src/transaction-coordination/adapters/node/node-journal-slot-profile.ts"],"names":[],"mappings":"AA8LA,MAAM,UAAU,wBAAwB,CACtC,IAA0B,EAC1B,KAA2B;IAE3B,OAAO,IAAI,CAAC,eAAe,KAAK,KAAK,CAAC,eAAe;QACnD,IAAI,CAAC,QAAQ,CAAC,WAAW,KAAK,KAAK,CAAC,QAAQ,CAAC,WAAW;QACxD,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,KAAK,CAAC,QAAQ,CAAC,GAAG;QACxC,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,OAAmC,EACnC,SAA2C;IAE3C,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC9B,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,OAAO,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC;YACvD,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,mBAAmB,CAAC;IAC1B,CAAC;IACD,IACE,OAAO,CAAC,iBAAiB,KAAK,SAAS;QACvC,SAAS,KAAK,SAAS;QACvB,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,CAAC,EAC9D,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,mBAAmB,CAAC;IACvE,CAAC;IACD,OAAO,SAAS,KAAK,SAAS;QAC5B,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC;QAClD,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,mBAAmB,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type JournalSlotAuthority, type JournalSlotObservation, type JournalSlotProfile, type StoredJournalSlot } from "./node-journal-slot-profile.js";
2
+ /**
3
+ * Crash-safe canonical journal slot shared by independent transaction
4
+ * owners. Each mutation publishes a fresh hard-linked candidate, quarantines
5
+ * the previous content under a private directory, retires owned evidence into
6
+ * a terminal directory, and re-proves every authority before the next
7
+ * irreversible step. The on-disk sequence is identical for every owner; only
8
+ * naming, serialization, diagnostics, and observability come from the profile.
9
+ *
10
+ * Two fault points bracket each private directory creation (quarantine and
11
+ * retirement) so an owner can keep its released crash characterization: one
12
+ * fires before the directory exists, the other after it exists but before the
13
+ * evidence pathname moves.
14
+ */
15
+ export declare class NodeJournalSlotStore<TJournal> {
16
+ #private;
17
+ constructor(profile: JournalSlotProfile<TJournal>);
18
+ get canonicalPath(): string;
19
+ read(): Promise<StoredJournalSlot<TJournal> | undefined>;
20
+ stabilizeForReconciliation(): Promise<JournalSlotObservation<TJournal>>;
21
+ create(journal: TJournal): Promise<JournalSlotAuthority>;
22
+ replace(expected: JournalSlotAuthority, journal: TJournal): Promise<JournalSlotAuthority>;
23
+ remove(expected: JournalSlotAuthority): Promise<void>;
24
+ }
25
+ //# sourceMappingURL=node-journal-slot-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-journal-slot-store.d.ts","sourceRoot":"","sources":["../../../../src/transaction-coordination/adapters/node/node-journal-slot-store.ts"],"names":[],"mappings":"AAWA,OAAO,EAGL,KAAK,oBAAoB,EAIzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EAKvB,KAAK,iBAAiB,EACvB,MAAM,gCAAgC,CAAC;AAoBxC;;;;;;;;;;;;GAYG;AACH,qBAAa,oBAAoB,CAAC,QAAQ;;IAKxC,YAAmB,OAAO,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EAGvD;IAED,IAAW,aAAa,IAAI,MAAM,CAEjC;IAEY,IAAI,IAAI,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,CAIpE;IAEY,0BAA0B,IAAI,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,CA6BnF;IAEM,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAE9D;IAEM,OAAO,CACZ,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE,QAAQ,GAChB,OAAO,CAAC,oBAAoB,CAAC,CAE/B;IAEY,MAAM,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAejE;CA6QF"}
@@ -0,0 +1,303 @@
1
+ import { link, rename } from "node:fs/promises";
2
+ import { basename, dirname, join } from "node:path";
3
+ import { createPrivateJournalSlotDirectory, journalSlotPathExists, journalSlotResidueNames, observeJournalSlotAuthority, prepareJournalSlotCandidate, readJournalSlot } from "./node-journal-slot-evidence.js";
4
+ import { classifyCleanJournalSlotMutation, sameJournalSlotAuthority } from "./node-journal-slot-profile.js";
5
+ import { assertTerminalEvidenceDirectory, ensureTerminalEvidenceDirectory } from "../../../repository-mutation/adapters/node/node-terminal-evidence-directory.js";
6
+ /**
7
+ * Crash-safe canonical journal slot shared by independent transaction
8
+ * owners. Each mutation publishes a fresh hard-linked candidate, quarantines
9
+ * the previous content under a private directory, retires owned evidence into
10
+ * a terminal directory, and re-proves every authority before the next
11
+ * irreversible step. The on-disk sequence is identical for every owner; only
12
+ * naming, serialization, diagnostics, and observability come from the profile.
13
+ *
14
+ * Two fault points bracket each private directory creation (quarantine and
15
+ * retirement) so an owner can keep its released crash characterization: one
16
+ * fires before the directory exists, the other after it exists but before the
17
+ * evidence pathname moves.
18
+ */
19
+ export class NodeJournalSlotStore {
20
+ #parent;
21
+ #profile;
22
+ #pending;
23
+ constructor(profile) {
24
+ this.#profile = profile;
25
+ this.#parent = dirname(profile.canonicalPath);
26
+ }
27
+ get canonicalPath() {
28
+ return this.#profile.canonicalPath;
29
+ }
30
+ async read() {
31
+ this.#assertStabilized("read");
32
+ await this.#assertNoResidue("read");
33
+ return this.#readCanonical();
34
+ }
35
+ async stabilizeForReconciliation() {
36
+ await this.#fault({ phase: "before-reconciliation-directory-sync" });
37
+ await this.#profile.syncDirectory(this.#parent);
38
+ const residueNames = await this.#residueNames();
39
+ if (this.#profile.reconciliation === "residue-only") {
40
+ if (residueNames.length !== 0) {
41
+ return { outcome: "recovery-required", residueNames };
42
+ }
43
+ const stored = await this.#readCanonical();
44
+ return { outcome: "stable", ...(stored === undefined ? {} : { stored }) };
45
+ }
46
+ const canonical = await this.#readCanonical();
47
+ if (residueNames.length !== 0) {
48
+ return {
49
+ ...(canonical === undefined ? {} : { canonical }),
50
+ outcome: "recovery-required",
51
+ residueNames
52
+ };
53
+ }
54
+ const pending = this.#pending;
55
+ if (pending === undefined) {
56
+ return { outcome: "stable", ...(canonical === undefined ? {} : { stored: canonical }) };
57
+ }
58
+ const outcome = classifyCleanJournalSlotMutation(pending, canonical?.authority);
59
+ if (outcome === "recovery-required") {
60
+ return { ...(canonical === undefined ? {} : { canonical }), outcome, residueNames: [] };
61
+ }
62
+ this.#pending = undefined;
63
+ return { outcome, ...(canonical === undefined ? {} : { stored: canonical }) };
64
+ }
65
+ create(journal) {
66
+ return this.#mutate("create", undefined, journal);
67
+ }
68
+ replace(expected, journal) {
69
+ return this.#mutate("replace", expected, journal);
70
+ }
71
+ async remove(expected) {
72
+ this.#assertStabilized("remove");
73
+ await this.#assertNoResidue("remove");
74
+ await this.#requireCanonical(expected);
75
+ this.#beginPending({ kind: "remove", prior: expected });
76
+ const previous = await this.#quarantineCanonical(expected, "remove");
77
+ await this.#retire({
78
+ authority: previous.authority,
79
+ evidence: "previous",
80
+ mutation: "remove",
81
+ path: previous.path,
82
+ sourceDirectory: previous.directory
83
+ });
84
+ await this.#finishRemoval();
85
+ this.#endPending();
86
+ }
87
+ async #mutate(mutation, expected, journal) {
88
+ this.#assertStabilized(mutation);
89
+ await this.#assertNoResidue(mutation);
90
+ const bytes = await this.#profile.codec.serialize(journal);
91
+ if (expected === undefined) {
92
+ if (await this.#occupied()) {
93
+ throw this.#profile.failure("slot-occupied", { mutation });
94
+ }
95
+ this.#beginPending({ kind: "create" });
96
+ }
97
+ else {
98
+ await this.#requireCanonical(expected);
99
+ this.#beginPending({ kind: "replace", prior: expected });
100
+ }
101
+ const candidate = await this.#prepareCandidate(bytes, mutation);
102
+ if (this.#pending !== undefined && this.#pending.kind !== "remove") {
103
+ this.#pending.intendedAuthority = candidate;
104
+ }
105
+ const previous = expected === undefined
106
+ ? undefined
107
+ : await this.#quarantineCanonical(expected, "replace");
108
+ await this.#publishCandidate(candidate, mutation);
109
+ await this.#retire({
110
+ authority: candidate,
111
+ evidence: "candidate",
112
+ mutation,
113
+ path: this.#profile.naming.candidatePath,
114
+ sourceDirectory: this.#parent
115
+ });
116
+ if (previous !== undefined) {
117
+ await this.#retire({
118
+ authority: previous.authority,
119
+ evidence: "previous",
120
+ mutation,
121
+ path: previous.path,
122
+ sourceDirectory: previous.directory
123
+ });
124
+ }
125
+ await this.#finishPublication(candidate, mutation);
126
+ this.#endPending();
127
+ return candidate;
128
+ }
129
+ async #prepareCandidate(bytes, mutation) {
130
+ const { candidatePath } = this.#profile.naming;
131
+ const candidate = await prepareJournalSlotCandidate({
132
+ bytes,
133
+ candidatePath,
134
+ failure: this.#profile.failure
135
+ });
136
+ await this.#prove(candidatePath, candidate, "candidate");
137
+ await this.#syncDirectory(this.#parent, mutation, "state-parent", "candidate");
138
+ await this.#fault({ mutation, phase: "after-candidate-synced" });
139
+ await this.#prove(candidatePath, candidate, "candidate");
140
+ return candidate;
141
+ }
142
+ async #quarantineCanonical(expected, mutation) {
143
+ await this.#prove(this.canonicalPath, expected, "canonical");
144
+ await this.#fault({ mutation, path: this.canonicalPath, phase: "before-quarantine-directory" });
145
+ await this.#prove(this.canonicalPath, expected, "canonical");
146
+ const quarantine = await createPrivateJournalSlotDirectory(this.#parent, () => this.#profile.naming.quarantineDirectoryName(expected));
147
+ await this.#fault({ mutation, path: this.canonicalPath, phase: "before-shared-quarantine" });
148
+ await this.#prove(this.canonicalPath, expected, "canonical");
149
+ try {
150
+ await rename(this.canonicalPath, quarantine.path);
151
+ }
152
+ catch (error) {
153
+ throw this.#profile.failure("quarantine-unavailable", { cause: error, mutation });
154
+ }
155
+ await this.#syncRenameBoundary(quarantine.directory, this.#parent, mutation);
156
+ await this.#prove(quarantine.path, expected, "quarantine");
157
+ await this.#fault({ mutation, phase: "after-shared-quarantine-synced" });
158
+ return { ...quarantine, authority: expected };
159
+ }
160
+ async #publishCandidate(candidate, mutation) {
161
+ const { candidatePath } = this.#profile.naming;
162
+ await this.#fault({ mutation, phase: "before-canonical-link" });
163
+ await this.#prove(candidatePath, candidate, "candidate");
164
+ try {
165
+ await link(candidatePath, this.canonicalPath);
166
+ }
167
+ catch (error) {
168
+ throw this.#profile.failure("publication-conflict", { cause: error, mutation });
169
+ }
170
+ await this.#prove(this.canonicalPath, candidate, mutation === "replace" ? "replacement" : "canonical");
171
+ await this.#fault({ mutation, phase: "after-canonical-linked" });
172
+ await this.#syncDirectory(this.#parent, mutation, "state-parent", "publication");
173
+ await this.#fault({ mutation, phase: "after-canonical-synced" });
174
+ }
175
+ async #retire(request) {
176
+ const { authority, evidence, mutation, path, sourceDirectory } = request;
177
+ await this.#prove(path, authority, "evidence", evidence);
178
+ await this.#fault({ evidence, mutation, path, phase: "before-retirement-directory" });
179
+ await this.#prove(path, authority, "evidence", evidence);
180
+ const retired = await createPrivateJournalSlotDirectory(this.#parent, this.#profile.naming.retiredDirectoryName);
181
+ await this.#fault({ evidence, mutation, path, phase: "before-private-retirement" });
182
+ await this.#fault({ evidence, mutation, path, phase: "before-private-retirement-rename" });
183
+ await this.#prove(path, authority, "evidence", evidence);
184
+ await rename(path, retired.path);
185
+ await this.#syncRenameBoundary(retired.directory, sourceDirectory, mutation);
186
+ await this.#prove(retired.path, authority, "retired-evidence", evidence);
187
+ await this.#fault({ evidence, mutation, path: retired.path, phase: "before-logical-retirement" });
188
+ await this.#prove(retired.path, authority, "retired-evidence", evidence);
189
+ const terminalRoot = join(this.#parent, this.#profile.naming.terminalRootName);
190
+ const terminalAuthority = await ensureTerminalEvidenceDirectory(terminalRoot);
191
+ await this.#syncDirectory(this.#parent, mutation, "state-parent", "transition");
192
+ await assertTerminalEvidenceDirectory(terminalAuthority);
193
+ await rename(retired.directory, join(terminalRoot, basename(retired.directory)));
194
+ await this.#syncDirectory(terminalRoot, mutation, "destination", "transition");
195
+ if (sourceDirectory !== this.#parent) {
196
+ await assertTerminalEvidenceDirectory(terminalAuthority);
197
+ await rename(sourceDirectory, join(terminalRoot, `${basename(sourceDirectory)}.empty`));
198
+ await this.#syncDirectory(terminalRoot, mutation, "destination", "transition");
199
+ }
200
+ await this.#syncDirectory(this.#parent, mutation, "state-parent", "transition");
201
+ }
202
+ async #finishPublication(candidate, mutation) {
203
+ const subject = mutation === "replace" ? "replacement" : "canonical";
204
+ await this.#prove(this.canonicalPath, candidate, subject);
205
+ await this.#fault({ mutation, phase: "before-final-directory-sync" });
206
+ await this.#prove(this.canonicalPath, candidate, subject);
207
+ await this.#syncDirectory(this.#parent, mutation, "state-parent", "final");
208
+ await this.#prove(this.canonicalPath, candidate, subject);
209
+ await this.#fault({ mutation, phase: "after-final-directory-sync" });
210
+ }
211
+ async #finishRemoval() {
212
+ await this.#proveMissing();
213
+ await this.#fault({ mutation: "remove", phase: "before-final-directory-sync" });
214
+ await this.#proveMissing();
215
+ await this.#syncDirectory(this.#parent, "remove", "state-parent", "final");
216
+ await this.#proveMissing();
217
+ await this.#fault({ mutation: "remove", phase: "after-final-directory-sync" });
218
+ }
219
+ #assertStabilized(mutation) {
220
+ if (this.#profile.reconciliation === "sticky-pending" && this.#pending !== undefined) {
221
+ throw this.#profile.failure("must-be-stabilized", { mutation });
222
+ }
223
+ }
224
+ async #assertNoResidue(mutation) {
225
+ if ((await this.#residueNames()).length !== 0) {
226
+ throw this.#profile.failure("transition-residue", { mutation });
227
+ }
228
+ }
229
+ #residueNames() {
230
+ return journalSlotResidueNames({
231
+ failure: this.#profile.failure,
232
+ matchers: this.#profile.naming.residues,
233
+ parent: this.#parent
234
+ });
235
+ }
236
+ #readCanonical() {
237
+ return readJournalSlot({
238
+ failure: this.#profile.failure,
239
+ maximumBytes: this.#profile.maximumBytes,
240
+ parse: this.#profile.codec.parse,
241
+ path: this.canonicalPath
242
+ });
243
+ }
244
+ async #occupied() {
245
+ return this.#profile.canonicalInspection === "authority"
246
+ ? journalSlotPathExists(this.canonicalPath, this.#profile.maximumBytes)
247
+ : (await this.#readCanonical()) !== undefined;
248
+ }
249
+ async #requireCanonical(expected) {
250
+ if (this.#profile.canonicalInspection === "authority") {
251
+ await this.#prove(this.canonicalPath, expected, "canonical");
252
+ return;
253
+ }
254
+ const stored = await this.#readCanonical();
255
+ if (stored === undefined || !sameJournalSlotAuthority(stored.authority, expected)) {
256
+ throw this.#profile.failure("changed", { subject: "canonical" });
257
+ }
258
+ }
259
+ #beginPending(pending) {
260
+ if (this.#profile.reconciliation === "sticky-pending") {
261
+ this.#pending = pending;
262
+ }
263
+ }
264
+ #endPending() {
265
+ this.#pending = undefined;
266
+ }
267
+ async #prove(path, expected, subject, evidence) {
268
+ const observed = await observeJournalSlotAuthority(path, expected, this.#profile.maximumBytes);
269
+ if (observed !== "match") {
270
+ throw this.#profile.failure("changed", {
271
+ ...(evidence === undefined ? {} : { evidence }),
272
+ subject
273
+ });
274
+ }
275
+ }
276
+ async #proveMissing() {
277
+ const present = this.#profile.canonicalInspection === "authority"
278
+ ? await journalSlotPathExists(this.canonicalPath, this.#profile.maximumBytes)
279
+ : (await this.#readCanonical()) !== undefined;
280
+ if (present) {
281
+ throw this.#profile.failure("canonical-recreated", { subject: "canonical" });
282
+ }
283
+ }
284
+ async #syncDirectory(path, mutation, role, stage) {
285
+ if (this.#profile.observableSyncStages.includes(stage)) {
286
+ await this.#fault({ mutation, path, phase: "before-directory-sync", role, stage });
287
+ }
288
+ await this.#profile.syncDirectory(path);
289
+ }
290
+ async #syncRenameBoundary(destination, source, mutation) {
291
+ await this.#syncDirectory(destination, mutation, "destination", "transition");
292
+ if (source !== destination) {
293
+ await this.#syncDirectory(source, mutation, "source", "transition");
294
+ }
295
+ if (this.#parent !== destination && this.#parent !== source) {
296
+ await this.#syncDirectory(this.#parent, mutation, "state-parent", "transition");
297
+ }
298
+ }
299
+ async #fault(point) {
300
+ await this.#profile.faultInjector?.(point);
301
+ }
302
+ }
303
+ //# sourceMappingURL=node-journal-slot-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-journal-slot-store.js","sourceRoot":"","sources":["../../../../src/transaction-coordination/adapters/node/node-journal-slot-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,iCAAiC,EACjC,qBAAqB,EACrB,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,eAAe,EAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EAYzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAChC,MAAM,gFAAgF,CAAC;AAgBxF;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,oBAAoB;IACtB,OAAO,CAAS;IAChB,QAAQ,CAA+B;IAChD,QAAQ,CAAyC;IAEjD,YAAmB,OAAqC;QACtD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAChD,CAAC;IAED,IAAW,aAAa;QACtB,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AM,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;QAC9E,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;YAC3B,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;QACtE,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,KAAK,WAAW,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC;YAC5D,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAA4B;QACvC,MAAM,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ export interface MutationOperationReleaseOptions {
2
+ readonly retainTransactionBarrier?: boolean;
3
+ }
4
+ export interface OperationLockOperations {
5
+ readonly faultInjector?: (point: {
6
+ readonly path: string;
7
+ readonly phase: "after-release-retirement";
8
+ }) => Promise<void> | void;
9
+ readonly retirementToken?: () => string;
10
+ }
11
+ export declare class NodeMutationOperationLock {
12
+ #private;
13
+ constructor(consumerRoot: string, operations?: OperationLockOperations);
14
+ acquire(): Promise<(options?: MutationOperationReleaseOptions) => Promise<void>>;
15
+ }
16
+ //# sourceMappingURL=node-operation-lock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-operation-lock.d.ts","sourceRoot":"","sources":["../../../../src/transaction-coordination/adapters/node/node-operation-lock.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CAC7C;AA4BD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAC;KAC5C,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,MAAM,CAAC;CACzC;AAyXD,qBAAa,yBAAyB;;IAIpC,YAAY,YAAY,EAAE,MAAM,EAAE,UAAU,GAAE,uBAA4B,EAGzE;IAEK,OAAO,IAAI,OAAO,CACtB,CAAC,OAAO,CAAC,EAAE,+BAA+B,KAAK,OAAO,CAAC,IAAI,CAAC,CAC7D,CAsEA;CACF"}