@powerhousedao/reactor 4.1.0-dev.12 → 4.1.0-dev.121

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 (366) hide show
  1. package/dist/src/cache/buffer/ring-buffer.d.ts +37 -0
  2. package/dist/src/cache/buffer/ring-buffer.d.ts.map +1 -0
  3. package/dist/src/cache/buffer/ring-buffer.js +69 -0
  4. package/dist/src/cache/buffer/ring-buffer.js.map +1 -0
  5. package/dist/src/cache/index.d.ts +3 -0
  6. package/dist/src/cache/index.d.ts.map +1 -0
  7. package/dist/src/cache/index.js +2 -0
  8. package/dist/src/cache/index.js.map +1 -0
  9. package/dist/src/cache/kysely-operation-index.d.ts +13 -0
  10. package/dist/src/cache/kysely-operation-index.d.ts.map +1 -0
  11. package/dist/src/cache/kysely-operation-index.js +207 -0
  12. package/dist/src/cache/kysely-operation-index.js.map +1 -0
  13. package/dist/src/cache/kysely-write-cache.d.ts +134 -0
  14. package/dist/src/cache/kysely-write-cache.d.ts.map +1 -0
  15. package/dist/src/cache/kysely-write-cache.js +375 -0
  16. package/dist/src/cache/kysely-write-cache.js.map +1 -0
  17. package/dist/src/cache/lru/lru-tracker.d.ts +15 -0
  18. package/dist/src/cache/lru/lru-tracker.d.ts.map +1 -0
  19. package/dist/src/cache/lru/lru-tracker.js +96 -0
  20. package/dist/src/cache/lru/lru-tracker.js.map +1 -0
  21. package/dist/src/cache/operation-index-types.d.ts +49 -0
  22. package/dist/src/cache/operation-index-types.d.ts.map +1 -0
  23. package/dist/src/cache/operation-index-types.js +4 -0
  24. package/dist/src/cache/operation-index-types.js.map +1 -0
  25. package/dist/src/cache/write/interfaces.d.ts +83 -0
  26. package/dist/src/cache/write/interfaces.d.ts.map +1 -0
  27. package/dist/src/cache/write/interfaces.js +2 -0
  28. package/dist/src/cache/write/interfaces.js.map +1 -0
  29. package/dist/src/cache/write-cache-types.d.ts +42 -0
  30. package/dist/src/cache/write-cache-types.d.ts.map +1 -0
  31. package/dist/src/cache/write-cache-types.js +2 -0
  32. package/dist/src/cache/write-cache-types.js.map +1 -0
  33. package/dist/src/client/reactor-client.d.ts +103 -0
  34. package/dist/src/client/reactor-client.d.ts.map +1 -0
  35. package/dist/src/client/reactor-client.js +184 -0
  36. package/dist/src/client/reactor-client.js.map +1 -0
  37. package/dist/src/client/types.d.ts +213 -0
  38. package/dist/src/client/types.d.ts.map +1 -0
  39. package/dist/src/client/types.js +14 -0
  40. package/dist/src/client/types.js.map +1 -0
  41. package/dist/src/core/builder.d.ts +20 -0
  42. package/dist/src/core/builder.d.ts.map +1 -0
  43. package/dist/src/core/builder.js +47 -0
  44. package/dist/src/core/builder.js.map +1 -0
  45. package/dist/src/core/reactor-builder.d.ts +37 -0
  46. package/dist/src/core/reactor-builder.d.ts.map +1 -0
  47. package/dist/src/core/reactor-builder.js +138 -0
  48. package/dist/src/core/reactor-builder.js.map +1 -0
  49. package/dist/src/core/reactor.d.ts +111 -0
  50. package/dist/src/core/reactor.d.ts.map +1 -0
  51. package/dist/src/core/reactor.js +952 -0
  52. package/dist/src/core/reactor.js.map +1 -0
  53. package/dist/src/core/types.d.ts +183 -0
  54. package/dist/src/core/types.d.ts.map +1 -0
  55. package/dist/src/core/types.js +2 -0
  56. package/dist/src/core/types.js.map +1 -0
  57. package/dist/src/core/utils.d.ts +51 -0
  58. package/dist/src/core/utils.d.ts.map +1 -0
  59. package/dist/src/core/utils.js +141 -0
  60. package/dist/src/core/utils.js.map +1 -0
  61. package/dist/src/events/event-bus.d.ts +3 -3
  62. package/dist/src/events/event-bus.d.ts.map +1 -1
  63. package/dist/src/events/event-bus.js.map +1 -1
  64. package/dist/src/events/interfaces.d.ts +1 -1
  65. package/dist/src/events/interfaces.d.ts.map +1 -1
  66. package/dist/src/events/types.d.ts +31 -1
  67. package/dist/src/events/types.d.ts.map +1 -1
  68. package/dist/src/events/types.js +7 -0
  69. package/dist/src/events/types.js.map +1 -1
  70. package/dist/src/executor/interfaces.d.ts +31 -54
  71. package/dist/src/executor/interfaces.d.ts.map +1 -1
  72. package/dist/src/executor/simple-job-executor-manager.d.ts +32 -0
  73. package/dist/src/executor/simple-job-executor-manager.d.ts.map +1 -0
  74. package/dist/src/executor/simple-job-executor-manager.js +214 -0
  75. package/dist/src/executor/simple-job-executor-manager.js.map +1 -0
  76. package/dist/src/executor/simple-job-executor.d.ts +62 -0
  77. package/dist/src/executor/simple-job-executor.d.ts.map +1 -0
  78. package/dist/src/executor/simple-job-executor.js +705 -0
  79. package/dist/src/executor/simple-job-executor.js.map +1 -0
  80. package/dist/src/executor/types.d.ts +32 -8
  81. package/dist/src/executor/types.d.ts.map +1 -1
  82. package/dist/src/executor/types.js.map +1 -1
  83. package/dist/src/executor/util.d.ts +65 -0
  84. package/dist/src/executor/util.d.ts.map +1 -0
  85. package/dist/src/executor/util.js +154 -0
  86. package/dist/src/executor/util.js.map +1 -0
  87. package/dist/src/index.d.ts +35 -3
  88. package/dist/src/index.d.ts.map +1 -1
  89. package/dist/src/index.js +43 -2
  90. package/dist/src/index.js.map +1 -1
  91. package/dist/src/job-tracker/in-memory-job-tracker.d.ts +16 -0
  92. package/dist/src/job-tracker/in-memory-job-tracker.d.ts.map +1 -0
  93. package/dist/src/job-tracker/in-memory-job-tracker.js +84 -0
  94. package/dist/src/job-tracker/in-memory-job-tracker.js.map +1 -0
  95. package/dist/src/job-tracker/index.d.ts +3 -0
  96. package/dist/src/job-tracker/index.d.ts.map +1 -0
  97. package/dist/src/job-tracker/index.js +2 -0
  98. package/dist/src/job-tracker/index.js.map +1 -0
  99. package/dist/src/job-tracker/interfaces.d.ts +42 -0
  100. package/dist/src/job-tracker/interfaces.d.ts.map +1 -0
  101. package/dist/src/job-tracker/interfaces.js +2 -0
  102. package/dist/src/job-tracker/interfaces.js.map +1 -0
  103. package/dist/src/queue/interfaces.d.ts +46 -5
  104. package/dist/src/queue/interfaces.d.ts.map +1 -1
  105. package/dist/src/queue/job-execution-handle.d.ts +25 -0
  106. package/dist/src/queue/job-execution-handle.d.ts.map +1 -0
  107. package/dist/src/queue/job-execution-handle.js +62 -0
  108. package/dist/src/queue/job-execution-handle.js.map +1 -0
  109. package/dist/src/queue/queue.d.ts +56 -5
  110. package/dist/src/queue/queue.d.ts.map +1 -1
  111. package/dist/src/queue/queue.js +284 -36
  112. package/dist/src/queue/queue.js.map +1 -1
  113. package/dist/src/queue/types.d.ts +38 -5
  114. package/dist/src/queue/types.d.ts.map +1 -1
  115. package/dist/src/queue/types.js +12 -0
  116. package/dist/src/queue/types.js.map +1 -1
  117. package/dist/src/read-models/coordinator.d.ts +38 -0
  118. package/dist/src/read-models/coordinator.d.ts.map +1 -0
  119. package/dist/src/read-models/coordinator.js +72 -0
  120. package/dist/src/read-models/coordinator.js.map +1 -0
  121. package/dist/src/read-models/document-view.d.ts +24 -0
  122. package/dist/src/read-models/document-view.d.ts.map +1 -0
  123. package/dist/src/read-models/document-view.js +368 -0
  124. package/dist/src/read-models/document-view.js.map +1 -0
  125. package/dist/src/read-models/interfaces.d.ts +29 -0
  126. package/dist/src/read-models/interfaces.d.ts.map +1 -0
  127. package/dist/src/read-models/interfaces.js +2 -0
  128. package/dist/src/read-models/interfaces.js.map +1 -0
  129. package/dist/src/read-models/types.d.ts +46 -0
  130. package/dist/src/read-models/types.d.ts.map +1 -0
  131. package/dist/src/read-models/types.js +2 -0
  132. package/dist/src/read-models/types.js.map +1 -0
  133. package/dist/src/registry/implementation.d.ts +62 -0
  134. package/dist/src/registry/implementation.d.ts.map +1 -0
  135. package/dist/src/registry/implementation.js +96 -0
  136. package/dist/src/registry/implementation.js.map +1 -0
  137. package/dist/src/registry/index.d.ts +3 -0
  138. package/dist/src/registry/index.d.ts.map +1 -0
  139. package/dist/src/registry/index.js +2 -0
  140. package/dist/src/registry/index.js.map +1 -0
  141. package/dist/src/registry/interfaces.d.ts +39 -0
  142. package/dist/src/registry/interfaces.d.ts.map +1 -0
  143. package/dist/src/registry/interfaces.js +2 -0
  144. package/dist/src/registry/interfaces.js.map +1 -0
  145. package/dist/src/shared/awaiter.d.ts +32 -0
  146. package/dist/src/shared/awaiter.d.ts.map +1 -0
  147. package/dist/src/shared/awaiter.js +132 -0
  148. package/dist/src/shared/awaiter.js.map +1 -0
  149. package/dist/src/shared/consistency-tracker.d.ts +48 -0
  150. package/dist/src/shared/consistency-tracker.d.ts.map +1 -0
  151. package/dist/src/shared/consistency-tracker.js +123 -0
  152. package/dist/src/shared/consistency-tracker.js.map +1 -0
  153. package/dist/src/shared/errors.d.ts +17 -0
  154. package/dist/src/shared/errors.d.ts.map +1 -0
  155. package/dist/src/shared/errors.js +33 -0
  156. package/dist/src/shared/errors.js.map +1 -0
  157. package/dist/src/shared/factories.d.ts +16 -0
  158. package/dist/src/shared/factories.d.ts.map +1 -0
  159. package/dist/src/shared/factories.js +33 -0
  160. package/dist/src/shared/factories.js.map +1 -0
  161. package/dist/src/shared/types.d.ts +126 -20
  162. package/dist/src/shared/types.d.ts.map +1 -1
  163. package/dist/src/shared/types.js +35 -1
  164. package/dist/src/shared/types.js.map +1 -1
  165. package/dist/src/shared/utils.d.ts +3 -0
  166. package/dist/src/shared/utils.d.ts.map +1 -0
  167. package/dist/src/shared/utils.js +8 -0
  168. package/dist/src/shared/utils.js.map +1 -0
  169. package/dist/src/signer/passthrough-signer.d.ts +6 -0
  170. package/dist/src/signer/passthrough-signer.d.ts.map +1 -0
  171. package/dist/src/signer/passthrough-signer.js +6 -0
  172. package/dist/src/signer/passthrough-signer.js.map +1 -0
  173. package/dist/src/signer/types.d.ts +15 -0
  174. package/dist/src/signer/types.d.ts.map +1 -0
  175. package/dist/src/signer/types.js +2 -0
  176. package/dist/src/signer/types.js.map +1 -0
  177. package/dist/src/storage/index.d.ts +4 -0
  178. package/dist/src/storage/index.d.ts.map +1 -0
  179. package/dist/src/storage/index.js +3 -0
  180. package/dist/src/storage/index.js.map +1 -0
  181. package/dist/src/storage/interfaces.d.ts +335 -0
  182. package/dist/src/storage/interfaces.d.ts.map +1 -0
  183. package/dist/src/storage/interfaces.js +19 -0
  184. package/dist/src/storage/interfaces.js.map +1 -0
  185. package/dist/src/storage/kysely/document-indexer.d.ts +28 -0
  186. package/dist/src/storage/kysely/document-indexer.d.ts.map +1 -0
  187. package/dist/src/storage/kysely/document-indexer.js +350 -0
  188. package/dist/src/storage/kysely/document-indexer.js.map +1 -0
  189. package/dist/src/storage/kysely/keyframe-store.d.ts +15 -0
  190. package/dist/src/storage/kysely/keyframe-store.d.ts.map +1 -0
  191. package/dist/src/storage/kysely/keyframe-store.js +64 -0
  192. package/dist/src/storage/kysely/keyframe-store.js.map +1 -0
  193. package/dist/src/storage/kysely/store.d.ts +15 -0
  194. package/dist/src/storage/kysely/store.d.ts.map +1 -0
  195. package/dist/src/storage/kysely/store.js +196 -0
  196. package/dist/src/storage/kysely/store.js.map +1 -0
  197. package/dist/src/storage/kysely/sync-cursor-storage.d.ts +13 -0
  198. package/dist/src/storage/kysely/sync-cursor-storage.d.ts.map +1 -0
  199. package/dist/src/storage/kysely/sync-cursor-storage.js +93 -0
  200. package/dist/src/storage/kysely/sync-cursor-storage.js.map +1 -0
  201. package/dist/src/storage/kysely/sync-remote-storage.d.ts +13 -0
  202. package/dist/src/storage/kysely/sync-remote-storage.d.ts.map +1 -0
  203. package/dist/src/storage/kysely/sync-remote-storage.js +134 -0
  204. package/dist/src/storage/kysely/sync-remote-storage.js.map +1 -0
  205. package/dist/src/storage/kysely/types.d.ts +135 -0
  206. package/dist/src/storage/kysely/types.d.ts.map +1 -0
  207. package/dist/src/storage/kysely/types.js +2 -0
  208. package/dist/src/storage/kysely/types.js.map +1 -0
  209. package/dist/src/storage/migrations/001_create_operation_table.d.ts +3 -0
  210. package/dist/src/storage/migrations/001_create_operation_table.d.ts.map +1 -0
  211. package/dist/src/storage/migrations/001_create_operation_table.js +40 -0
  212. package/dist/src/storage/migrations/001_create_operation_table.js.map +1 -0
  213. package/dist/src/storage/migrations/002_create_keyframe_table.d.ts +3 -0
  214. package/dist/src/storage/migrations/002_create_keyframe_table.d.ts.map +1 -0
  215. package/dist/src/storage/migrations/002_create_keyframe_table.js +27 -0
  216. package/dist/src/storage/migrations/002_create_keyframe_table.js.map +1 -0
  217. package/dist/src/storage/migrations/003_create_document_table.d.ts +3 -0
  218. package/dist/src/storage/migrations/003_create_document_table.d.ts.map +1 -0
  219. package/dist/src/storage/migrations/003_create_document_table.js +10 -0
  220. package/dist/src/storage/migrations/003_create_document_table.js.map +1 -0
  221. package/dist/src/storage/migrations/004_create_document_relationship_table.d.ts +3 -0
  222. package/dist/src/storage/migrations/004_create_document_relationship_table.d.ts.map +1 -0
  223. package/dist/src/storage/migrations/004_create_document_relationship_table.js +35 -0
  224. package/dist/src/storage/migrations/004_create_document_relationship_table.js.map +1 -0
  225. package/dist/src/storage/migrations/005_create_indexer_state_table.d.ts +3 -0
  226. package/dist/src/storage/migrations/005_create_indexer_state_table.d.ts.map +1 -0
  227. package/dist/src/storage/migrations/005_create_indexer_state_table.js +10 -0
  228. package/dist/src/storage/migrations/005_create_indexer_state_table.js.map +1 -0
  229. package/dist/src/storage/migrations/006_create_document_snapshot_table.d.ts +3 -0
  230. package/dist/src/storage/migrations/006_create_document_snapshot_table.d.ts.map +1 -0
  231. package/dist/src/storage/migrations/006_create_document_snapshot_table.js +49 -0
  232. package/dist/src/storage/migrations/006_create_document_snapshot_table.js.map +1 -0
  233. package/dist/src/storage/migrations/007_create_slug_mapping_table.d.ts +3 -0
  234. package/dist/src/storage/migrations/007_create_slug_mapping_table.d.ts.map +1 -0
  235. package/dist/src/storage/migrations/007_create_slug_mapping_table.js +24 -0
  236. package/dist/src/storage/migrations/007_create_slug_mapping_table.js.map +1 -0
  237. package/dist/src/storage/migrations/008_create_view_state_table.d.ts +3 -0
  238. package/dist/src/storage/migrations/008_create_view_state_table.d.ts.map +1 -0
  239. package/dist/src/storage/migrations/008_create_view_state_table.js +9 -0
  240. package/dist/src/storage/migrations/008_create_view_state_table.js.map +1 -0
  241. package/dist/src/storage/migrations/009_create_operation_index_tables.d.ts +3 -0
  242. package/dist/src/storage/migrations/009_create_operation_index_tables.d.ts.map +1 -0
  243. package/dist/src/storage/migrations/009_create_operation_index_tables.js +50 -0
  244. package/dist/src/storage/migrations/009_create_operation_index_tables.js.map +1 -0
  245. package/dist/src/storage/migrations/010_create_sync_tables.d.ts +3 -0
  246. package/dist/src/storage/migrations/010_create_sync_tables.d.ts.map +1 -0
  247. package/dist/src/storage/migrations/010_create_sync_tables.js +43 -0
  248. package/dist/src/storage/migrations/010_create_sync_tables.js.map +1 -0
  249. package/dist/src/storage/migrations/index.d.ts +3 -0
  250. package/dist/src/storage/migrations/index.d.ts.map +1 -0
  251. package/dist/src/storage/migrations/index.js +3 -0
  252. package/dist/src/storage/migrations/index.js.map +1 -0
  253. package/dist/src/storage/migrations/migrator.d.ts +5 -0
  254. package/dist/src/storage/migrations/migrator.d.ts.map +1 -0
  255. package/dist/src/storage/migrations/migrator.js +55 -0
  256. package/dist/src/storage/migrations/migrator.js.map +1 -0
  257. package/dist/src/storage/migrations/run-migrations.d.ts +2 -0
  258. package/dist/src/storage/migrations/run-migrations.d.ts.map +1 -0
  259. package/dist/src/storage/migrations/run-migrations.js +58 -0
  260. package/dist/src/storage/migrations/run-migrations.js.map +1 -0
  261. package/dist/src/storage/migrations/types.d.ts +9 -0
  262. package/dist/src/storage/migrations/types.d.ts.map +1 -0
  263. package/dist/src/storage/migrations/types.js +2 -0
  264. package/dist/src/storage/migrations/types.js.map +1 -0
  265. package/dist/src/storage/txn.d.ts +15 -0
  266. package/dist/src/storage/txn.d.ts.map +1 -0
  267. package/dist/src/storage/txn.js +43 -0
  268. package/dist/src/storage/txn.js.map +1 -0
  269. package/dist/src/subs/default-error-handler.d.ts +13 -0
  270. package/dist/src/subs/default-error-handler.d.ts.map +1 -0
  271. package/dist/src/subs/default-error-handler.js +27 -0
  272. package/dist/src/subs/default-error-handler.js.map +1 -0
  273. package/dist/src/subs/react-subscription-manager.d.ts +45 -0
  274. package/dist/src/subs/react-subscription-manager.d.ts.map +1 -0
  275. package/dist/src/subs/react-subscription-manager.js +185 -0
  276. package/dist/src/subs/react-subscription-manager.js.map +1 -0
  277. package/dist/src/subs/types.d.ts +64 -0
  278. package/dist/src/subs/types.d.ts.map +1 -0
  279. package/dist/src/subs/types.js +2 -0
  280. package/dist/src/subs/types.js.map +1 -0
  281. package/dist/src/sync/channels/index.d.ts +3 -0
  282. package/dist/src/sync/channels/index.d.ts.map +1 -0
  283. package/dist/src/sync/channels/index.js +3 -0
  284. package/dist/src/sync/channels/index.js.map +1 -0
  285. package/dist/src/sync/channels/internal-channel.d.ts +57 -0
  286. package/dist/src/sync/channels/internal-channel.d.ts.map +1 -0
  287. package/dist/src/sync/channels/internal-channel.js +106 -0
  288. package/dist/src/sync/channels/internal-channel.js.map +1 -0
  289. package/dist/src/sync/channels/utils.d.ts +15 -0
  290. package/dist/src/sync/channels/utils.d.ts.map +1 -0
  291. package/dist/src/sync/channels/utils.js +26 -0
  292. package/dist/src/sync/channels/utils.js.map +1 -0
  293. package/dist/src/sync/errors.d.ts +10 -0
  294. package/dist/src/sync/errors.d.ts.map +1 -0
  295. package/dist/src/sync/errors.js +17 -0
  296. package/dist/src/sync/errors.js.map +1 -0
  297. package/dist/src/sync/index.d.ts +12 -0
  298. package/dist/src/sync/index.d.ts.map +1 -0
  299. package/dist/src/sync/index.js +9 -0
  300. package/dist/src/sync/index.js.map +1 -0
  301. package/dist/src/sync/interfaces.d.ts +150 -0
  302. package/dist/src/sync/interfaces.d.ts.map +1 -0
  303. package/dist/src/sync/interfaces.js +2 -0
  304. package/dist/src/sync/interfaces.js.map +1 -0
  305. package/dist/src/sync/mailbox.d.ts +21 -0
  306. package/dist/src/sync/mailbox.d.ts.map +1 -0
  307. package/dist/src/sync/mailbox.js +59 -0
  308. package/dist/src/sync/mailbox.js.map +1 -0
  309. package/dist/src/sync/sync-builder.d.ts +17 -0
  310. package/dist/src/sync/sync-builder.d.ts.map +1 -0
  311. package/dist/src/sync/sync-builder.js +29 -0
  312. package/dist/src/sync/sync-builder.js.map +1 -0
  313. package/dist/src/sync/sync-manager.d.ts +33 -0
  314. package/dist/src/sync/sync-manager.d.ts.map +1 -0
  315. package/dist/src/sync/sync-manager.js +196 -0
  316. package/dist/src/sync/sync-manager.js.map +1 -0
  317. package/dist/src/sync/sync-operation.d.ts +28 -0
  318. package/dist/src/sync/sync-operation.d.ts.map +1 -0
  319. package/dist/src/sync/sync-operation.js +63 -0
  320. package/dist/src/sync/sync-operation.js.map +1 -0
  321. package/dist/src/sync/types.d.ts +61 -0
  322. package/dist/src/sync/types.d.ts.map +1 -0
  323. package/dist/src/sync/types.js +16 -0
  324. package/dist/src/sync/types.js.map +1 -0
  325. package/dist/src/sync/utils.d.ts +17 -0
  326. package/dist/src/sync/utils.d.ts.map +1 -0
  327. package/dist/src/sync/utils.js +34 -0
  328. package/dist/src/sync/utils.js.map +1 -0
  329. package/dist/src/utils/reshuffle.d.ts +30 -0
  330. package/dist/src/utils/reshuffle.d.ts.map +1 -0
  331. package/dist/src/utils/reshuffle.js +47 -0
  332. package/dist/src/utils/reshuffle.js.map +1 -0
  333. package/package.json +23 -7
  334. package/dist/bench/end-to-end-flow.bench.d.ts +0 -2
  335. package/dist/bench/end-to-end-flow.bench.d.ts.map +0 -1
  336. package/dist/bench/end-to-end-flow.bench.js +0 -256
  337. package/dist/bench/end-to-end-flow.bench.js.map +0 -1
  338. package/dist/bench/event-bus.bench.d.ts +0 -2
  339. package/dist/bench/event-bus.bench.d.ts.map +0 -1
  340. package/dist/bench/event-bus.bench.js +0 -238
  341. package/dist/bench/event-bus.bench.js.map +0 -1
  342. package/dist/bench/queue-only.bench.d.ts +0 -2
  343. package/dist/bench/queue-only.bench.d.ts.map +0 -1
  344. package/dist/bench/queue-only.bench.js +0 -40
  345. package/dist/bench/queue-only.bench.js.map +0 -1
  346. package/dist/bench/reactor-throughput.bench.d.ts +0 -2
  347. package/dist/bench/reactor-throughput.bench.d.ts.map +0 -1
  348. package/dist/bench/reactor-throughput.bench.js +0 -137
  349. package/dist/bench/reactor-throughput.bench.js.map +0 -1
  350. package/dist/src/executor/job-executor.d.ts +0 -62
  351. package/dist/src/executor/job-executor.d.ts.map +0 -1
  352. package/dist/src/executor/job-executor.js +0 -325
  353. package/dist/src/executor/job-executor.js.map +0 -1
  354. package/dist/test/event-bus.test.d.ts +0 -2
  355. package/dist/test/event-bus.test.d.ts.map +0 -1
  356. package/dist/test/event-bus.test.js +0 -532
  357. package/dist/test/event-bus.test.js.map +0 -1
  358. package/dist/test/job-executor.test.d.ts +0 -2
  359. package/dist/test/job-executor.test.d.ts.map +0 -1
  360. package/dist/test/job-executor.test.js +0 -581
  361. package/dist/test/job-executor.test.js.map +0 -1
  362. package/dist/test/queue.test.d.ts +0 -2
  363. package/dist/test/queue.test.d.ts.map +0 -1
  364. package/dist/test/queue.test.js +0 -396
  365. package/dist/test/queue.test.js.map +0 -1
  366. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,23 +1,129 @@
