@claudexor/daemon 3.25.1 → 4.0.1

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 (453) hide show
  1. package/dist/account-resets.d.ts +2 -2
  2. package/dist/account-resets.d.ts.map +1 -1
  3. package/dist/account-resets.js +15 -0
  4. package/dist/account-resets.js.map +1 -1
  5. package/dist/client.d.ts +25 -6
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +55 -51
  8. package/dist/client.js.map +1 -1
  9. package/dist/command-authority.d.ts +11 -8
  10. package/dist/command-authority.d.ts.map +1 -1
  11. package/dist/command-authority.js +5 -6
  12. package/dist/command-authority.js.map +1 -1
  13. package/dist/command-list-projection.d.ts +0 -1
  14. package/dist/command-list-projection.d.ts.map +1 -1
  15. package/dist/command-list-projection.js +0 -6
  16. package/dist/command-list-projection.js.map +1 -1
  17. package/dist/command-list-select.d.ts +0 -4
  18. package/dist/command-list-select.d.ts.map +1 -1
  19. package/dist/command-list-select.js +1 -115
  20. package/dist/command-list-select.js.map +1 -1
  21. package/dist/command-retention.d.ts +7 -19
  22. package/dist/command-retention.d.ts.map +1 -1
  23. package/dist/command-retention.js +1 -120
  24. package/dist/command-retention.js.map +1 -1
  25. package/dist/command-rpc.d.ts +4 -1
  26. package/dist/command-rpc.d.ts.map +1 -1
  27. package/dist/command-rpc.js +12 -1
  28. package/dist/command-rpc.js.map +1 -1
  29. package/dist/command-store.d.ts +15 -52
  30. package/dist/command-store.d.ts.map +1 -1
  31. package/dist/command-store.js +5 -493
  32. package/dist/command-store.js.map +1 -1
  33. package/dist/daemon-health.d.ts +56 -8
  34. package/dist/daemon-health.d.ts.map +1 -1
  35. package/dist/daemon-health.js +44 -9
  36. package/dist/daemon-health.js.map +1 -1
  37. package/dist/daemon-local-client.d.ts +28 -0
  38. package/dist/daemon-local-client.d.ts.map +1 -0
  39. package/dist/daemon-local-client.js +55 -0
  40. package/dist/daemon-local-client.js.map +1 -0
  41. package/dist/delivery-command.d.ts +4 -4
  42. package/dist/delivery-command.d.ts.map +1 -1
  43. package/dist/delivery-command.js.map +1 -1
  44. package/dist/index.d.ts +23 -8
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +25 -8
  47. package/dist/index.js.map +1 -1
  48. package/dist/interactions.d.ts +12 -28
  49. package/dist/interactions.d.ts.map +1 -1
  50. package/dist/interactions.js +22 -123
  51. package/dist/interactions.js.map +1 -1
  52. package/dist/job-admission.d.ts +26 -0
  53. package/dist/job-admission.d.ts.map +1 -0
  54. package/dist/job-admission.js +67 -0
  55. package/dist/job-admission.js.map +1 -0
  56. package/dist/journal-fold-policy.d.ts +1 -1
  57. package/dist/journal-fold-policy.d.ts.map +1 -1
  58. package/dist/journal-recovery-files.d.ts +1 -41
  59. package/dist/journal-recovery-files.d.ts.map +1 -1
  60. package/dist/journal-recovery-files.js +2 -340
  61. package/dist/journal-recovery-files.js.map +1 -1
  62. package/dist/loop-facts.d.ts +28 -0
  63. package/dist/loop-facts.d.ts.map +1 -0
  64. package/dist/loop-facts.js +97 -0
  65. package/dist/loop-facts.js.map +1 -0
  66. package/dist/memory-facts.d.ts +2 -0
  67. package/dist/memory-facts.d.ts.map +1 -1
  68. package/dist/memory-facts.js +5 -0
  69. package/dist/memory-facts.js.map +1 -1
  70. package/dist/model-operations.d.ts +11 -4
  71. package/dist/model-operations.d.ts.map +1 -1
  72. package/dist/model-operations.js +68 -38
  73. package/dist/model-operations.js.map +1 -1
  74. package/dist/operator-decisions.d.ts +15 -25
  75. package/dist/operator-decisions.d.ts.map +1 -1
  76. package/dist/operator-decisions.js +5 -84
  77. package/dist/operator-decisions.js.map +1 -1
  78. package/dist/projects.d.ts +42 -41
  79. package/dist/projects.d.ts.map +1 -1
  80. package/dist/projects.js +46 -184
  81. package/dist/projects.js.map +1 -1
  82. package/dist/quota-registry-replay.d.ts +2 -2
  83. package/dist/quota-registry-replay.d.ts.map +1 -1
  84. package/dist/quota-registry-replay.js.map +1 -1
  85. package/dist/quota-registry-support.d.ts +4 -1
  86. package/dist/quota-registry-support.d.ts.map +1 -1
  87. package/dist/quota-registry-support.js +15 -2
  88. package/dist/quota-registry-support.js.map +1 -1
  89. package/dist/quota-registry.d.ts +64 -2
  90. package/dist/quota-registry.d.ts.map +1 -1
  91. package/dist/quota-registry.js +10 -3
  92. package/dist/quota-registry.js.map +1 -1
  93. package/dist/quota-resources.d.ts +6 -3
  94. package/dist/quota-resources.d.ts.map +1 -1
  95. package/dist/quota-resources.js +25 -8
  96. package/dist/quota-resources.js.map +1 -1
  97. package/dist/runless-turn-recovery.d.ts +2 -9
  98. package/dist/runless-turn-recovery.d.ts.map +1 -1
  99. package/dist/runless-turn-recovery.js +0 -14
  100. package/dist/runless-turn-recovery.js.map +1 -1
  101. package/dist/server.d.ts +23 -22
  102. package/dist/server.d.ts.map +1 -1
  103. package/dist/server.js +74 -84
  104. package/dist/server.js.map +1 -1
  105. package/dist/store/blob-files.d.ts +71 -0
  106. package/dist/store/blob-files.d.ts.map +1 -0
  107. package/dist/store/blob-files.js +160 -0
  108. package/dist/store/blob-files.js.map +1 -0
  109. package/dist/store/command-prune.d.ts +37 -0
  110. package/dist/store/command-prune.d.ts.map +1 -0
  111. package/dist/store/command-prune.js +123 -0
  112. package/dist/store/command-prune.js.map +1 -0
  113. package/dist/store/command-queries.d.ts +41 -0
  114. package/dist/store/command-queries.d.ts.map +1 -0
  115. package/dist/store/command-queries.js +186 -0
  116. package/dist/store/command-queries.js.map +1 -0
  117. package/dist/store/command-rows.d.ts +66 -0
  118. package/dist/store/command-rows.d.ts.map +1 -0
  119. package/dist/store/command-rows.js +141 -0
  120. package/dist/store/command-rows.js.map +1 -0
  121. package/dist/store/commands.d.ts +49 -0
  122. package/dist/store/commands.d.ts.map +1 -0
  123. package/dist/store/commands.js +247 -0
  124. package/dist/store/commands.js.map +1 -0
  125. package/dist/store/cursors.d.ts +33 -0
  126. package/dist/store/cursors.d.ts.map +1 -0
  127. package/dist/store/cursors.js +82 -0
  128. package/dist/store/cursors.js.map +1 -0
  129. package/dist/store/engine-recovery-files.d.ts +14 -0
  130. package/dist/store/engine-recovery-files.d.ts.map +1 -0
  131. package/dist/store/engine-recovery-files.js +53 -0
  132. package/dist/store/engine-recovery-files.js.map +1 -0
  133. package/dist/store/engine-state-recovery.d.ts +71 -0
  134. package/dist/store/engine-state-recovery.d.ts.map +1 -0
  135. package/dist/store/engine-state-recovery.js +318 -0
  136. package/dist/store/engine-state-recovery.js.map +1 -0
  137. package/dist/store/errors.d.ts +80 -0
  138. package/dist/store/errors.d.ts.map +1 -0
  139. package/dist/store/errors.js +130 -0
  140. package/dist/store/errors.js.map +1 -0
  141. package/dist/store/event-store.d.ts +52 -0
  142. package/dist/store/event-store.d.ts.map +1 -0
  143. package/dist/store/event-store.js +117 -0
  144. package/dist/store/event-store.js.map +1 -0
  145. package/dist/store/external-files.d.ts +40 -0
  146. package/dist/store/external-files.d.ts.map +1 -0
  147. package/dist/store/external-files.js +90 -0
  148. package/dist/store/external-files.js.map +1 -0
  149. package/dist/store/flusher-protocol.d.ts +82 -0
  150. package/dist/store/flusher-protocol.d.ts.map +1 -0
  151. package/dist/store/flusher-protocol.js +23 -0
  152. package/dist/store/flusher-protocol.js.map +1 -0
  153. package/dist/store/flusher-worker.d.ts +24 -0
  154. package/dist/store/flusher-worker.d.ts.map +1 -0
  155. package/dist/store/flusher-worker.js +185 -0
  156. package/dist/store/flusher-worker.js.map +1 -0
  157. package/dist/store/flusher.d.ts +87 -0
  158. package/dist/store/flusher.d.ts.map +1 -0
  159. package/dist/store/flusher.js +264 -0
  160. package/dist/store/flusher.js.map +1 -0
  161. package/dist/store/generations.d.ts +43 -0
  162. package/dist/store/generations.d.ts.map +1 -0
  163. package/dist/store/generations.js +143 -0
  164. package/dist/store/generations.js.map +1 -0
  165. package/dist/store/idempotency.d.ts +25 -0
  166. package/dist/store/idempotency.d.ts.map +1 -0
  167. package/dist/store/idempotency.js +53 -0
  168. package/dist/store/idempotency.js.map +1 -0
  169. package/dist/store/import-context.d.ts +22 -0
  170. package/dist/store/import-context.d.ts.map +1 -0
  171. package/dist/store/import-context.js +87 -0
  172. package/dist/store/import-context.js.map +1 -0
  173. package/dist/store/import-discovery.d.ts +6 -0
  174. package/dist/store/import-discovery.d.ts.map +1 -0
  175. package/dist/store/import-discovery.js +66 -0
  176. package/dist/store/import-discovery.js.map +1 -0
  177. package/dist/store/import-records.d.ts +6 -0
  178. package/dist/store/import-records.d.ts.map +1 -0
  179. package/dist/store/import-records.js +191 -0
  180. package/dist/store/import-records.js.map +1 -0
  181. package/dist/store/import-resources.d.ts +14 -0
  182. package/dist/store/import-resources.d.ts.map +1 -0
  183. package/dist/store/import-resources.js +197 -0
  184. package/dist/store/import-resources.js.map +1 -0
  185. package/dist/store/import-source.d.ts +24 -0
  186. package/dist/store/import-source.d.ts.map +1 -0
  187. package/dist/store/import-source.js +65 -0
  188. package/dist/store/import-source.js.map +1 -0
  189. package/dist/store/import-verify.d.ts +6 -0
  190. package/dist/store/import-verify.d.ts.map +1 -0
  191. package/dist/store/import-verify.js +97 -0
  192. package/dist/store/import-verify.js.map +1 -0
  193. package/dist/store/import-worker.d.ts +18 -0
  194. package/dist/store/import-worker.d.ts.map +1 -0
  195. package/dist/store/import-worker.js +69 -0
  196. package/dist/store/import-worker.js.map +1 -0
  197. package/dist/store/importer.d.ts +42 -0
  198. package/dist/store/importer.d.ts.map +1 -0
  199. package/dist/store/importer.js +239 -0
  200. package/dist/store/importer.js.map +1 -0
  201. package/dist/store/interactions.d.ts +22 -0
  202. package/dist/store/interactions.d.ts.map +1 -0
  203. package/dist/store/interactions.js +82 -0
  204. package/dist/store/interactions.js.map +1 -0
  205. package/dist/store/legacy-journal/frame-codec.d.ts +94 -0
  206. package/dist/store/legacy-journal/frame-codec.d.ts.map +1 -0
  207. package/dist/store/legacy-journal/frame-codec.js +352 -0
  208. package/dist/store/legacy-journal/frame-codec.js.map +1 -0
  209. package/dist/store/legacy-journal/frame-reader.d.ts +30 -0
  210. package/dist/store/legacy-journal/frame-reader.d.ts.map +1 -0
  211. package/dist/store/legacy-journal/frame-reader.js +97 -0
  212. package/dist/store/legacy-journal/frame-reader.js.map +1 -0
  213. package/dist/store/legacy-journal/journal-fold.d.ts +47 -0
  214. package/dist/store/legacy-journal/journal-fold.d.ts.map +1 -0
  215. package/dist/store/legacy-journal/journal-fold.js +81 -0
  216. package/dist/store/legacy-journal/journal-fold.js.map +1 -0
  217. package/dist/store/legacy-journal/journal-partition.d.ts +2 -0
  218. package/dist/store/legacy-journal/journal-partition.d.ts.map +1 -0
  219. package/dist/store/legacy-journal/journal-partition.js +10 -0
  220. package/dist/store/legacy-journal/journal-partition.js.map +1 -0
  221. package/dist/store/legacy-journal/read-only-preparation.d.ts +48 -0
  222. package/dist/store/legacy-journal/read-only-preparation.d.ts.map +1 -0
  223. package/dist/store/legacy-journal/read-only-preparation.js +430 -0
  224. package/dist/store/legacy-journal/read-only-preparation.js.map +1 -0
  225. package/dist/store/maintenance-worker.d.ts +5 -0
  226. package/dist/store/maintenance-worker.d.ts.map +1 -0
  227. package/dist/store/maintenance-worker.js +175 -0
  228. package/dist/store/maintenance-worker.js.map +1 -0
  229. package/dist/store/maintenance.d.ts +124 -0
  230. package/dist/store/maintenance.d.ts.map +1 -0
  231. package/dist/store/maintenance.js +197 -0
  232. package/dist/store/maintenance.js.map +1 -0
  233. package/dist/store/mutation.d.ts +34 -0
  234. package/dist/store/mutation.d.ts.map +1 -0
  235. package/dist/store/mutation.js +85 -0
  236. package/dist/store/mutation.js.map +1 -0
  237. package/dist/store/obligations.d.ts +101 -0
  238. package/dist/store/obligations.d.ts.map +1 -0
  239. package/dist/store/obligations.js +226 -0
  240. package/dist/store/obligations.js.map +1 -0
  241. package/dist/store/operator-decisions.d.ts +23 -0
  242. package/dist/store/operator-decisions.d.ts.map +1 -0
  243. package/dist/store/operator-decisions.js +68 -0
  244. package/dist/store/operator-decisions.js.map +1 -0
  245. package/dist/store/owner-generations.d.ts +33 -0
  246. package/dist/store/owner-generations.d.ts.map +1 -0
  247. package/dist/store/owner-generations.js +63 -0
  248. package/dist/store/owner-generations.js.map +1 -0
  249. package/dist/store/partitions.d.ts +37 -0
  250. package/dist/store/partitions.d.ts.map +1 -0
  251. package/dist/store/partitions.js +68 -0
  252. package/dist/store/partitions.js.map +1 -0
  253. package/dist/store/pragmas.d.ts +32 -0
  254. package/dist/store/pragmas.d.ts.map +1 -0
  255. package/dist/store/pragmas.js +65 -0
  256. package/dist/store/pragmas.js.map +1 -0
  257. package/dist/store/project-router.d.ts +325 -0
  258. package/dist/store/project-router.d.ts.map +1 -0
  259. package/dist/store/project-router.js +298 -0
  260. package/dist/store/project-router.js.map +1 -0
  261. package/dist/store/projects.d.ts +36 -0
  262. package/dist/store/projects.d.ts.map +1 -0
  263. package/dist/store/projects.js +238 -0
  264. package/dist/store/projects.js.map +1 -0
  265. package/dist/store/publish-blob.d.ts +20 -0
  266. package/dist/store/publish-blob.d.ts.map +1 -0
  267. package/dist/store/publish-blob.js +158 -0
  268. package/dist/store/publish-blob.js.map +1 -0
  269. package/dist/store/purge-files.d.ts +30 -0
  270. package/dist/store/purge-files.d.ts.map +1 -0
  271. package/dist/store/purge-files.js +79 -0
  272. package/dist/store/purge-files.js.map +1 -0
  273. package/dist/store/resource-rows.d.ts +40 -0
  274. package/dist/store/resource-rows.d.ts.map +1 -0
  275. package/dist/store/resource-rows.js +103 -0
  276. package/dist/store/resource-rows.js.map +1 -0
  277. package/dist/store/resources.d.ts +67 -0
  278. package/dist/store/resources.d.ts.map +1 -0
  279. package/dist/store/resources.js +147 -0
  280. package/dist/store/resources.js.map +1 -0
  281. package/dist/store/retention.d.ts +95 -0
  282. package/dist/store/retention.d.ts.map +1 -0
  283. package/dist/store/retention.js +173 -0
  284. package/dist/store/retention.js.map +1 -0
  285. package/dist/store/run-events.d.ts +14 -0
  286. package/dist/store/run-events.d.ts.map +1 -0
  287. package/dist/store/run-events.js +35 -0
  288. package/dist/store/run-events.js.map +1 -0
  289. package/dist/store/runtime.d.ts +24 -0
  290. package/dist/store/runtime.d.ts.map +1 -0
  291. package/dist/store/runtime.js +67 -0
  292. package/dist/store/runtime.js.map +1 -0
  293. package/dist/store/schema.d.ts +33 -0
  294. package/dist/store/schema.d.ts.map +1 -0
  295. package/dist/store/schema.js +187 -0
  296. package/dist/store/schema.js.map +1 -0
  297. package/dist/store/setup-bindings.d.ts +20 -0
  298. package/dist/store/setup-bindings.d.ts.map +1 -0
  299. package/dist/store/setup-bindings.js +52 -0
  300. package/dist/store/setup-bindings.js.map +1 -0
  301. package/dist/store/sql-command-router.d.ts +79 -0
  302. package/dist/store/sql-command-router.d.ts.map +1 -0
  303. package/dist/store/sql-command-router.js +92 -0
  304. package/dist/store/sql-command-router.js.map +1 -0
  305. package/dist/store/sql-daemon-services.d.ts +61 -0
  306. package/dist/store/sql-daemon-services.d.ts.map +1 -0
  307. package/dist/store/sql-daemon-services.js +124 -0
  308. package/dist/store/sql-daemon-services.js.map +1 -0
  309. package/dist/store/sql-recovery-export.d.ts +8 -0
  310. package/dist/store/sql-recovery-export.d.ts.map +1 -0
  311. package/dist/store/sql-recovery-export.js +110 -0
  312. package/dist/store/sql-recovery-export.js.map +1 -0
  313. package/dist/store/sql-recovery-inspection.d.ts +22 -0
  314. package/dist/store/sql-recovery-inspection.d.ts.map +1 -0
  315. package/dist/store/sql-recovery-inspection.js +88 -0
  316. package/dist/store/sql-recovery-inspection.js.map +1 -0
  317. package/dist/store/sql-recovery.d.ts +69 -0
  318. package/dist/store/sql-recovery.d.ts.map +1 -0
  319. package/dist/store/sql-recovery.js +169 -0
  320. package/dist/store/sql-recovery.js.map +1 -0
  321. package/dist/store/sql-validation.d.ts +9 -0
  322. package/dist/store/sql-validation.d.ts.map +1 -0
  323. package/dist/store/sql-validation.js +103 -0
  324. package/dist/store/sql-validation.js.map +1 -0
  325. package/dist/store/statement-observer.d.ts +7 -0
  326. package/dist/store/statement-observer.d.ts.map +1 -0
  327. package/dist/store/statement-observer.js +44 -0
  328. package/dist/store/statement-observer.js.map +1 -0
  329. package/dist/store/store.d.ts +110 -0
  330. package/dist/store/store.d.ts.map +1 -0
  331. package/dist/store/store.js +296 -0
  332. package/dist/store/store.js.map +1 -0
  333. package/dist/store/terminal-files.d.ts +21 -0
  334. package/dist/store/terminal-files.d.ts.map +1 -0
  335. package/dist/store/terminal-files.js +115 -0
  336. package/dist/store/terminal-files.js.map +1 -0
  337. package/dist/store/thread-replay.d.ts +12 -0
  338. package/dist/store/thread-replay.d.ts.map +1 -0
  339. package/dist/store/thread-replay.js +49 -0
  340. package/dist/store/thread-replay.js.map +1 -0
  341. package/dist/store/thread-rows.d.ts +25 -0
  342. package/dist/store/thread-rows.d.ts.map +1 -0
  343. package/dist/store/thread-rows.js +141 -0
  344. package/dist/store/thread-rows.js.map +1 -0
  345. package/dist/store/threads.d.ts +105 -0
  346. package/dist/store/threads.d.ts.map +1 -0
  347. package/dist/store/threads.js +423 -0
  348. package/dist/store/threads.js.map +1 -0
  349. package/dist/store/upload-binding-retention.d.ts +26 -0
  350. package/dist/store/upload-binding-retention.d.ts.map +1 -0
  351. package/dist/store/upload-binding-retention.js +142 -0
  352. package/dist/store/upload-binding-retention.js.map +1 -0
  353. package/dist/store/uploads.d.ts +30 -0
  354. package/dist/store/uploads.d.ts.map +1 -0
  355. package/dist/store/uploads.js +238 -0
  356. package/dist/store/uploads.js.map +1 -0
  357. package/dist/store-contracts.d.ts +181 -0
  358. package/dist/store-contracts.d.ts.map +1 -0
  359. package/dist/store-contracts.js +2 -0
  360. package/dist/store-contracts.js.map +1 -0
  361. package/dist/terminal-authority.d.ts +9 -0
  362. package/dist/terminal-authority.d.ts.map +1 -1
  363. package/dist/terminal-authority.js +103 -1
  364. package/dist/terminal-authority.js.map +1 -1
  365. package/dist/thread-lane-checkpoints.d.ts +0 -2
  366. package/dist/thread-lane-checkpoints.d.ts.map +1 -1
  367. package/dist/thread-lane-checkpoints.js +0 -4
  368. package/dist/thread-lane-checkpoints.js.map +1 -1
  369. package/dist/thread-store-support.d.ts +1 -27
  370. package/dist/thread-store-support.d.ts.map +1 -1
  371. package/dist/thread-store-support.js +0 -63
  372. package/dist/thread-store-support.js.map +1 -1
  373. package/dist/threads.d.ts +1 -113
  374. package/dist/threads.d.ts.map +1 -1
  375. package/dist/threads.js +1 -379
  376. package/dist/threads.js.map +1 -1
  377. package/package.json +9 -7
  378. package/dist/command-activity.d.ts +0 -14
  379. package/dist/command-activity.d.ts.map +0 -1
  380. package/dist/command-activity.js +0 -16
  381. package/dist/command-activity.js.map +0 -1
  382. package/dist/journal-events.d.ts +0 -4
  383. package/dist/journal-events.d.ts.map +0 -1
  384. package/dist/journal-events.js +0 -23
  385. package/dist/journal-events.js.map +0 -1
  386. package/dist/journal-maintenance.d.ts +0 -50
  387. package/dist/journal-maintenance.d.ts.map +0 -1
  388. package/dist/journal-maintenance.js +0 -162
  389. package/dist/journal-maintenance.js.map +0 -1
  390. package/dist/journal-manager-journal.d.ts +0 -18
  391. package/dist/journal-manager-journal.d.ts.map +0 -1
  392. package/dist/journal-manager-journal.js +0 -25
  393. package/dist/journal-manager-journal.js.map +0 -1
  394. package/dist/journal-manager-lifecycle.d.ts +0 -11
  395. package/dist/journal-manager-lifecycle.d.ts.map +0 -1
  396. package/dist/journal-manager-lifecycle.js +0 -2
  397. package/dist/journal-manager-lifecycle.js.map +0 -1
  398. package/dist/journal-manager.d.ts +0 -99
  399. package/dist/journal-manager.d.ts.map +0 -1
  400. package/dist/journal-manager.js +0 -559
  401. package/dist/journal-manager.js.map +0 -1
  402. package/dist/journal-prepared-operation.d.ts +0 -53
  403. package/dist/journal-prepared-operation.d.ts.map +0 -1
  404. package/dist/journal-prepared-operation.js +0 -158
  405. package/dist/journal-prepared-operation.js.map +0 -1
  406. package/dist/journal-projection-slot.d.ts +0 -28
  407. package/dist/journal-projection-slot.d.ts.map +0 -1
  408. package/dist/journal-projection-slot.js +0 -71
  409. package/dist/journal-projection-slot.js.map +0 -1
  410. package/dist/journal-projection.d.ts +0 -13
  411. package/dist/journal-projection.d.ts.map +0 -1
  412. package/dist/journal-projection.js +0 -2
  413. package/dist/journal-projection.js.map +0 -1
  414. package/dist/partition-accounts.d.ts +0 -27
  415. package/dist/partition-accounts.d.ts.map +0 -1
  416. package/dist/partition-accounts.js +0 -21
  417. package/dist/partition-accounts.js.map +0 -1
  418. package/dist/project-partition-preparation.d.ts +0 -87
  419. package/dist/project-partition-preparation.d.ts.map +0 -1
  420. package/dist/project-partition-preparation.js +0 -273
  421. package/dist/project-partition-preparation.js.map +0 -1
  422. package/dist/project-partitions.d.ts +0 -214
  423. package/dist/project-partitions.d.ts.map +0 -1
  424. package/dist/project-partitions.js +0 -486
  425. package/dist/project-partitions.js.map +0 -1
  426. package/dist/project-remove.d.ts +0 -11
  427. package/dist/project-remove.d.ts.map +0 -1
  428. package/dist/project-remove.js +0 -65
  429. package/dist/project-remove.js.map +0 -1
  430. package/dist/project-thread-listing.d.ts +0 -14
  431. package/dist/project-thread-listing.d.ts.map +0 -1
  432. package/dist/project-thread-listing.js +0 -37
  433. package/dist/project-thread-listing.js.map +0 -1
  434. package/dist/quota-projection.d.ts +0 -11
  435. package/dist/quota-projection.d.ts.map +0 -1
  436. package/dist/quota-projection.js +0 -10
  437. package/dist/quota-projection.js.map +0 -1
  438. package/dist/resource-store.d.ts +0 -39
  439. package/dist/resource-store.d.ts.map +0 -1
  440. package/dist/resource-store.js +0 -464
  441. package/dist/resource-store.js.map +0 -1
  442. package/dist/run-event-terminal-index.d.ts +0 -13
  443. package/dist/run-event-terminal-index.d.ts.map +0 -1
  444. package/dist/run-event-terminal-index.js +0 -38
  445. package/dist/run-event-terminal-index.js.map +0 -1
  446. package/dist/run-events.d.ts +0 -17
  447. package/dist/run-events.d.ts.map +0 -1
  448. package/dist/run-events.js +0 -31
  449. package/dist/run-events.js.map +0 -1
  450. package/dist/thread-head-ping.d.ts +0 -35
  451. package/dist/thread-head-ping.d.ts.map +0 -1
  452. package/dist/thread-head-ping.js +0 -67
  453. package/dist/thread-head-ping.js.map +0 -1
@@ -1,559 +0,0 @@
1
- import { randomUUID } from "node:crypto";
2
- import { existsSync, realpathSync, renameSync } from "node:fs";
3
- import { basename, dirname, join } from "node:path";
4
- import { DurableJournal, JournalRecoveryRequiredError, journalPartitionDirectory, } from "@claudexor/journal";
5
- import { ensureCanonicalPrivateDirectory, fsyncDirectory } from "@claudexor/util";
6
- import { exportJournalRecovery, fingerprintPartition, cloneRecovery, recoveryAt, recoveryFrom, safeMessage, sha256, writeAtomicPrivateJson, } from "./journal-recovery-files.js";
7
- import { conflict, matchingReceipt, quarantineRequestDigest, readOperation, typedError, validateRequest, } from "./journal-recovery-operation.js";
8
- import { journalEvents } from "./journal-events.js";
9
- import { daemonJournalOptions } from "./journal-manager-journal.js";
10
- import { applyPreparedOperation, completePreparedReceipt, inspectPreparedOperation, preparationFingerprint, reconcilePreparedOperationOnStart, revalidatePreparedState, } from "./journal-prepared-operation.js";
11
- import { prepareProjectionSlots, ProjectionSlot, } from "./journal-projection-slot.js";
12
- export class JournalManager {
13
- options;
14
- rootDir;
15
- partition;
16
- journalRoot;
17
- partitionDir;
18
- operationsDir;
19
- quarantineDir;
20
- artifactPrefix;
21
- now;
22
- faults;
23
- registrations = new Map();
24
- journalOptions;
25
- journal = null;
26
- recovery = { status: "ready", discardedTailBytes: 0 };
27
- generationValue = 0;
28
- preparedOperation = null;
29
- preparationResult = null;
30
- lifecycle = "idle";
31
- constructor(rootDir, options = {}) {
32
- this.options = options;
33
- this.partition = options.partition?.trim() || "global";
34
- this.now = options.now ?? (() => new Date());
35
- this.faults = options.faults ?? {};
36
- this.rootDir = realpathSync(rootDir);
37
- this.journalRoot = join(this.rootDir, "journal");
38
- this.partitionDir = journalPartitionDirectory(this.journalRoot, this.partition);
39
- this.artifactPrefix = basename(this.partitionDir);
40
- this.operationsDir = join(this.rootDir, "recovery-operations", basename(this.partitionDir));
41
- this.quarantineDir = join(this.rootDir, "journal-quarantine");
42
- this.journalOptions = daemonJournalOptions({
43
- rootDir: this.journalRoot,
44
- partition: this.partition,
45
- now: this.now,
46
- requestMaintenance: options.requestMaintenance,
47
- current: () => this.journal,
48
- });
49
- }
50
- registerProjection(descriptor) {
51
- this.assertOpen();
52
- if (this.lifecycle !== "idle")
53
- throw new Error("journal projection registration is closed");
54
- if (!/^[A-Za-z0-9._-]+$/.test(descriptor.name) || this.registrations.has(descriptor.name)) {
55
- throw new Error(`invalid or duplicate journal projection '${descriptor.name}'`);
56
- }
57
- const slot = new ProjectionSlot(() => this.recovery);
58
- this.registrations.set(descriptor.name, { descriptor, slot });
59
- return slot;
60
- }
61
- start() {
62
- this.assertOpen();
63
- if (this.lifecycle !== "idle")
64
- return this.inspect();
65
- if (this.registrations.size === 0)
66
- throw new Error("journal partition requires a projection");
67
- ensureCanonicalPrivateDirectory(this.rootDir);
68
- ensureCanonicalPrivateDirectory(this.journalRoot);
69
- if (!this.reconcilePrepared())
70
- this.openGeneration();
71
- return this.inspect();
72
- }
73
- prepare() {
74
- this.assertOpen();
75
- if (this.preparationResult &&
76
- (this.lifecycle === "prepared" || this.lifecycle === "recovery_required")) {
77
- return structuredClone(this.preparationResult);
78
- }
79
- if (this.lifecycle !== "idle")
80
- throw new Error("journal manager is already running");
81
- if (this.registrations.size === 0)
82
- throw new Error("journal partition requires a projection");
83
- this.generationValue += 1;
84
- const projectionStatus = [];
85
- try {
86
- this.journal = DurableJournal.prepare(this.journalOptions);
87
- this.recovery = this.journal.state();
88
- this.preparedOperation = inspectPreparedOperation({
89
- rootDir: this.rootDir,
90
- operationsDir: this.operationsDir,
91
- quarantineDir: this.quarantineDir,
92
- partitionDir: this.partitionDir,
93
- partition: this.partition,
94
- artifactPrefix: this.artifactPrefix,
95
- journal: this.journal,
96
- });
97
- if (this.recovery.status === "ready") {
98
- const prepared = prepareProjectionSlots(this.registrations.values(), this.journal);
99
- projectionStatus.push(...prepared.status);
100
- if (prepared.recovery)
101
- this.enterRecovery(prepared.recovery);
102
- }
103
- }
104
- catch (error) {
105
- this.enterRecovery(recoveryFrom(error, `${this.partition} journal could not be prepared`));
106
- }
107
- const partitionFingerprint = this.observeFingerprint(this.partitionDir, "journal partition");
108
- const operationsFingerprint = this.observeFingerprint(this.operationsDir, "journal recovery operations");
109
- const preparedFingerprint = preparationFingerprint(this.journal?.preparation().preparationIdentity ?? partitionFingerprint.preparationIdentity, this.preparedOperation?.fingerprint ?? operationsFingerprint.preparationIdentity);
110
- const inspection = this.inspection(partitionFingerprint.fingerprint);
111
- this.preparationResult = {
112
- partition: this.partition,
113
- coverage: "complete",
114
- inspection,
115
- validation: { ...inspection, projectionStatus },
116
- preparationFingerprint: preparedFingerprint,
117
- virtual: this.journal?.preparation().virtual ?? !partitionFingerprint.exists,
118
- };
119
- if (this.recovery.status === "ready")
120
- this.lifecycle = "prepared";
121
- else
122
- this.enterRecovery(this.recovery);
123
- return structuredClone(this.preparationResult);
124
- }
125
- revalidatePreparation() {
126
- this.assertStarted();
127
- if (this.lifecycle === "recovery_required") {
128
- throw new JournalRecoveryRequiredError(this.recovery);
129
- }
130
- if (this.lifecycle !== "prepared")
131
- throw new Error("journal manager is not prepared");
132
- if (!this.preparationResult || !this.journal)
133
- throw new Error("journal is not prepared");
134
- try {
135
- this.preparedOperation = revalidatePreparedState({
136
- rootDir: this.rootDir,
137
- operationsDir: this.operationsDir,
138
- quarantineDir: this.quarantineDir,
139
- partitionDir: this.partitionDir,
140
- partition: this.partition,
141
- artifactPrefix: this.artifactPrefix,
142
- journal: this.journal,
143
- expectedFingerprint: this.preparationResult.preparationFingerprint,
144
- });
145
- }
146
- catch (error) {
147
- const recovery = recoveryFrom(error, `${this.partition} preparation revalidation failed`);
148
- this.enterRecovery(recovery);
149
- throw new JournalRecoveryRequiredError(recovery);
150
- }
151
- }
152
- activatePrepared() {
153
- this.assertStarted();
154
- if (this.lifecycle === "active")
155
- return;
156
- if (this.lifecycle === "recovery_required") {
157
- throw new JournalRecoveryRequiredError(this.recovery);
158
- }
159
- if (this.lifecycle !== "prepared")
160
- throw new Error("journal manager is not prepared");
161
- if (!this.preparationResult || !this.journal)
162
- throw new Error("journal is not prepared");
163
- try {
164
- this.revalidatePreparation();
165
- this.journal.activatePrepared();
166
- if (!this.preparedOperation)
167
- throw new Error("journal recovery operation is not prepared");
168
- applyPreparedOperation({
169
- rootDir: this.rootDir,
170
- plan: this.preparedOperation,
171
- journal: this.journal,
172
- partition: this.partition,
173
- artifactPrefix: this.artifactPrefix,
174
- now: this.now,
175
- afterReceipt: this.faults.afterQuarantineReceipt,
176
- });
177
- const activatedRecovery = this.journal.state();
178
- if (activatedRecovery.status === "recovery_required") {
179
- throw new JournalRecoveryRequiredError(activatedRecovery);
180
- }
181
- for (const registration of this.registrations.values()) {
182
- this.faults.beforeProjectionActivation?.();
183
- registration.slot.activate(this.generationValue);
184
- }
185
- this.recovery = activatedRecovery;
186
- this.lifecycle = "active";
187
- }
188
- catch (error) {
189
- const recovery = recoveryFrom(error, `${this.partition} prepared activation failed`);
190
- this.journal?.close();
191
- this.journal = null;
192
- this.enterRecovery(recovery);
193
- throw new JournalRecoveryRequiredError(recovery);
194
- }
195
- }
196
- recoverAfterStartup() {
197
- this.assertStarted();
198
- if (this.lifecycle !== "active")
199
- throw new Error("journal manager is not active");
200
- try {
201
- for (const registration of this.registrations.values()) {
202
- registration.descriptor.recover?.(registration.slot.current());
203
- }
204
- if (this.journal)
205
- this.options.requestMaintenance?.(this.journal);
206
- }
207
- catch (error) {
208
- const recovery = recoveryFrom(error, `${this.partition} projection recovery failed`);
209
- this.enterRecovery(recovery);
210
- throw new JournalRecoveryRequiredError(recovery);
211
- }
212
- }
213
- inspect() {
214
- this.assertStarted();
215
- if (this.journal && this.recovery.status === "ready") {
216
- const state = this.journal.state();
217
- if (state.status === "recovery_required")
218
- this.enterRecovery(state);
219
- }
220
- return this.inspection(this.observeFingerprint(this.partitionDir, "journal partition").fingerprint);
221
- }
222
- ready() {
223
- this.assertStarted();
224
- if (this.journal && this.recovery.status === "ready") {
225
- const state = this.journal.state();
226
- if (state.status === "recovery_required")
227
- this.enterRecovery(state);
228
- }
229
- return this.lifecycle === "active" && this.recovery.status === "ready";
230
- }
231
- validate() {
232
- this.assertStarted();
233
- if (this.lifecycle === "prepared") {
234
- try {
235
- this.revalidatePreparation();
236
- }
237
- catch { }
238
- }
239
- const before = this.observeFingerprint(this.partitionDir, "journal validation input");
240
- const projectionStatus = [];
241
- for (const registration of this.registrations.values()) {
242
- try {
243
- const projection = registration.slot.prepared();
244
- registration.descriptor.validate(projection);
245
- projectionStatus.push({
246
- name: registration.descriptor.name,
247
- status: "valid",
248
- detail: null,
249
- });
250
- }
251
- catch (error) {
252
- this.enterRecovery(recoveryFrom(error, `projection '${registration.descriptor.name}' failed`));
253
- projectionStatus.push({
254
- name: registration.descriptor.name,
255
- status: "invalid",
256
- detail: safeMessage(error),
257
- });
258
- }
259
- }
260
- const after = this.observeFingerprint(this.partitionDir, "journal validation input");
261
- if (before.fingerprint !== after.fingerprint) {
262
- this.enterRecovery(recoveryAt(0, "journal changed during validation"));
263
- }
264
- return { ...this.inspection(after.fingerprint), projectionStatus };
265
- }
266
- events(afterCursor) {
267
- this.assertStarted();
268
- return journalEvents(this.journal, this.recovery, afterCursor);
269
- }
270
- exportRecovery() {
271
- this.assertStarted();
272
- return exportJournalRecovery({
273
- rootDir: this.rootDir,
274
- partitionDir: this.partitionDir,
275
- partition: this.partition,
276
- recovery: this.recovery,
277
- now: this.now,
278
- });
279
- }
280
- preflightQuarantine(input) {
281
- this.assertStarted();
282
- validateRequest(input);
283
- const keyDigest = sha256(Buffer.from(input.idempotencyKey));
284
- const path = join(this.operationsDir, `${keyDigest}.json`);
285
- const existing = readOperation(path, this.quarantineDir, this.partition, this.artifactPrefix);
286
- const requestDigest = quarantineRequestDigest(this.partition, input);
287
- if (existing) {
288
- if (existing.requestDigest !== requestDigest)
289
- throw conflict("idempotency_conflict");
290
- if (existing.status === "completed") {
291
- return {
292
- disposition: "completed",
293
- receipt: matchingReceipt(existing, undefined, this.partition, this.artifactPrefix),
294
- };
295
- }
296
- return { disposition: "prepared", receipt: null };
297
- }
298
- if (this.recovery.status !== "recovery_required") {
299
- throw typedError("journal_partition_ready", 409, "only a corrupt partition can be quarantined");
300
- }
301
- if (this.stableFingerprint(this.partitionDir, "journal recovery source").fingerprint !==
302
- input.expectedFingerprint) {
303
- throw conflict("recovery_fingerprint_mismatch");
304
- }
305
- return { disposition: "new", receipt: null };
306
- }
307
- quarantineAndStartFresh(input) {
308
- const preflight = this.preflightQuarantine(input);
309
- if (preflight.disposition === "completed")
310
- return preflight.receipt;
311
- ensureCanonicalPrivateDirectory(dirname(this.operationsDir));
312
- ensureCanonicalPrivateDirectory(this.operationsDir);
313
- ensureCanonicalPrivateDirectory(this.quarantineDir);
314
- const keyDigest = sha256(Buffer.from(input.idempotencyKey));
315
- const operationPath = join(this.operationsDir, `${keyDigest}.json`);
316
- let operation = readOperation(operationPath, this.quarantineDir, this.partition, this.artifactPrefix);
317
- if (!operation) {
318
- const operationId = randomUUID();
319
- operation = {
320
- schemaVersion: 1,
321
- operationId,
322
- keyDigest,
323
- requestDigest: quarantineRequestDigest(this.partition, input),
324
- expectedFingerprint: input.expectedFingerprint,
325
- quarantinePath: join(this.quarantineDir, `${this.artifactPrefix}-${operationId}`),
326
- status: "prepared",
327
- receipt: null,
328
- };
329
- writeAtomicPrivateJson(operationPath, operation, true);
330
- }
331
- return this.resume(operation, operationPath);
332
- }
333
- close() {
334
- if (this.lifecycle === "closed")
335
- return;
336
- this.lifecycle = "closed";
337
- this.clearSlots();
338
- this.journal?.close();
339
- this.journal = null;
340
- }
341
- /**
342
- * Close the partition's generation and rename it into journal-archived/, never
343
- * delete history. Missing source returns an existing archive path or null;
344
- * a pre-existing archive for a re-registered id is preserved under a suffix.
345
- */
346
- archivePartition() {
347
- const archiveDir = join(this.rootDir, "journal-archived");
348
- const target = join(archiveDir, this.artifactPrefix);
349
- if (!existsSync(this.partitionDir)) {
350
- // Nothing to move: close permanently and return the idempotent answer.
351
- this.close();
352
- return existsSync(target) ? target : null;
353
- }
354
- ensureCanonicalPrivateDirectory(archiveDir);
355
- const dest = existsSync(target)
356
- ? join(archiveDir, `${this.artifactPrefix}-${randomUUID()}`)
357
- : target;
358
- // Revoke this generation before the move, but close the manager permanently
359
- // only after rename succeeds; failure reopens a fresh usable generation.
360
- this.clearSlots();
361
- this.journal?.close();
362
- this.journal = null;
363
- try {
364
- this.faults.beforeArchiveRename?.();
365
- renameSync(this.partitionDir, dest);
366
- }
367
- catch (error) {
368
- this.openGeneration();
369
- throw error;
370
- }
371
- this.lifecycle = "closed";
372
- fsyncDirectory(this.journalRoot);
373
- fsyncDirectory(archiveDir);
374
- return dest;
375
- }
376
- /**
377
- * Roll a just-archived partition back into the active journal tree — the
378
- * removeProject rollback when the durable registry `unregister` fails AFTER a
379
- * successful archive (Ф2 finding 4). Moves `archivedPath` back to
380
- * `partitionDir` and reopens a fresh generation so the partition is usable
381
- * again. Throws (leaving the archive in place) when the active slot is already
382
- * occupied, so the caller can disclose the unrecoverable partial state.
383
- */
384
- restoreArchivedPartition(archivedPath) {
385
- if (existsSync(this.partitionDir)) {
386
- throw new Error(`cannot restore archived partition: ${this.partitionDir} already exists in the active tree`);
387
- }
388
- if (!existsSync(archivedPath)) {
389
- throw new Error(`cannot restore archived partition: ${archivedPath} is missing`);
390
- }
391
- renameSync(archivedPath, this.partitionDir);
392
- fsyncDirectory(this.journalRoot);
393
- this.lifecycle = "idle";
394
- this.openGeneration();
395
- }
396
- openGeneration() {
397
- this.assertOpen();
398
- this.journal?.close();
399
- this.journal = null;
400
- this.clearSlots();
401
- this.generationValue += 1;
402
- try {
403
- this.journal = new DurableJournal(this.journalOptions);
404
- this.recovery = this.journal.state();
405
- if (this.recovery.status === "recovery_required") {
406
- this.enterRecovery(this.recovery);
407
- return;
408
- }
409
- for (const registration of this.registrations.values()) {
410
- const projection = registration.descriptor.create(this.journal);
411
- registration.descriptor.validate(projection);
412
- registration.slot.bind(projection, this.generationValue);
413
- }
414
- this.lifecycle = "active";
415
- this.recoverAfterStartup();
416
- }
417
- catch (error) {
418
- const failed = this.journal;
419
- this.journal = null;
420
- try {
421
- failed?.close();
422
- }
423
- catch {
424
- /* preserve the projection/open failure */
425
- }
426
- this.enterRecovery(recoveryFrom(error, `${this.partition} journal could not be opened`));
427
- }
428
- if (this.recovery.status === "recovery_required")
429
- this.clearSlots();
430
- }
431
- resume(operation, operationPath) {
432
- const source = this.stableFingerprint(this.partitionDir, "journal recovery source");
433
- const target = this.stableFingerprint(operation.quarantinePath, "journal quarantine target");
434
- const sourceExists = source.exists;
435
- const targetExists = target.exists;
436
- if (sourceExists && targetExists)
437
- return this.completeFromReceipt(operation, operationPath);
438
- if (sourceExists) {
439
- if (source.fingerprint !== operation.expectedFingerprint) {
440
- throw conflict("recovery_fingerprint_mismatch");
441
- }
442
- this.clearSlots();
443
- this.journal?.close();
444
- this.journal = null;
445
- renameSync(this.partitionDir, operation.quarantinePath);
446
- fsyncDirectory(this.journalRoot);
447
- fsyncDirectory(dirname(operation.quarantinePath));
448
- if (this.stableFingerprint(operation.quarantinePath, "journal quarantine target")
449
- .fingerprint !== operation.expectedFingerprint) {
450
- throw typedError("recovery_quarantine_mismatch", 503, "quarantined bytes changed");
451
- }
452
- this.faults.afterQuarantineRename?.();
453
- }
454
- else if (!targetExists) {
455
- throw typedError("recovery_operation_missing", 503, "recovery source and target are missing");
456
- }
457
- else if (target.fingerprint !== operation.expectedFingerprint) {
458
- throw typedError("recovery_quarantine_mismatch", 503, "quarantined bytes changed");
459
- }
460
- this.openGeneration();
461
- if (!this.journal || this.recovery.status === "recovery_required") {
462
- throw new JournalRecoveryRequiredError(this.recovery.status === "recovery_required"
463
- ? this.recovery
464
- : recoveryAt(0, "fresh journal failed to initialize"));
465
- }
466
- if (this.journal.records().length !== 0) {
467
- throw typedError("recovery_operation_ambiguous", 503, "fresh journal is not empty");
468
- }
469
- const receipt = {
470
- schemaVersion: 1,
471
- operationId: operation.operationId,
472
- partition: this.partition,
473
- previousFingerprint: operation.expectedFingerprint,
474
- quarantineArtifactId: `${this.artifactPrefix}-${operation.operationId}`,
475
- quarantinePath: operation.quarantinePath,
476
- newEpoch: this.journal.currentEpoch(),
477
- completedAt: this.now().toISOString(),
478
- };
479
- this.journal.append("journal.partition_quarantined", receipt);
480
- this.faults.afterQuarantineReceipt?.();
481
- writeAtomicPrivateJson(operationPath, { ...operation, status: "completed", receipt }, false);
482
- return receipt;
483
- }
484
- completeFromReceipt(operation, operationPath) {
485
- if (!this.journal)
486
- this.openGeneration();
487
- if (!this.journal || this.recovery.status === "recovery_required") {
488
- throw typedError("recovery_operation_ambiguous", 503, "fresh journal is unreadable");
489
- }
490
- return completePreparedReceipt({
491
- rootDir: this.rootDir,
492
- operation,
493
- operationPath,
494
- journal: this.journal,
495
- partition: this.partition,
496
- artifactPrefix: this.artifactPrefix,
497
- });
498
- }
499
- reconcilePrepared() {
500
- return reconcilePreparedOperationOnStart({
501
- operationsDir: this.operationsDir,
502
- quarantineDir: this.quarantineDir,
503
- partitionDir: this.partitionDir,
504
- partition: this.partition,
505
- artifactPrefix: this.artifactPrefix,
506
- openGeneration: () => this.openGeneration(),
507
- resume: (operation, path) => void this.resume(operation, path),
508
- failed: (error) => this.enterRecovery(recoveryFrom(error, "prepared quarantine reconciliation failed")),
509
- });
510
- }
511
- inspection(fingerprint) {
512
- return {
513
- schemaVersion: 1,
514
- partition: this.partition,
515
- generation: this.generationValue,
516
- status: this.recovery.status,
517
- recovery: cloneRecovery(this.recovery),
518
- fingerprint,
519
- observedAt: this.now().toISOString(),
520
- evidenceRefs: [`recovery:${this.partition}:${fingerprint}`],
521
- };
522
- }
523
- enterRecovery(state) {
524
- const closeWriter = this.lifecycle === "active";
525
- this.recovery = cloneRecovery(state);
526
- this.lifecycle = "recovery_required";
527
- this.clearSlots();
528
- if (closeWriter) {
529
- this.journal?.close();
530
- this.journal = null;
531
- }
532
- }
533
- observeFingerprint(path, context) {
534
- const observed = fingerprintPartition(path, this.rootDir);
535
- if (observed.problem)
536
- this.enterRecovery(recoveryAt(0, `${context}: ${observed.problem}`));
537
- return observed;
538
- }
539
- stableFingerprint(path, context) {
540
- const observed = this.observeFingerprint(path, context);
541
- if (observed.problem)
542
- throw new JournalRecoveryRequiredError(this.recovery);
543
- return observed;
544
- }
545
- clearSlots() {
546
- for (const registration of this.registrations.values())
547
- registration.slot.clear();
548
- }
549
- assertStarted() {
550
- this.assertOpen();
551
- if (this.lifecycle === "idle")
552
- throw new Error("journal manager is not running");
553
- }
554
- assertOpen() {
555
- if (this.lifecycle === "closed")
556
- throw new Error("journal manager is closed");
557
- }
558
- }
559
- //# sourceMappingURL=journal-manager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"journal-manager.js","sourceRoot":"","sources":["../src/journal-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,yBAAyB,GAG1B,MAAM,oBAAoB,CAAC;AAO5B,OAAO,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,WAAW,EACX,MAAM,EACN,sBAAsB,GAEvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,QAAQ,EACR,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,eAAe,GAGhB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,M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AAC,OAAO,EAAE,KAAK,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACtB,CAAC;IACH,CAAC;IAEO,kBAAkB,CAAC,IAAY,EAAE,OAAe;QACtD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1D,IAAI,QAAQ,CAAC,OAAO;YAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,OAAO,KAAK,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAC3F,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEO,iBAAiB,CAAC,IAAY,EAAE,OAAe;QACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACxD,IAAI,QAAQ,CAAC,OAAO;YAAE,MAAM,IAAI,4BAA4B,CAAC,IAAI,CAAC,QAAiB,CAAC,CAAC;QACrF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEO,UAAU;QAChB,KAAK,MAAM,YAAY,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE;YAAE,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACpF,CAAC;IAEO,aAAa;QACnB,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,SAAS,KAAK,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACnF,CAAC;IAEO,UAAU;QAChB,IAAI,IAAI,CAAC,SAAS,KAAK,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAChF,CAAC;CACF"}
@@ -1,53 +0,0 @@
1
- import type { DurableJournal } from "@claudexor/journal";
2
- import type { ControlJournalQuarantineReceipt } from "@claudexor/schema";
3
- import { type QuarantineOperation } from "./journal-recovery-operation.js";
4
- export type PreparedOperationPlan = {
5
- kind: "none";
6
- fingerprint: string;
7
- } | {
8
- kind: "source_intact" | "resume_after_activation" | "complete_after_activation";
9
- fingerprint: string;
10
- path: string;
11
- operation: QuarantineOperation;
12
- };
13
- export declare function inspectPreparedOperation(input: {
14
- rootDir: string;
15
- operationsDir: string;
16
- quarantineDir: string;
17
- partitionDir: string;
18
- partition: string;
19
- artifactPrefix: string;
20
- journal: DurableJournal | null;
21
- }): PreparedOperationPlan;
22
- export declare function preparationFingerprint(journalFingerprint: string, operationFingerprint: string): string;
23
- export declare function revalidatePreparedState(input: Parameters<typeof inspectPreparedOperation>[0] & {
24
- expectedFingerprint: string;
25
- }): PreparedOperationPlan;
26
- export declare function applyPreparedOperation(input: {
27
- rootDir: string;
28
- plan: PreparedOperationPlan;
29
- journal: DurableJournal;
30
- partition: string;
31
- artifactPrefix: string;
32
- now: () => Date;
33
- afterReceipt?: () => void;
34
- }): void;
35
- export declare function completePreparedReceipt(input: {
36
- rootDir: string;
37
- operation: QuarantineOperation;
38
- operationPath: string;
39
- journal: DurableJournal;
40
- partition: string;
41
- artifactPrefix: string;
42
- }): ControlJournalQuarantineReceipt;
43
- export declare function reconcilePreparedOperationOnStart(input: {
44
- operationsDir: string;
45
- quarantineDir: string;
46
- partitionDir: string;
47
- partition: string;
48
- artifactPrefix: string;
49
- openGeneration(): void;
50
- resume(operation: QuarantineOperation, path: string): void;
51
- failed(error: unknown): void;
52
- }): boolean;
53
- //# sourceMappingURL=journal-prepared-operation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"journal-prepared-operation.d.ts","sourceRoot":"","sources":["../src/journal-prepared-operation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AAOzE,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IA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