1
1
  /**
2
- * Basic Operation type for the queue
3
- * This is a simplified version that includes the essential fields needed for queuing
4
- */
5
- export type Operation = {
6
- /** Position of the operation in the history */
7
- index: number;
8
- /** Timestamp of when the operation was added */
9
- timestamp: string;
10
- /** Hash of the resulting document data after the operation */
11
- hash: string;
12
- /** The number of operations skipped with this Operation */
13
- skip: number;
14
- /** The type/name of the operation */
15
- type: string;
16
- /** The input data for the operation */
17
- input: any;
18
- /** Error message for a failed action */
19
- error?: string;
20
- /** Unique operation id */
21
- id?: string;
2
+ * The document ID used for system operations (CREATE_DOCUMENT, DELETE_DOCUMENT, etc.)
3
+ * System operations use this special ID along with the "system" scope.
4
+ */
5
+ export declare const SYSTEM_DOCUMENT_ID = "00000000-0000-0000-0000-000000000000";
6
+ /**
7
+ * Information about an error including message and stack trace.
8
+ */
9
+ export type ErrorInfo = {
10
+ message: string;
11
+ stack: string;
12
+ };
13
+ /**
14
+ * Describes the status of a shutdown operation.
15
+ */
16
+ export type ShutdownStatus = {
17
+ /**
18
+ * True if and only if the system has been shutdown.
19
+ *
20
+ * This value is meant to be polled to determine if the system has been shutdown.
21
+ *
22
+ * In the case of a browser process, the `kill` method should be able to synchronously set this to true.
23
+ *
24
+ * In the case of a server process, a graceful shutdown period should be allowed for the system to finish its work.
25
+ */
26
+ get isShutdown(): boolean;
27
+ };
28
+ /**
29
+ * Enum that determines deletion propagation.
30
+ */
31
+ export declare enum PropagationMode {
32
+ None = "none",
33
+ Cascade = "cascade"
34
+ }
35
+ /**
36
+ * Enum that describes the type of relationship change.
37
+ */
38
+ export declare enum RelationshipChangeType {
39
+ Added = "added",
40
+ Removed = "removed"
41
+ }
42
+ /**
43
+ * Describes the current state of a job.
44
+ */
45
+ export type JobInfo = {
46
+ id: string;
47
+ status: JobStatus;
48
+ createdAtUtcIso: string;
49
+ completedAtUtcIso?: string;
50
+ error?: ErrorInfo;
51
+ errorHistory?: ErrorInfo[];
52
+ result?: any;
53
+ /**
54
+ * A token for coordinating reads, only valid once a job reaches COMPLETED.
55
+ */
56
+ consistencyToken: ConsistencyToken;
57
+ };
58
+ /**
59
+ * Job execution statuses
60
+ */
61
+ export declare enum JobStatus {
62
+ /** Job is queued but not yet started */
63
+ PENDING = "PENDING",
64
+ /** Job is currently being executed */
65
+ RUNNING = "RUNNING",
66
+ /** Job completed successfully */
67
+ COMPLETED = "COMPLETED",
68
+ /** Job failed (may be retried) */
69
+ FAILED = "FAILED"
70
+ }
71
+ /**
72
+ * Describe the view of a set of documents. That is, what pieces of the
73
+ * documents are populated.
74
+ */
75
+ export type ViewFilter = {
76
+ branch?: string;
77
+ scopes?: string[];
78
+ revision?: number;
79
+ };
80
+ /**
81
+ * Describes filter options for searching documents.
82
+ *
83
+ * Each parameter is treated as an AND condition.
84
+ */
85
+ export type SearchFilter = {
86
+ type?: string;
87
+ parentId?: string;
88
+ ids?: string[];
89
+ slugs?: string[];
90
+ };
91
+ /**
92
+ * Describes the options for paging.
93
+ */
94
+ export type PagingOptions = {
95
+ cursor: string;
96
+ limit: number;
97
+ };
98
+ /**
99
+ * The paged result.
100
+ */
101
+ export type PagedResults<T> = {
102
+ results: T[];
103
+ options: PagingOptions;
104
+ next?: () => Promise<PagedResults<T>>;
105
+ nextCursor?: string;
106
+ };
107
+ /**
108
+ * A string key in the format `documentId:scope:branch` used to identify a consistency checkpoint.
109
+ */
110
+ export type ConsistencyKey = `${string}:${string}:${string}`;
111
+ /**
112
+ * Describes a specific point in a document's operation history.
113
+ */
114
+ export type ConsistencyCoordinate = {
115
+ documentId: string;
116
+ scope: string;
117
+ branch: string;
118
+ operationIndex: number;
119
+ };
120
+ /**
121
+ * A token that captures the state of write operations at a point in time.
122
+ * Can be used to ensure read-after-write consistency.
123
+ */
124
+ export type ConsistencyToken = {
125
+ version: 1;
126
+ createdAtUtcIso: string;
127
+ coordinates: ConsistencyCoordinate[];
22
128
  };
23
129
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,KAAK,EAAE,GAAG,CAAC;IACX,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,yCAAyC,CAAC;AAEzE;;GAE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E,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC5B,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,OAAO,EAAE,aAAa,CAAC;IAEvB,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,CAAC,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,qBAAqB,EAAE,CAAC;CACtC,CAAC"}
@@ -1,2 +1,36 @@
1
- export {};
1
+ /**
2
+ * The document ID used for system operations (CREATE_DOCUMENT, DELETE_DOCUMENT, etc.)
3
+ * System operations use this special ID along with the "system" scope.
4
+ */
5
+ export const SYSTEM_DOCUMENT_ID = "00000000-0000-0000-0000-000000000000";
6
+ /**
7
+ * Enum that determines deletion propagation.
8
+ */
9
+ export var PropagationMode;
10
+ (function (PropagationMode) {
11
+ PropagationMode["None"] = "none";
12
+ PropagationMode["Cascade"] = "cascade";
13
+ })(PropagationMode || (PropagationMode = {}));
14
+ /**
15
+ * Enum that describes the type of relationship change.
16
+ */
17
+ export var RelationshipChangeType;
18
+ (function (RelationshipChangeType) {
19
+ RelationshipChangeType["Added"] = "added";
20
+ RelationshipChangeType["Removed"] = "removed";
21
+ })(RelationshipChangeType || (RelationshipChangeType = {}));
22
+ /**
23
+ * Job execution statuses
24
+ */
25
+ export var JobStatus;
26
+ (function (JobStatus) {
27
+ /** Job is queued but not yet started */
28
+ JobStatus["PENDING"] = "PENDING";
29
+ /** Job is currently being executed */
30
+ JobStatus["RUNNING"] = "RUNNING";
31
+ /** Job completed successfully */
32
+ JobStatus["COMPLETED"] = "COMPLETED";
33
+ /** Job failed (may be retried) */
34
+ JobStatus["FAILED"] = "FAILED";
35
+ })(JobStatus || (JobStatus = {}));
2
36
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/shared/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AA0BzE;;GAEG;AACH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,sCAAmB,CAAA;AACrB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,yCAAe,CAAA;IACf,6CAAmB,CAAA;AACrB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;AAoBD;;GAEG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,wCAAwC;IACxC,gCAAmB,CAAA;IACnB,sCAAsC;IACtC,gCAAmB,CAAA;IACnB,iCAAiC;IACjC,oCAAuB,CAAA;IACvB,kCAAkC;IAClC,8BAAiB,CAAA;AACnB,CAAC,EATW,SAAS,KAAT,SAAS,QASpB"}
@@ -0,0 +1,3 @@
1
+ import type { ViewFilter } from "./types.js";
2
+ export declare function matchesScope(view: ViewFilter | undefined, scope: string): boolean;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/shared/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,YAAK,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAO1E"}
@@ -0,0 +1,8 @@
1
+ export function matchesScope(view = {}, scope) {
2
+ if (view.scopes) {
3
+ return view.scopes.includes(scope);
4
+ }
5
+ // if there are no scopes specified, we match all scopes
6
+ return true;
7
+ }
8
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/shared/utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,YAAY,CAAC,OAAmB,EAAE,EAAE,KAAa;IAC/D,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,wDAAwD;IACxD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { Signature } from "document-model";
2
+ import type { ISigner } from "./types.js";
3
+ export declare class PassthroughSigner implements ISigner {
4
+ sign(): Promise<Signature>;
5
+ }
6
+ //# sourceMappingURL=passthrough-signer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passthrough-signer.d.ts","sourceRoot":"","sources":["../../../src/signer/passthrough-signer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,qBAAa,iBAAkB,YAAW,OAAO;IAC/C,IAAI,IAAI,OAAO,CAAC,SAAS,CAAC;CAG3B"}
@@ -0,0 +1,6 @@
1
+ export class PassthroughSigner {
2
+ sign() {
3
+ return Promise.resolve(["", "", "", "", ""]);
4
+ }
5
+ }
6
+ //# sourceMappingURL=passthrough-signer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passthrough-signer.js","sourceRoot":"","sources":["../../../src/signer/passthrough-signer.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,iBAAiB;IAC5B,IAAI;QACF,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import type { Action, Signature } from "document-model";
2
+ /**
3
+ * Interface for signing actions before submission to the reactor.
4
+ */
5
+ export interface ISigner {
6
+ /**
7
+ * Signs an action
8
+ *
9
+ * @param action - The action to sign
10
+ * @param abortSignal - Optional abort signal to cancel the signing
11
+ * @returns The signature
12
+ */
13
+ sign(action: Action, abortSignal?: AbortSignal): Promise<Signature>;
14
+ }
15
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/signer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACrE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/signer/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type { ISyncCursorStorage, ISyncRemoteStorage } from "./interfaces.js";
2
+ export { KyselySyncCursorStorage } from "./kysely/sync-cursor-storage.js";
3
+ export { KyselySyncRemoteStorage } from "./kysely/sync-remote-storage.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { KyselySyncCursorStorage } from "./kysely/sync-cursor-storage.js";
2
+ export { KyselySyncRemoteStorage } from "./kysely/sync-remote-storage.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,335 @@
1
+ import type { Operation, PHDocument } from "document-model";
2
+ import type { ConsistencyToken } from "../shared/types.js";
3
+ import type { RemoteRecord, RemoteCursor } from "../sync/types.js";
4
+ export type OperationContext = {
5
+ documentId: string;
6
+ documentType: string;
7
+ scope: string;
8
+ branch: string;
9
+ resultingState?: string;
10
+ };
11
+ export type OperationWithContext = {
12
+ operation: Operation;
13
+ context: OperationContext;
14
+ };
15
+ export declare class DuplicateOperationError extends Error {
16
+ constructor(opId: string);
17
+ }
18
+ export declare class OptimisticLockError extends Error {
19
+ constructor(message: string);
20
+ }
21
+ export declare class RevisionMismatchError extends Error {
22
+ constructor(expected: number, actual: number);
23
+ }
24
+ export interface AtomicTxn {
25
+ addOperations(...operations: Operation[]): void;
26
+ }
27
+ export type DocumentRevisions = {
28
+ /** Map of scope to operation index for that scope */
29
+ revision: Record<string, number>;
30
+ /** Latest timestamp across revisions */
31
+ latestTimestamp: string;
32
+ };
33
+ export interface IOperationStore {
34
+ apply(documentId: string, documentType: string, scope: string, branch: string, revision: number, fn: (txn: AtomicTxn) => void | Promise<void>, signal?: AbortSignal): Promise<void>;
35
+ getSince(documentId: string, scope: string, branch: string, revision: number, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<Operation>>;
36
+ getSinceId(id: number, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<OperationWithContext>>;
37
+ /**
38
+ * Gets the latest operation index for each scope of a document, along with
39
+ * the latest timestamp across all scopes. This is used to efficiently reconstruct
40
+ * the revision map and lastModified timestamp for document headers.
41
+ *
42
+ * @param documentId - The document id
43
+ * @param branch - The branch name
44
+ * @param signal - Optional abort signal to cancel the request
45
+ * @returns Object containing revision map and latest timestamp
46
+ */
47
+ getRevisions(documentId: string, branch: string, signal?: AbortSignal): Promise<DocumentRevisions>;
48
+ }
49
+ export interface IKeyframeStore {
50
+ putKeyframe(documentId: string, scope: string, branch: string, revision: number, document: PHDocument, signal?: AbortSignal): Promise<void>;
51
+ findNearestKeyframe(documentId: string, scope: string, branch: string, targetRevision: number, signal?: AbortSignal): Promise<{
52
+ revision: number;
53
+ document: PHDocument;
54
+ } | undefined>;
55
+ deleteKeyframes(documentId: string, scope?: string, branch?: string, signal?: AbortSignal): Promise<number>;
56
+ }
57
+ export interface ViewFilter {
58
+ branch?: string;
59
+ scopes?: string[];
60
+ }
61
+ export interface SearchFilter {
62
+ documentType?: string;
63
+ parentId?: string;
64
+ identifiers?: Record<string, any>;
65
+ includeDeleted?: boolean;
66
+ }
67
+ export interface PagingOptions {
68
+ cursor?: string;
69
+ limit?: number;
70
+ }
71
+ export interface PagedResults<T> {
72
+ items: T[];
73
+ nextCursor?: string;
74
+ hasMore: boolean;
75
+ }
76
+ export interface DocumentSnapshot {
77
+ id: string;
78
+ documentId: string;
79
+ slug: string | null;
80
+ name: string | null;
81
+ scope: string;
82
+ branch: string;
83
+ content: string;
84
+ documentType: string;
85
+ lastOperationIndex: number;
86
+ lastOperationHash: string;
87
+ lastUpdatedAt: Date;
88
+ snapshotVersion: number;
89
+ identifiers: string | null;
90
+ metadata: string | null;
91
+ isDeleted: boolean;
92
+ deletedAt: Date | null;
93
+ }
94
+ export interface IDocumentView {
95
+ /**
96
+ * Initializes the view.
97
+ */
98
+ init(): Promise<void>;
99
+ /**
100
+ * Indexes a list of operations.
101
+ *
102
+ * @param items - Operations with context. Context MUST include ephemeral
103
+ * `resultingState` for optimization. IDocumentView never rebuilds
104
+ * documents from operations - it always requires resultingState.
105
+ */
106
+ indexOperations(items: OperationWithContext[]): Promise<void>;
107
+ /**
108
+ * Blocks until the view has processed the coordinates referenced by the
109
+ * provided consistency token.
110
+ *
111
+ * @param token - Consistency token derived from the originating job
112
+ * @param timeoutMs - Optional timeout window in milliseconds
113
+ * @param signal - Optional abort signal to cancel the wait
114
+ */
115
+ waitForConsistency(token: ConsistencyToken, timeoutMs?: number, signal?: AbortSignal): Promise<void>;
116
+ /**
117
+ * Returns true if and only if the documents exist.
118
+ *
119
+ * @param documentIds - The list of document ids to check.
120
+ * @param consistencyToken - Optional token for read-after-write consistency
121
+ * @param signal - Optional abort signal to cancel the request
122
+ */
123
+ exists(documentIds: string[], consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<boolean[]>;
124
+ /**
125
+ * Returns the document with the given id.
126
+ *
127
+ * @param documentId - The id of the document to get.
128
+ * @param view - Optional filter containing branch and scopes information
129
+ * @param consistencyToken - Optional token for read-after-write consistency
130
+ * @param signal - Optional abort signal to cancel the request
131
+ */
132
+ get<TDocument extends PHDocument>(documentId: string, view?: ViewFilter, consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<TDocument>;
133
+ /**
134
+ * Finds documents by their document type.
135
+ *
136
+ * @param type - The document type to search for
137
+ * @param view - Optional filter containing branch and scopes information
138
+ * @param paging - Optional paging options for cursor-based pagination
139
+ * @param consistencyToken - Optional token for read-after-write consistency
140
+ * @param signal - Optional abort signal to cancel the request
141
+ */
142
+ findByType(type: string, view?: ViewFilter, paging?: PagingOptions, consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<PagedResults<PHDocument>>;
143
+ /**
144
+ * Resolves a slug to a document ID.
145
+ *
146
+ * @param slug - The slug to resolve
147
+ * @param view - Optional filter containing branch and scopes information
148
+ * @param consistencyToken - Optional token for read-after-write consistency
149
+ * @param signal - Optional abort signal to cancel the request
150
+ * @returns The document ID or undefined if the slug doesn't exist
151
+ */
152
+ resolveSlug(slug: string, view?: ViewFilter, consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<string | undefined>;
153
+ }
154
+ export type DocumentRelationship = {
155
+ sourceId: string;
156
+ targetId: string;
157
+ relationshipType: string;
158
+ metadata?: Record<string, unknown>;
159
+ createdAt: Date;
160
+ updatedAt: Date;
161
+ };
162
+ export type DocumentGraphEdge = {
163
+ from: string;
164
+ to: string;
165
+ type: string;
166
+ };
167
+ export interface IDocumentGraph {
168
+ nodes: string[];
169
+ edges: DocumentGraphEdge[];
170
+ }
171
+ export interface IDocumentIndexer {
172
+ /**
173
+ * Initializes the indexer and catches up on any missed operations.
174
+ */
175
+ init(): Promise<void>;
176
+ /**
177
+ * Indexes a list of operations to update the relationship graph.
178
+ *
179
+ * @param operations - Operations to index. Will process ADD_RELATIONSHIP and
180
+ * REMOVE_RELATIONSHIP operations.
181
+ */
182
+ indexOperations(operations: OperationWithContext[]): Promise<void>;
183
+ /**
184
+ * Blocks until the indexer has processed the coordinates referenced by the
185
+ * provided consistency token.
186
+ *
187
+ * @param token - Consistency token derived from the originating job
188
+ * @param timeoutMs - Optional timeout window in milliseconds
189
+ * @param signal - Optional abort signal to cancel the wait
190
+ */
191
+ waitForConsistency(token: ConsistencyToken, timeoutMs?: number, signal?: AbortSignal): Promise<void>;
192
+ /**
193
+ * Returns outgoing relationships from a document.
194
+ *
195
+ * @param documentId - The source document id
196
+ * @param types - Optional filter by relationship types
197
+ * @param consistencyToken - Optional token for read-after-write consistency
198
+ * @param signal - Optional abort signal to cancel the request
199
+ */
200
+ getOutgoing(documentId: string, types?: string[], consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<DocumentRelationship[]>;
201
+ /**
202
+ * Returns incoming relationships to a document.
203
+ *
204
+ * @param documentId - The target document id
205
+ * @param types - Optional filter by relationship types
206
+ * @param consistencyToken - Optional token for read-after-write consistency
207
+ * @param signal - Optional abort signal to cancel the request
208
+ */
209
+ getIncoming(documentId: string, types?: string[], consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<DocumentRelationship[]>;
210
+ /**
211
+ * Checks if a relationship exists between two documents.
212
+ *
213
+ * @param sourceId - The source document id
214
+ * @param targetId - The target document id
215
+ * @param types - Optional filter by relationship types
216
+ * @param consistencyToken - Optional token for read-after-write consistency
217
+ * @param signal - Optional abort signal to cancel the request
218
+ */
219
+ hasRelationship(sourceId: string, targetId: string, types?: string[], consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<boolean>;
220
+ /**
221
+ * Returns all undirected relationships between two documents.
222
+ *
223
+ * @param a - The ID of the first document
224
+ * @param b - The ID of the second document
225
+ * @param types - Optional filter by relationship types
226
+ * @param consistencyToken - Optional token for read-after-write consistency
227
+ * @param signal - Optional abort signal to cancel the request
228
+ */
229
+ getUndirectedRelationships(a: string, b: string, types?: string[], consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<DocumentRelationship[]>;
230
+ /**
231
+ * Returns all directed relationships between two documents.
232
+ *
233
+ * @param sourceId - The source document id
234
+ * @param targetId - The target document id
235
+ * @param types - Optional filter by relationship types
236
+ * @param consistencyToken - Optional token for read-after-write consistency
237
+ * @param signal - Optional abort signal to cancel the request
238
+ */
239
+ getDirectedRelationships(sourceId: string, targetId: string, types?: string[], consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<DocumentRelationship[]>;
240
+ /**
241
+ * Finds a path from source to target following directed edges.
242
+ *
243
+ * @param sourceId - The source document id
244
+ * @param targetId - The target document id
245
+ * @param types - Optional filter by relationship types
246
+ * @param consistencyToken - Optional token for read-after-write consistency
247
+ * @param signal - Optional abort signal to cancel the request
248
+ * @returns Array of document ids representing the path, or null if no path exists
249
+ */
250
+ findPath(sourceId: string, targetId: string, types?: string[], consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<string[] | null>;
251
+ /**
252
+ * Returns all ancestors of a document in the relationship graph.
253
+ *
254
+ * @param documentId - The document id
255
+ * @param types - Optional filter by relationship types
256
+ * @param consistencyToken - Optional token for read-after-write consistency
257
+ * @param signal - Optional abort signal to cancel the request
258
+ */
259
+ findAncestors(documentId: string, types?: string[], consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<IDocumentGraph>;
260
+ /**
261
+ * Returns all relationship types currently in the system.
262
+ *
263
+ * @param consistencyToken - Optional token for read-after-write consistency
264
+ * @param signal - Optional abort signal to cancel the request
265
+ */
266
+ getRelationshipTypes(consistencyToken?: ConsistencyToken, signal?: AbortSignal): Promise<string[]>;
267
+ }
268
+ export interface ISyncRemoteStorage {
269
+ /**
270
+ * Lists all remotes.
271
+ *
272
+ * @param signal - Optional abort signal to cancel the request
273
+ * @returns The remotes
274
+ */
275
+ list(signal?: AbortSignal): Promise<RemoteRecord[]>;
276
+ /**
277
+ * Gets a remote by name.
278
+ *
279
+ * @param name - The name of the remote
280
+ * @param signal - Optional abort signal to cancel the request
281
+ * @returns The remote
282
+ */
283
+ get(name: string, signal?: AbortSignal): Promise<RemoteRecord>;
284
+ /**
285
+ * Upserts a remote.
286
+ *
287
+ * @param remote - The remote to upsert
288
+ * @param signal - Optional abort signal to cancel the request
289
+ * @returns The remote
290
+ */
291
+ upsert(remote: RemoteRecord, signal?: AbortSignal): Promise<void>;
292
+ /**
293
+ * Removes a remote by name.
294
+ *
295
+ * @param name - The name of the remote
296
+ * @param signal - Optional abort signal to cancel the request
297
+ * @returns The remote
298
+ */
299
+ remove(name: string, signal?: AbortSignal): Promise<void>;
300
+ }
301
+ export interface ISyncCursorStorage {
302
+ /**
303
+ * Lists all cursors for a remote.
304
+ *
305
+ * @param remoteName - The name of the remote
306
+ * @param signal - Optional abort signal to cancel the request
307
+ * @returns The cursors
308
+ */
309
+ list(remoteName: string, signal?: AbortSignal): Promise<RemoteCursor[]>;
310
+ /**
311
+ * Gets a cursor for a remote.
312
+ *
313
+ * @param remoteName - The name of the remote
314
+ * @param signal - Optional abort signal to cancel the request
315
+ * @returns The cursor
316
+ */
317
+ get(remoteName: string, signal?: AbortSignal): Promise<RemoteCursor>;
318
+ /**
319
+ * Upserts a cursor.
320
+ *
321
+ * @param cursor - The cursor to upsert
322
+ * @param signal - Optional abort signal to cancel the request
323
+ * @returns The cursor
324
+ */
325
+ upsert(cursor: RemoteCursor, signal?: AbortSignal): Promise<void>;
326
+ /**
327
+ * Removes a cursor for a remote.
328
+ *
329
+ * @param remoteName - The name of the remote
330
+ * @param signal - Optional abort signal to cancel the request
331
+ * @returns The cursor
332
+ */
333
+ remove(remoteName: string, signal?: AbortSignal): Promise<void>;
334
+ }
335
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/storage/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEnE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAA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